### ### get_J2CResourceAdapters.jacl ### ### ### General JACL configuration code by reading ### from an existing configuration ### ### Note that because standard JACL delimiters are curly ### braces {}, if any values retrieved have curly braces, ### they will screw up the code. For example, ### ${WAS_LIBS_DIR}/rsadapter.rar}, will cause the code ### to fail.... ### ### ### From xmi:type fields in resources.xml ### ### proc get_J2CResourceAdapters {cname nname snames} { global AdminConfig ### ### Altername method: get all J2CResource Adapters ### For all cells, nodes, servers ### #set J2CResourceAdapters [$AdminConfig getid /J2CResourceAdapter:/] #puts $J2CResourceAdapters foreach sname $snames { set J2CResourceAdapters [$AdminConfig getid /Cell:$cname/Node:$nname/Server:$sname/J2CResourceAdapter:/] foreach J2CResourceAdapter $J2CResourceAdapters { set xyz [$AdminConfig showall $J2CResourceAdapters] puts " " puts "# $J2CResourceAdapter" puts "\$AdminConfig modify \$J2CResourceAdapter { $xyz }" puts " " } } } ### ### Main ### ### if { !($argc == 3) } { puts "" puts "Usage: " puts " " puts "wsadmin.sh -username system -password password -f get_getJ2CResourceAdapters.jacl cell node \"server1 server2 ...\"" puts " " } else { set xcell [lindex $argv 0] set xnode [lindex $argv 1] set xservers [lindex $argv 2] get_J2CResourceAdapters $xcell $xnode $xservers }