Configure new MQ queue connection factories using scripting

 

Procedure

  1. Start wsadmin

  2. Identify the parent ID:

    • Jacl:

      set newjmsp [$AdminConfig getid /Cell:mycell/Node:mynode/JMSProvider:JMSP1/]
      

    • Jython

      newjmsp = AdminConfig.getid('/Cell:mycell/Node:myNode/JMSProvider:JMSP1')
      print newjmsp
      

    Example output:

    JMSP1(cells/mycell/nodes/mynode|resources.xml#JMSProvider_1)
    

  3. Get required attributes:

    • Jacl:

      $AdminConfig required MQQueueConnectionFactory
      

    • Jython

      print AdminConfig.required('MQQueueConnectionFactory')
      

    Example output:

    Attribute       Type
    name           String
    jndiName       String
    

  4. Set up required attributes:

    • Jacl:

      set name [list name MQQCF]
      set jndi [list jndiName jms/MQQCF]
      set mqqcfAttrs [list $name $jndi]
      

      Example output:

      {name MQQCF} {jndiName jms/MQQCF}
      

    • Jython

      name = ['name', 'MQQCF']
      jndi = ['jndiName', 'jms/MQQCF']
      mqqcfAttrs = [name, jndi]
      print mqqcfAttrs
      

      Example output:

      [[name, MQQCF], [jndiName, jms/MQQCF]]
      

  5. Set up a template:

    • Jacl:

      set template [lindex [$AdminConfig listTemplates MQQueueConnectionFactory] 0]
      

    • Jython

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

    Example output:

    Example non-XA WMQ QueueConnectionFactory(templates/
    system:JMS-resource-provider-templates.xml
    #MQQueueConnectionFactory_3)
    
    

  6. Create MQ queue connection factory:

    Example output:

    MQQCF(cells/mycell/nodes/mynode:resources.xml#MQQueueConnectionFactory_1)
    

  7. In a network deployment environment only, synchronize the node.


 

See Also


AdminConfig object for scripted administration

 

See Also


Commands for the AdminConfig object