Configuring new topics by using scripting

You can configure new 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 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 the 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 the 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.



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 Task topic    

Terms of Use | Feedback

Last updatedLast updated: Sep 19, 2011 6:15:55 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-express-dist&topic=txml_wastopic
File name: txml_wastopic.html