Set new WebSphere topics using scripting
Configure new WebSphere topics using wsadmin and scripting.
Before starting this task, wsadmin must be running. See the Start wsadmin article for more information.
Perform the following steps to configure a new WebSphere topic:
- Identify the parent ID:
- Jacl...
set v5jmsp [$AdminConfig getid "/Cell:mycell/Node:mynode/JMSProvider:WebSphere JMS Provider/"]- Jython...
v5jmsp = AdminConfig.getid('/Cell:mycell/Node:myNode/JMSProvider:WebSphere JMS Provider/')
print v5jmsp
For example...
"WebSphere JMS Provider(cells/mycell/nodes/mynode|resources.xml#builtin_jmsprovider)"- Get required attributes:
For example...
Attribute Type name String jndiName String topic String- Set up required attributes:
- Jacl...
set name [list name WAST1]
set jndi [list jndiName jms/WAST1]
set topic [list topic "Put the topic here"]
set wtAttrs [list $name $jndi $topic]For example...
{name WAST1} {jndiName jms/WAST1} {topic {Put the topic here}}- Jython...
name = ['name', 'WAST1'] jndi = ['jndiName', 'jms/WAST1'] topic = ['topic', "Put the topic here"] wtAttrs = [name, jndi, topic]
print wtAttrsFor example...
[[name, WAST1], [jndiName, jms/WAST1], [topic, "Put the topic here"]]
- Create was topic:
- Jacl...
$AdminConfig create WASTopic $v5jmsp $wtAttrs- Jython...
print AdminConfig.create('WASTopic', v5jmsp, wtAttrs)
For example...
WAST1(cells/mycell/nodes/mynode|resources.xml#WASTopic_1)- Save the configuration changes. See the Saving configuration changes with wsadmin article for more information.
- In a network deployment environment only, synchronize the node. See the Synchronizing nodes with wsadmin article for more information.
Related tasks
Use the AdminConfig object for scripted administration
Related
Commands for the AdminConfig object