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 topic 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 MQTopicConnectionFactory
print AdminConfig.required('MQTopicConnectionFactory')
Example output:
Attribute Type name String jndiName String
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 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)
$AdminConfig create MQTopicConnectionFactory $newjmsp $mqtcfAttrs $template
print AdminConfig.create('MQTopicConnectionFactory', newjmsp, mqtcfAttrs, template)
Example output:
MQTCF(cells/mycell/nodes/mynode:resources.xml#MQTopicConnectionFactory_1)
Related concepts
AdminConfig object for scripted administration
Related reference
Commands for the AdminConfig object