Configure new MQ queue connection factories using scripting
Procedure
- Start wsadmin
- Identify the parent ID:
Jacl:
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)- Get required attributes:
Jacl:
$AdminConfig required MQQueueConnectionFactory print AdminConfig.required('MQQueueConnectionFactory')
Example output:
Attribute Type name String jndiName String- Set up required attributes:
Jacl:
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 up a template:
Jacl:
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)- Create MQ queue connection factory:
Jacl:
$AdminConfig createUsingTemplate MQQueueConnectionFactory $newjmsp $mqqcfAttrs $template $AdminConfig save print AdminConfig.createUsingTemplate('MQQueueConnectionFactory', newjmsp, mqqcfAttrs, template)
Example output:
MQQCF(cells/mycell/nodes/mynode:resources.xml#MQQueueConnectionFactory_1)- In a network deployment environment only, synchronize the node.
See Also
AdminConfig object for scripted administration
See Also
Commands for the AdminConfig object