WebSphere Application Server, Version 6.1   
             オペレーティング・システム: AIX , HP-UX, Linux, Solaris, Windows, Windows Vista

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

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

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

始める前に

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

このタスクについて

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

プロシージャー

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

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

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

      set name [list name MQCF]
      set jndi [list jndiName jms/MQCF]
      set mqcfAttrs [list $name $jndi]
      出力例:
      {name MQCF} {jndiName jms/MQCF}
    • Jython を使用:
      name = ['name', 'MQCF']
      jndi = ['jndiName', 'jms/MQCF']
      mqcfAttrs = [name, jndi]
      print mqcfAttrs
      出力例:
      [[name, MQCF], [jndiName, jms/MQCF]]
  4. 以下のように、テンプレートをセットアップします。
    • Jacl を使用:

      set template [lindex [$AdminConfig listTemplates MQConnectionFactory] 0]
    • Jython を使用:
      import  java
      lineseparator = java.lang.System.getProperty('line.separator')
      template = AdminConfig.listTemplates('MQConnectionFactory').split(lineseparator)[0]
      print template
      
    出力例:
    Example non-XA WMQ ConnectionFactory(templates/
    system:JMS-resource-provider-templates.xml
    #MQConnectionFactory_3)
    
  5. MQ 接続ファクトリーを作成します。
    • Jacl を使用:

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



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

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

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