You can use scripting to configure a new connection factory for the WebSphere® MQ messaging provider.
Before starting this task, the wsadmin tool must be running.
The following example creates a connection factory, specifying custom connection data. Due to the default values assumed for the unspecified parameters, applications using this connection factory expect to be co-located with a queue manager installed on the same node.
wsadmin>$AdminConfig getid /Node:9994GKCNode01 9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1) wsadmin>$AdminTask createWMQConnectionFactory 9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1) {-name cf1 -jndiName "jms/cf/cf1" -type CF} cf1(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# MQConnectionFactory_1205322636000)
The following example creates an connection factory for which the user must specify and maintain all the parameters used for establishing a connection to WebSphere MQ.
wsadmin>AdminConfig.getid("/Node:9994GKCNode01") 9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1) wsadmin>AdminTask.createWMQConnectionFactory("9994GKCNode01(cells/ 9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1)", ["-name cf2 -jndiName 'jms/cf/cf2' -type CF -description 'Must remember to keep each of these connection factories in sync with the WebSphere MQ queue manager to which they refer' -qmgrName QM1 -qmgrHostname 192.168.0.22 -qmgrPort 1415 -qmgrSvrconnChannel QM1.SVRCONN"]) cf2(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# MQConnectionFactory_120532263601)
wsadmin>$AdminConfig getid /Node:9994GKCNode01 9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1) wsadmin>$AdminTask createWMQConnectionFactory 9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1) {-name cf2 -jndiName "jms/cf/cf2" -type CF -description "Must remember to keep each of these connection factories in sync with the WebSphere MQ queue manager to which they refer" -qmgrName QM1 -qmgrHostname 192.168.0.22 -qmgrPort 1415 -qmgrSvrconnChannel QM1.SVRCONN} cf2(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# MQConnectionFactory_120532263601)
In this information ...Related tasks
| IBM Redbooks, demos, education, and more(Index) |