Use the createWMQConnectionFactory command to create a connection factory for the WebSphere® MQ messaging provider at a specific scope.
To run the command, use the AdminTask object of the wsadmin scripting client.
This command is valid only when it is used with WebSphere Application Server Version 7 and later application servers. Do not use it with earlier versions.
print AdminTask.help('WMQAdminCommands')
print AdminTask.help('command_name')
AdminConfig.save()
Use the createWMQConnectionFactory command to create a WebSphere MQ messaging provider connection factory at a specific scope.
The scope of the WebSphere MQ messaging provider at which the WebSphere MQ messaging provider connection factory is to be created.
CF is the default value.
Use this parameter to create a ccdtURL connection factory
Do not specify this parameter in conjunction with the following parameters: -qmgrName, -qmgrHostname, -qmgrPortNumber, -qmgrSvrconnChannel, –wmqTransportType or -localAddress.
Do not specify this parameter in conjunction with the following parameters: -qmgrName, -qmgrHostname, -qmgrPortNumber, -qmgrSvrconnChannel, –wmqTransportType, or -localAddress.
Use this parameter to create a generic connection factory.
Do not specify this parameter in conjunction with the following parameters: -ccdtUrl or -ccdtQmgrName.
Use this parameter to create a generic connection factory.
The default value is BINDINGS_THEN_CLIENT.
Do not specify this parameter in conjunction with the following parameters: -ccdtUrl or -ccdtQmgrName.
For more information about configuring a transport type of BINDINGS_THEN_CLIENT or BINDINGS, refer to Configuring the WebSphere MQ messaging provider with native libraries information.
The default value is the local host.
Do not specify this parameter in conjunction with the following parameters: -ccdtUrl or -ccdtQmgrName.
-qmgrHostname parameter in conjunction with the -connectionNameList parameter, see the description of the -connectionNameList parameter.
For information on setting theEnter an integer value in the range 1 - 65536 (inclusive).
The default value is 1414.
Do not specify this parameter in conjunction with the following parameters: -ccdtUrl or -ccdtQmgrName.
-qmgrPortNumber parameter in conjunction with the -connectionNameList parameter, see the description of the -connectionNameList parameter.
For information on setting theThe -connectionNameList parameter must be entered as a comma separated list of host names and ports in the following format:
host(port),host(port)
For host enter a valid TCP/IP host name, IPv4 or IPv6 address.
For port enter an integer value between 1 and 65536 (inclusive). Specifying a value for port is optional. When you do not specify a value, port defaults to 1414.
For example: localhost(1234),remotehost1(1234),remotehost2
When you specify the -connectionNameList parameter, the -qmgrHostname and -qmgrPortNumber parameters are automatically set to the host name and port number of the first entry in the connection name list. This overrides any values that you previously specified in the -qmgrHostname and -qmgrPortNumber parameters.
In the preceding example this would mean that -qmgrHostname would be localhost and -qmgrPortNumber would be 1234.
If a WebSphere MQ messaging provider connection factory that is based on a connection name list is used by an application client or server that is running a version of WebSphere Application Server earlier than Version 8.0, the -connectionNameList information is not used. Instead, the values specified in the -qmgrHostname and –qmgrPortNumber are used, and are set to the relevant values from the first entry in the connectionNameList parameter.
You must not specify the connectionNameList parameter in conjunction with the -ccdtUrl or -ccdtQmgrName parameters.
For more information on using multi-instance queue managers see the WebSphere MQ information center.
where n is an integer greater than or equal to zero.
For example 6.0.0.0
Enter a value in the range 0 through 999,999,999.
The default value is 0.
Do not specify this parameter unless you specify the -rcvExit parameter.
Do not specify this parameter unless you specify the -sendExit parameter.
Do not specify this parameter unless you specify the -secExit parameter.
The default value is NONE.
The default value is NONE.
where YES specifies that the connection consumer keeps unwanted messages on the input queue, and NO specifies that the messages are disposed of according to their disposition options.
The default value is YES.
This parameter must be a positive integer value.
The default value is 5000.
The value of this parameter must be a positive integer. See the WebSphere MQ messaging provider connection factory advanced properties for more details.
The default value is 819.
The value of this parameter must be true or false.
true specifies that calls to certain methods fail if the queue manager is in a quiescing state. If an application detects that the queue manager is quiescing, the application can complete its immediate task and close the connection, allowing the queue manager to stop.
false specifies that no methods fail if the queue manager is in a quiescing state. If you specify this value, an application cannot detect that the queue manager is quiescing. The application might continue to perform operations against the queue manager, and therefore prevent the queue manager from stopping.
The default value is true.
The default value is SYSTEM.BROKER.CONTROL.QUEUE.
The default value is SYSTEM.JMS.ND.SUBSCRIBER.QUEUE.
The default value is SYSTEM.JMS.ND.CC.SUBSCRIBER.QUEUE.
Valid values are 1 and 2.
The default value is 1.
Valid values are CLIENT and BROKER.
The default value is CLIENT.
Valid values are MIGRATE, QUEUE and BROKER.
The default value is MIGRATE.
The value of this parameter must be a positive integer.
The default value is 60,000.
Valid values are SAFE, NONE, ASPROP, and STRONG.
The default value is SAFE.
The value of this parameter must be a positive integer.
The default value is 3,600,000.
Valid values are Topic or Char.
The default value is Topic.
The value of this parameter must be true or false
The default value is false.
There is no default value.
The value of this parameter must be ENABLED or DISABLED
The default value is DISABLED.
Use this parameter to create an explicitly defined connection factory.
The default value is SYSTEM.DEF.SVRCONN.
Do not specify this parameter in conjunction with the following parameters: -ccdtUrl or -ccdtQmgrName.
The value of this parameter must be True or False.
The default value True specifies that the connection factory acts as a resource that is capable of participation in distributed two-phase commit processing.
The default value is SYSTEM.DEFAULT.MODEL.QUEUE.
There is no default value.
There is no default value.
The value of this parameter must be ALWAYS or AS_REPLY_DEST
The default value is AS_REPLY_DEST.
The default value is SYSTEM.BROKER.DEFAULT.STREAM.
The value of this parameter must be a positive integer greater than zero.
The default value is 25.
The value of this parameter must be CENTRAL, SPECIFIC or NONE
The default value is NONE.
The sslConfiguration parameter is not valid unless this parameter is set to the value SPECIFIC.
The value of this parameter must correspond to an SSL configuration.
Do not specify this parameter unless the parameter -sslType is assigned the value SPECIFIC.
Do not specify this parameter in conjunction with the following parameters: -ccdtUrl or -ccdtQmgrName.
The default value is DefaultPrincipleMapping.
There is no default value.
The following example creates an connection factory, specifying the minimum number of parameters. 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)
The following example creates an connection factory that uses a CCDT to locate the queue manager to connect to.
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 cf3 -jndiName 'jms/cf/cf3' -type CF -ccdtUrl 'http://gorillaaction:9080/ccdt/amqclchl.tab' -ccdtQmgrName QM3"]) cf3(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# MQConnectionFactory_120532263606)
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 cf3 -jndiName "jms/cf/cf3" -type CF -ccdtUrl "http://gorillaaction:9080/ccdt/amqclchl.tab" -ccdtQmgrName QM3} cf3(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# MQConnectionFactory_120532263606)