Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.
Perform the following steps to configure a new MQ queue connection factory:
set newjmsp [$AdminConfig getid /Cell:mycell/Node:mynode/JMSProvider:JMSP1/]
newjmsp = AdminConfig.getid('/Cell:mycell/Node:myNode/JMSProvider:JMSP1') print newjmsp
Example output:
JMSP1(cells/mycell/nodes/mynode|resources.xml#JMSProvider_1)
$AdminConfig required MQQueueConnectionFactory
print AdminConfig.required('MQQueueConnectionFactory')
Example output:
Attribute Type name String jndiName String
set name [list name MQQCF] set jndi [list jndiName jms/MQQCF] set mqqcfAttrs [list $name $jndi]Example output:
{name MQQCF} {jndiName jms/MQQCF}
name = ['name', 'MQQCF'] jndi = ['jndiName', 'jms/MQQCF'] mqqcfAttrs = [name, jndi] print mqqcfAttrsExample output:
[[name, MQQCF], [jndiName, jms/MQQCF]]
set template [lindex [$AdminConfig listTemplates MQQueueConnectionFactory] 0]
import java lineseparator = java.lang.System.getProperty('line.separator') template = AdminConfig.listTemplates('MQQueueConnectionFactory').split(lineseparator)[0] print template
Example output:
Example non-XA WMQ QueueConnectionFactory(templates/ system:JMS-resource-provider-templates.xml #MQQueueConnectionFactory_3)
$AdminConfig createUsingTemplate MQQueueConnectionFactory $newjmsp $mqqcfAttrs $template
print AdminConfig.createUsingTemplate('MQQueueConnectionFactory', newjmsp, mqqcfAttrs, template)
Example output:
MQQCF(cells/mycell/nodes/mynode:resources.xml#MQQueueConnectionFactory_1)
Related concepts
AdminConfig object for scripted administration
Related reference
Commands for the AdminConfig object