+

Search Tips   |   Advanced Search

Set new WebSphere queue connection factories using scripting


Use scripting and wsadmin to configure new queue connection factories in WAS.

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 connection factory:

 

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

      print AdminConfig.required('WASQueueConnectionFactory')

    For example...

    Attribute Type name String jndiName String

  3. Set up required attributes:

    • Jacl...

      set name [list name WASQCF]
      set jndi [list jndiName jms/WASQCF]
      set mqcfAttrs [list $name $jndi]

      For example...

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

      name = ['name', 'WASQCF']
      jndi = ['jndiName', 'jms/WASQCF']
      mqcfAttrs = [name, jndi]
      print mqcfAttrs

      For example...

      [[name, WASQCF], [jndiName, jms/WASQCF]]

  4. Set up a template:

    • Jacl...

      set template [lindex [$AdminConfig listTemplates WASQueueConnectionFactory] 0]
    • Jython...

      lineseparator = java.lang.System.getProperty('line.separator')
      template = AdminConfig.listTemplates('WASQueueConnectionFactory').split(lineseparator)[0]
      print template

  5. Create was queue connection factories:

    • Jacl...

      $AdminConfig createUsingTemplate WASQueueConnectionFactory $v5jmsp $mqcfAttrs $template
    • Jython...

      AdminConfig.createUsingTemplate('WASQueueConnectionFactory', v5jmsp, mqqcfAttrs, template)

    For example...

    WASQCF(cells/mycell/nodes/mynode|resources.xml#WASQueueConnectionFactory_1)

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

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