+

Search Tips   |   Advanced Search

Set new WebSphere queues using scripting


Use scripting to configure a new WebSphere queue.

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 queue:

 

  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 WASQueue
    • Jython...

      print AdminConfig.required('WASQueue')

    For example...

    Attribute Type name String jndiName String

  3. Set up required attributes:

    • Jacl...

      set name [list name WASQ1] set jndi [list jndiName jms/WASQ1] set wqAttrs [list $name $jndi]

      For example...

      {name WASQ1} {jndiName jms/WASQ1}
    • Jython...

      name = ['name', 'WASQ1'] jndi = ['jndiName', 'jms/WASQ1'] wqAttrs = [name, jndi] print wqAttrs

      For example...

      [[name, WASQ1], [jndiName, jms/WASQ1]]

  4. Create was queue:

    • Jacl...

      $AdminConfig create WASQueue $v5jmsp $wqAttrs
    • Jython...

      print AdminConfig.create('WASQueue', v5jmsp, wqAttrs)

    For example...

    WASQ1(cells/mycell/nodes/mynode|resources.xml#WASQueue_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