###
### set_JMSProvider.jacl
###
###
###
###
###

proc set_JMSProvider {snames} {


###
### set up globals
###

global AdminConfig
global AdminControl
global AdminApp


set cells [$AdminConfig list Cell]

foreach cell $cells {
     set cname [$AdminConfig showAttribute $cell name]
     set nodes [$AdminConfig list Node $cell]

     puts " "
     puts "Cell: $cname         "

     foreach node $nodes {

        set nname [$AdminConfig showAttribute $node name]
        puts " "
        puts "Node: $nname            "


        foreach sname $snames {


            puts " "
            puts "Server: $sname"

            set serverid [$AdminConfig getid /Cell:$cname/Node:$nname/Server:$sname/]

            if {[llength $serverid] == 0} {
               puts "Serverid null - returning "
               continue 
            }


            $AdminConfig create JMSProvider $serverid {{description "Built-in WebSphere JMS Provider"}{externalInitialContextFactory {}}{externalProviderURL {}}{name "WebSphere JMS Provider"}}


$AdminConfig create JMSProvider $serverid {{classpath $MQJMS_LIB_ROOT}{description "WebSphere MQ JMS Provider"}{externalInitialContextFactory {}}{externalProviderURL {}}{name "WebSphere MQ JMS Provider"}{nativepath $MQJMS_LIB_ROOT}}





        }
    }
}

$AdminConfig save

}



###
### Main
###
### Test servers: nap_1_1 nap_2_1 
###


if { !($argc == 1) } {
   puts ""
   puts "Usage: , "
   puts " "
   puts "wsadmin.sh -username system -password password -f set_JMSProvider.jacl \"server1 server2 ...\""
} else { 
   set xservers      [lindex $argv 0]  
   set_JMSProvider $xservers 
}







 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.