set_listener_ports.jacl
### ### set_listener_ports.jacl ### ### ### ### ### proc set_listener_ports {cname nname sname} { ### ### set up globals ### global AdminConfig global AdminControl global AdminApp set serverid [$AdminConfig getid /Cell:$cname/Node:$nname/Server:$sname/] if {[llength $serverid] == 0} { puts "Serverid null - returning " exit } ### ### Identify the message listener service belonging to the server ### set mls [$AdminConfig list MessageListenerService $serverid] ### ### Configure listener ports ### $AdminConfig create ListenerPort $mls {{connectionFactoryJNDIName acme/buyer/jms/XaQueueConnectionFactory} \ {destinationJNDIName acme/buyer/jms/CollabJobExecQueue} \ {maxMessages 1} \ {maxRetries 0} \ {maxSessions 1} \ {name CollabJobExecMessageEJBPort} \ {stateManagement {{initialState START} \ }}} $AdminConfig create ListenerPort $mls {{connectionFactoryJNDIName acme/buyer/jms/XaQueueConnectionFactory} \ {destinationJNDIName acme/buyer/jms/ErrorBizDocQueue} \ {maxMessages 1} \ {maxRetries 0} \ {maxSessions 5} \ {name ErrorBizDocMessageEJBPort} \ {stateManagement {{initialState START} \ }}} $AdminConfig create ListenerPort $mls {{connectionFactoryJNDIName acme/buyer/jms/XaQueueConnectionFactory} \ {destinationJNDIName acme/buyer/jms/ErrorQueue} \ {maxMessages 1} \ {maxRetries 0} \ {maxSessions 5} \ {name ErrorMessageEJBPort} \ {stateManagement {{initialState START} \ }}} $AdminConfig create ListenerPort $mls {{connectionFactoryJNDIName acme/buyer/jms/XaQueueConnectionFactory} \ {destinationJNDIName acme/buyer/jms/JobExecQueue} \ {maxMessages 1} \ {maxRetries 0} \ {maxSessions 5} \ {name JobExecMessageEJBPort} \ {stateManagement {{initialState START} \ }}} $AdminConfig create ListenerPort $mls {{connectionFactoryJNDIName acme/buyer/jms/XaQueueConnectionFactory} \ {destinationJNDIName acme/buyer/jms/MatchQueue} \ {maxMessages 1} \ {maxRetries 0} \ {maxSessions 5} \ {name MatchMessageEJBPort} \ {stateManagement {{initialState START} \ }}} $AdminConfig create ListenerPort $mls {{connectionFactoryJNDIName acme/buyer/jms/XaQueueConnectionFactory} \ {destinationJNDIName acme/buyer/jms/ReceiveInvoiceQueue} \ {maxMessages 1} \ {maxRetries 0} \ {maxSessions 5} \ {name ReceiveInvoiceMessageEJBPort} \ {stateManagement {{initialState START} \ }}} $AdminConfig create ListenerPort $mls {{connectionFactoryJNDIName acme/buyer/jms/XaQueueConnectionFactory} \ {destinationJNDIName acme/buyer/jms/ReceiveNonMatchDocumentQueue} \ {maxMessages 1} \ {maxRetries 0} \ {maxSessions 5} \ {name ReceiveNonMatchDocumentMessageEJBPort} \ {stateManagement {{initialState START} \ }}} $AdminConfig create ListenerPort $mls {{connectionFactoryJNDIName acme/buyer/jms/XaQueueConnectionFactory} \ {destinationJNDIName acme/buyer/jms/ReceivePaymentQueue} \ {maxMessages 1} \ {maxRetries 0} \ {maxSessions 5} \ {name ReceivePaymentMessageEJBPort} \ {stateManagement {{initialState START} \ }}} $AdminConfig create ListenerPort $mls {{connectionFactoryJNDIName acme/buyer/jms/XaQueueConnectionFactory} \ {destinationJNDIName acme/buyer/jms/ReceiveReceiptQueue} \ {maxMessages 1} \ {maxRetries 0} \ {maxSessions 5} \ {name ReceiveReceiptMessageEJBPort} \ {stateManagement {{initialState START} \ }}} $AdminConfig create ListenerPort $mls {{connectionFactoryJNDIName acme/buyer/jms/XaQueueConnectionFactory} \ {destinationJNDIName acme/buyer/jms/ReceiveReceiptPurgeQueue} \ {maxMessages 1} \ {maxRetries 0} \ {maxSessions 5} \ {name ReceiveReceiptPurgeMessageEJBPort} \ {stateManagement {{initialState START} \ }}} $AdminConfig create ListenerPort $mls {{connectionFactoryJNDIName acme/buyer/jms/XaQueueConnectionFactory} \ {destinationJNDIName acme/buyer/jms/ReceiveVendorQueue} \ {maxMessages 1} \ {maxRetries 0} \ {maxSessions 5} \ {name ReceiveVendorMessageEJBPort} \ {stateManagement {{initialState START} \ }}} $AdminConfig create ListenerPort $mls {{connectionFactoryJNDIName acme/buyer/jms/XaQueueConnectionFactory} \ {destinationJNDIName acme/buyer/jms/ReceiveVoidCheckQueue} \ {maxMessages 1} \ {maxRetries 0} \ {maxSessions 5} \ {name ReceiveVoidCheckMessageEJBPort} \ {stateManagement {{initialState START} \ }}} $AdminConfig create ListenerPort $mls {{connectionFactoryJNDIName acme/buyer/jms/XaQueueConnectionFactory} \ {destinationJNDIName acme/buyer/jms/ReceiveReceiptAdjustmentQueue} \ {maxMessages 1} \ {maxRetries 0} \ {maxSessions 5} \ {name ReceiveReceiptAdjustmentMessageEJBPort} \ {stateManagement {{initialState START} \ }}} $AdminConfig create ListenerPort $mls {{connectionFactoryJNDIName acme/buyer/jms/XaQueueConnectionFactory} \ {destinationJNDIName acme/buyer/jms/PrepayQueue} \ {maxMessages 1} \ {maxRetries 0} \ {maxSessions 5} \ {name PrepayMessageEJBPort} \ {stateManagement {{initialState START} \ }}} $AdminConfig save } ### ### Main ### if { !($argc == 3) } { puts "" puts "Usage: " puts " " puts "wsadmin.sh -username system -password password -f set_listener_ports.jacl cellname nodename servername" puts "" puts "For example: " puts " " puts "wsadmin.sh -username was -password acme@ -f set_listener_ports.jacl hostnameNetwork hostname ops_1_1" } else { set xcell [lindex $argv 0] set xnode [lindex $argv 1] set xserver [lindex $argv 2] set_listener_ports $xcell $xnode $xserver }