Configure new MQ topic 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 MQTopicConnectionFactory print AdminConfig.required('MQTopicConnectionFactory')
Example output:
Attribute Type name String jndiName String- Set up required attributes:
Jacl:
set name [list name MQTCF] set jndi [list jndiName jms/MQTCF] set mqtcfAttrs [list $name $jndi]Example output:
{name MQTCF} {jndiName jms/MQTCF} name = ['name', 'MQTCF'] jndi = ['jndiName', 'jms/MQTCF'] mqtcfAttrs = [name, jndi] print mqtcfAttrsExample output:
[[name, MQTCF], [jndiName, jms/MQTCF]]
- Set up a template:
Jacl:
set template [lindex [$AdminConfig listTemplates MQTopicConnectionFactory] 0] import java lineseparator = java.lang.System.getProperty('line.separator') template = AdminConfig.listTemplates('MQTopicConnectionFactory').split(lineseparator)[0] print template
Example output:
Example non-XA WMQ TopicConnectionFactory(templates/system: JMS-resource-provider-templates.xml #MQTopicConnectionFactory_5)- Create mq topic connection factory:
Jacl:
$AdminConfig create MQTopicConnectionFactory $newjmsp $mqtcfAttrs $template $AdminConfig save print AdminConfig.create('MQTopicConnectionFactory', newjmsp, mqtcfAttrs, template)
Example output:
MQTCF(cells/mycell/nodes/mynode:resources.xml#MQTopicConnectionFactory_1)- In a network deployment environment only, synchronize the node.
See Also
AdminConfig object for scripted administration
See Also
Commands for the AdminConfig object