Configuring new WebSphere topics by using scripting

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:

Procedure

  1. Identify the parent ID:
    • Using Jacl:

      set v5jmsp [$AdminConfig getid "/Cell:mycell/Node:mynode/JMSProvider:WebSphere JMS Provider/"]
    • Using Jython:
      v5jmsp = AdminConfig.getid('/Cell:mycell/Node:myNode/JMSProvider:WebSphere JMS Provider/') 
      print v5jmsp
    Example output:
    "WebSphere JMS Provider(cells/mycell/nodes/mynode|resources.xml#builtin_jmsprovider)"
  2. Get required attributes:
    • Using Jacl:

      $AdminConfig required WASTopic
    • Using Jython:
      print AdminConfig.required('WASTopic')
    Example output:
    Attribute       Type
    name				   String
    jndiName			 String
    topic		      String
  3. Set up required attributes:
    • Using Jacl:

      set name [list name WAST1]
      set jndi [list jndiName jms/WAST1]
      set topic [list topic "Put your topic here"]
      set wtAttrs [list $name $jndi $topic]
      Example output:
      {name WAST1} {jndiName jms/WAST1} {topic {Put your topic here}}
    • Using Jython:
      name = ['name', 'WAST1']
      jndi = ['jndiName', 'jms/WAST1']
      topic = ['topic', "Put your topic here"]
      wtAttrs = [name, jndi, topic]
      print wtAttrs
      Example output:
      [[name, WAST1], [jndiName, jms/WAST1], [topic, "Put your topic here"]]
  4. Create the topic:
    • Using Jacl:

      $AdminConfig create WASTopic $v5jmsp $wtAttrs
    • Using Jython:
      print AdminConfig.create('WASTopic', v5jmsp, wtAttrs)
    Example output:
    WAST1(cells/mycell/nodes/mynode|resources.xml#WASTopic_1)
  5. Save the configuration changes.
  6. In a network deployment environment only, synchronize the node.



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic    

Terms of Use | Feedback

Last updated: Oct 22, 2010 12:21:29 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-nd-zos&topic=txml_wastopic
File name: txml_wastopic.html