### ### get_JMSProvider.jacl ### ### Get JMS Provider attributes ### ### Generates JACL code for configuring into a new system ### ### proc get_JMSProvider {snames} { ### ### set up globals ### global AdminConfig global AdminControl global AdminApp ### ### Cell Level ### puts " " puts "# Cell Level " set JMSProviders [$AdminConfig getid /JMSProvider:/] foreach JMSProvider $JMSProviders { puts " " puts "# $JMSProvider" puts " " set xyz [$AdminConfig showall $JMSProvider] puts "\$AdminConfig modify \$JMSProvider { $xyz }" } puts " " puts " " ### ### Server Level ### puts " " puts "# Server Level " set cells [$AdminConfig list Cell] foreach cell $cells { set cname [$AdminConfig showAttribute $cell name] set nodes [$AdminConfig list Node $cell] foreach node $nodes { set nname [$AdminConfig showAttribute $node name] foreach sname $snames { set serverid [$AdminConfig getid /Cell:$cname/Node:$nname/Server:$sname/] if {[llength $serverid] == 0} { continue } set jmsp [$AdminConfig list JMSProvider $serverid] foreach jms $jmsp { puts " " set xyz [$AdminConfig showall $jms] puts " " puts "#Server: $serverid" puts $xyz } } } } } ### ### Main ### ### Test servers: nap_1_1 nap_2_1 ### if { !($argc == 1) } { puts "" puts "Usage:, " puts " " puts "wsadmin.sh -username system -password password -f get_JMSProvider.jacl \"server1 server2 ...\"" } else { set xservers [lindex $argv 0] get_JMSProvider $xservers }