Use the createWMQActivationSpec command to create an activation specification 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 createWMQActivationSpec command to create a WebSphere MQ messaging provider activation specification at a specific scope.
The scope of the WebSphere MQ messaging provider at which the WebSphere MQ messaging provider activation specification is to be created.
There is no default value.
Use this parameter to create ccdtURL activation specifications
Do not specify this parameter in conjunction with the following parameters: -qmgrName, -qmgrType, -qmgrHostname, -qmgrPortNumber, -qmgrSvrconnChannel, or -localAddress.
You must specify this parameter if the -transportType has been specified as client or bindingsThenClient.
Do not specify this parameter in conjunction with the following parameters: -qmgrName, -qmgrType, -qmgrHostname, -qmgrPortNumber, -qmgrSvrconnChannel, or -localAddress.
Use this parameter to create generic activation specifications.
Do not specify this parameter in conjunction with the following parameters: -ccdtUrl or -ccdtQmgrName.
Use this parameter to create generic activation specifications.
BINDINGS_THEN_CLIENT is the default value.
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),remotehost(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.
The -connectionNameList parameter is only valid for use in WebSphere Application Server Version 8.0.
[29/09/10 12:15:27:468 BST] 00000018 J2CUtilityCla W J2CA0008W: Class com.ibm.mq.connector.inbound.ActivationSpecImpl used by resource cells/L3A3316Node01Cell/resources.xml#J2CResourceAdapter_1284547647859 did not contain method setConnectionNameList. Processing continued.You can ignore this message.
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 and must be one of the CCSIDs supported by WebSphere MQ. See the WebSphere MQ messaging provider activation specification 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 Char.
The value of this parameter must be true or false
The default value is false.
The value of this parameter must be ENABLED or DISABLED
The default value is DISABLED.
Use this parameter to create explicitly defined activation specifications.
The default value is SYSTEM.DEF.SVRCONN.
Do not specify this parameter in conjunction with the following parameters: -ccdtUrl or -ccdtQmgrName.
The default value is SYSTEM.JMS.D.CC.SUBSCRIBER.QUEUE.
The value of this parameter must be a positive integer.
The default value is 10.
The value of this parameter must be either the empty string or a valid SQL 92 statement.
The value of this parameter must be a positive integer.
The default value is 300,000.
The value of this parameter must be a positive integer.
The default value is 10,000.
The value of this parameter must be Durable or Nondurable
The default value is Nondurable.
For example, -WAS_EndpointInitialState is a custom property that can be used with the -customProperties parameter. The value of -WAS_EndpointInitialState must be ACTIVE or INACTIVE. -WAS_EndpointInitialState determines whether the endpoint is activated when the endpoint is registered. If the parameter is set to active, message consumption begins from the JMS destination as soon as the activation specification is used for a message-driven bean to connect with the destination.
This parameter should be ignored for subsequent activation or deactivation via the J2CMessageEndpoint MBean.
Do not specify this parameter in conjunction with the following parameters: -ccdtUrl or -ccdtQmgrName.
The value of this parameter must be CENTRAL, SPECIFIC or NONE
The -sslConfiguration parameter is not valid unless this parameter is set to SPECIFIC.
The default value is NONE.
Do not specify this parameter unless the parameter -sslType is assigned the value SPECIFIC.
The value of this parameter must correspond to an SSL configuration.
There is no default value.
The value of this parameter must be true or false.
The default value is true.
The value of this parameter must be a non-negative integer.
The default value is 0, which means that the endpoint is stopped the first time it fails.
The following example creates an activation specification, specifying the minimum number of parameters. Due to the default values assumed for the unspecified parameters, MDBs deployed by using this activation specification are co-located with a generic queue manager installed on the same node.
wsadmin>AdminConfig.getid("/Node:9994GKCNode01") 9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1) wsadmin>AdminTask.createWMQActivationSpec("9994GKCNode01(cells/9994GKCNode01Cell/ nodes/9994GKCNode01|node.xml#Node_1)", ["-name spec1 -jndiName jms/as/spec1 -destinationJndiName jms/queues/q1 -destinationType javax.jms.Queue"]) spec1(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CActivationSpec_1098737234986)
wsadmin>$AdminConfig getid /Node:9994GKCNode01 9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1) wsadmin>$AdminTask createWMQActivationSpec 9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1) {-name spec1 -jndiName jms/as/spec1 -destinationJndiName jms/queues/q1 -destinationType javax.jms.Queue} spec1(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CActivationSpec_1098737234986)
The following example creates an activation specification 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.createWMQActivationSpec("9994GKCNode01(cells/9994GKCNode01Cell/ nodes/9994GKCNode01|node.xml#Node_1)", ["-name spec2 -jndiName 'jms/as/spec2' -destinationJndiName 'jms/topics/t2' -destinationType javax.jms.Topic -description 'Must remember to keep each of these activation specifications in sync with the WebSphere MQ queue manager to which they refer' -qmgrName QM1 -qmgrHostname 192.168.0.22 -qmgrPort 1415 -qmgrSvrconnChannel QM1.SVRCONN"]) spec2(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CActivationSpec_1098737234987)
wsadmin>$AdminConfig getid /Node:9994GKCNode01 9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1) wsadmin>$AdminTask createWMQActivationSpec 9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1) {-name spec2 -jndiName "jms/as/spec2" -destinationJndiName "jms/topics/t2" -destinationType javax.jms.Topic -description "Must remember to keep each of these activation specifications in sync with the WebSphere MQ queue manager to which they refer" -qmgrName QM1 -qmgrHostname 192.168.0.22 -qmgrPort 1415 -qmgrSvrconnChannel QM1.SVRCONN} spec2(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CActivationSpec_1098737234987)
The following example creates an activation specification that uses a CCDT to locate the queue manager to connect to.
wsadmin>AdminConfig.getid("/Node:9994GKCNode019994GKCNode01(cells/ 9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1)") wsadmin>AdminTask.createWMQActivationSpec("9994GKCNode01(cells/9994GKCNode01Cell/ nodes/9994GKCNode01|node.xml#Node_1)", ["-name spec3 -jndiName 'jms/as/spec3' -destinationJndiName 'jms/queue/q3' -destinationType javax.jms.Queue -ccdtUrl 'http://gorillaaction:9080/ccdt/amqclchl.tab' -ccdtQmgrName QM3"]) spec3(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CActivationSpec_1098737234988)
wsadmin>$AdminConfig getid /Node:9994GKCNode01 9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1) wsadmin>$AdminTask createWMQActivationSpec 9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1) {-name spec3 -jndiName "jms/as/spec3" -destinationJndiName "jms/queue/q3" -destinationType javax.jms.Queue -ccdtUrl "http://gorillaaction:9080/ccdt/ amqclchl.tab" -ccdtQmgrName QM3} spec3(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CActivationSpec_1098737234988)
wsadmin>attrs = '[[name "WAS_EndpointInitialState"] [required "false"] [type "java.lang.String"] [value "ACTIVE"]]' wsadmin>AdminConfig.getid("/Node:myNode01") myNode01(cells/myCell01/nodes/myNode01|node.xml#Node_1)' wsadmin>theActSpec = AdminTask.createWMQActivationSpec("myNode01(cells/myCell01/nodes/myNode01|node.xml#Node_1)", '-name testas -jndiName testas -destinationJndiName testq -destinationType javax.jms.Queue -customProperties [[WAS_EndpointInitialState Active]]')