Configuring new topic connection factories by using scripting

Use scripting and the wsadmin tool to configure new topic connection factories.

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

Note: 在下列範例中,開頭為 wsadmin> 的程式碼區塊顯示使用者所輸入的程式碼。 開頭不是 wsadmin> 的字行則顯示主控台所傳回的程式碼。

Procedure

  1. Identify the parent ID and assign in to a variable. In this example the variable is named v5jmsp.
    • Using Jacl:
      wsadmin>set v5jmsp [$AdminConfig getid "/Cell:mycell/Node:mynode/JMSProvider:WebSphere JMS Provider/"]
    • Using Jython:
      wsadmin>v5jmsp = AdminConfig.getid("/Cell:mycell/Node:myNode/JMSProvider:WebSphere JMS Provider/") 
      wsadmin>print v5jmsp
    Example output:
    "WebSphere JMS Provider(cells/mycell/nodes/mynode|resources.xml#builtin_jmsprovider)"
  2. Get required attributes:
    • Using Jacl:
      wsadmin>$AdminConfig required WASTopicConnectionFactory
    • Using Jython:
      wsadmin>print AdminConfig.required('WASTopicConnectionFactory')
    Example output:
    Attribute            Type
    name                 String
    jndiName             String
    port                 ENUM(DIRECT, QUEUED)
  3. Set up required attributes:
    • Using Jacl:
      wsadmin>set name [list name WASTCF]
      wsadmin>set jndi [list jndiName jms/WASTCF]
      wsadmin>set port [list port QUEUED]
      wsadmin>set mtcfAttrs [list $name $jndi $port]
      Example output:
      {name WASTCF} {jndiName jms/WASTCF} {port QUEUED}
    • Using Jython:
      wsadmin>name = ['name', 'WASTCF']
      wsadmin>jndi = ['jndiName', 'jms/WASTCF']
      wsadmin>port = ['port', 'QUEUED']
      wsadmin>mtcfAttrs = [name, jndi, port]
      wsadmin>print mtcfAttrs
      Example output:
      [[name, WASTCF], [jndiName, jms/WASTCF], [port, QUEUED]]
  4. Create was topic connection factories:
    • Using Jacl:
      wsadmin>$AdminConfig create WASTopicConnectionFactory $v5jmsp $mtcfAttrs
    • Using Jython:
      wsadmin>print AdminConfig.create('WASTopicConnectionFactory', v5jmsp, mtcfAttrs)
    Example output:
    WASTCF(cells/mycell/nodes/mynode|resources.xml#WASTopicConnectionFactory_1)
  5. Save the configuration changes.
  6. In a network deployment environment only, synchronize the node.

指出主題類型的圖示 作業主題



時間戳記圖示 前次更新: July 9, 2016 11:19
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_topiccf
檔名:txml_topiccf.html