You can configure new WebSphere topics by using the wsadmin
tool and scripting.
Before you begin
Before starting this task, the wsadmin tool must be running.
About this task
Complete the following steps to configure a new WebSphere
topic:
Note: In the following examples, code blocks beginning
with wsadmin> show code that is entered by the user.
Lines that do not begin with wsadmin> show code that
has been returned by the console.
Procedure
- Identify the parent ID and assign in to a variable. In
this example the variable is named v5jmsp.
- Using Jacl:
wsadmin>set v5jmsp [$AdminConfig getid "/Cell:mycell/Node:mynode/JMSProvider:WebSphere JMS Provider/"]
- Using Jython:
wsadmin>v5jmsp = AdminConfig.getid("/Cell:mycell/Node:myNode/JMSProvider:WebSphere JMS Provider/")
wsadmin>print v5jmsp
Example output:
"WebSphere JMS Provider(cells/mycell/nodes/mynode|resources.xml#builtin_jmsprovider)"
- Get required attributes:
Example output:
Attribute Type
name String
jndiName String
topic String
- Set up required attributes:
- Using Jacl:
wsadmin>set name [list name WAST1]
wsadmin>set jndi [list jndiName jms/WAST1]
wsadmin>set topic [list topic "Put your topic here"]
wsadmin>set wtAttrs [list $name $jndi $topic]
Example
output:
{name WAST1} {jndiName jms/WAST1} {topic {Put your topic here}}
- Using Jython:
wsadmin>name = ['name', 'WAST1']
wsadmin>jndi = ['jndiName', 'jms/WAST1']
wsadmin>topic = ['topic', "Put your topic here"]
wsadmin>wtAttrs = [name, jndi, topic]
wsadmin>print wtAttrs
Example output:
[[name, WAST1], [jndiName, jms/WAST1], [topic, "Put your topic here"]]
- Create the topic:
- Using Jacl:
wsadmin>$AdminConfig create WASTopic $v5jmsp $wtAttrs
- Using Jython:
wsadmin>print AdminConfig.create('WASTopic', v5jmsp, wtAttrs)
Example output:
WAST1(cells/mycell/nodes/mynode|resources.xml#WASTopic_1)
- Save the configuration changes.
- In
a network deployment environment only, synchronize the node.