+

Search Tips   |   Advanced Search

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:

 

  1. 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)"

  2. Get required attributes:

    • Jacl...

      $AdminConfig required WASTopic
    • Jython...

      print AdminConfig.required('WASTopic')

    For example...

    Attribute Type name String jndiName String topic String

  3. 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 wtAttrs

      For example...

      [[name, WAST1], [jndiName, jms/WAST1], [topic, "Put the topic here"]]

  4. 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)

  5. Save the configuration changes. See the Saving configuration changes with wsadmin article for more information.

  6. 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