### ### get_listener_ports.jacl ### ### Get listener ports from ### an existing server. ### proc get_listener_ports {cname nname sname} { #puts "$cname $nname $sname" global AdminConfig global AdminControl global AdminApp set serverid [$AdminConfig getid /Cell:$cname/Node:$nname/Server:$sname/] if {[llength $serverid] == 0} { puts "Cannot find serverid for $cname $nname $sname" return } set mls [$AdminConfig list MessageListenerService $serverid] set lports [$AdminConfig showall $mls listenerPorts] puts "$lports" # foreach lport $lports { # puts "\$AdminConfig create ListenerPort \$mls $lport" # puts " " # } } ### ### Main ### ### if { !($argc == 3) } { puts "" puts "Usage: " puts " " puts "wsadmin.sh -username system -password password -f get_listener_ports.jacl cellname nodename servername" } else { set xcell [lindex $argv 0] set xnode [lindex $argv 1] set xserver [lindex $argv 2] get_listener_ports $xcell $xnode $xserver }