WebSphere Application Server for i5/OS, Version 6.1   
             オペレーティング・システム: i5/OS

             目次と検索結果のパーソナライズ化

スクリプトによる新規 MQ キュー接続ファクトリーの構成

スクリプトを使用して、新規の MQ キュー接続ファクトリーを構成できます。

始める前に

このタスクを開始する場合は、あらかじめ wsadmin ツールが稼働 している必要があります。 詳しくは、wsadmin スクリプト・クライアントの開始 の項目を参照してください。

このタスクについて

以下のステップを実行して、新規 MQ キュー接続ファクトリーを構成します。

プロシージャー

  1. 以下のように、親 ID を識別する。
    • Jacl を使用:

      set newjmsp [$AdminConfig getid /Cell:mycell/Node:mynode/JMSProvider:JMSP1/]
    • Jython を使用:
      newjmsp = AdminConfig.getid('/Cell:mycell/Node:myNode/JMSProvider:JMSP1')
      print newjmsp
    出力例:
    JMSP1(cells/mycell/nodes/mynode|resources.xml#JMSProvider_1)
  2. 以下のように、必須の属性を取得する。
    • Jacl を使用:

      $AdminConfig required MQQueueConnectionFactory
    • Jython を使用:
      print AdminConfig.required('MQQueueConnectionFactory')
    出力例:
    Attribute            Type
    name				   String
    jndiName			 String
  3. 以下のように、必須の属性をセットアップする。
    • Jacl を使用:

      set name [list name MQQCF]
      set jndi [list jndiName jms/MQQCF]
      set mqqcfAttrs [list $name $jndi]
      出力例:
      {name MQQCF} {jndiName jms/MQQCF}
    • Jython を使用:
      name = ['name', 'MQQCF']
      jndi = ['jndiName', 'jms/MQQCF']
      mqqcfAttrs = [name, jndi]
      print mqqcfAttrs
      出力例:
      [[name, MQQCF], [jndiName, jms/MQQCF]]
  4. 以下のように、テンプレートをセットアップします。
    • 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 non-XA WMQ QueueConnectionFactory(templates/
    system:JMS-resource-provider-templates.xml
    #MQQueueConnectionFactory_3)
    
  5. 以下のように MQ キュー接続ファクトリーを作成する。
    • Jacl を使用:

      $AdminConfig createUsingTemplate MQQueueConnectionFactory $newjmsp $mqqcfAttrs $template
    • Jython を使用:
      print AdminConfig.createUsingTemplate('MQQueueConnectionFactory', 
      newjmsp, mqqcfAttrs, template)
    出力例:
    MQQCF(cells/mycell/nodes/mynode:resources.xml#MQQueueConnectionFactory_1)
  6. 構成の変更を保管します。詳しくは、wsadmin ツールによる構成変更の保管 の項目を参照してください。



関連タスク
スクリプト管理のための AdminConfig オブジェクトの使用
関連資料
AdminConfig オブジェクトのコマンド
タスク・トピック    

ご利用条件 | フィードバック

最終更新: Jan 21, 2008 5:46:14 PM EST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.base.iseries.doc/info/iseries/ae/txml_mqconnection.html