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

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

スクリプトによる新規データ・ソース・カスタム・プロパティーの構成

wsadmin ツールとスクリプトを使用して、新規のデータ・ソース・カスタム・プロパティーを構成できます。

始める前に

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

このタスクについて

以下のステップを実行して、新規データ・ソース・カスタム・プロパティーを構成します。

プロシージャー

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

      set newds [$AdminConfig getid /Cell:mycell/Node:mynode/JDBCProvider:JDBC1/DataSource:DS1/]
    • Jython を使用:
      newds = AdminConfig.getid('/Cell:mycell/Node:mynode/JDBCProvider:JDBC1/DataSource:DS1/')
      print newds
    出力例:
    DS1(cells/mycell/nodes/mynode|resources.xml$DataSource_1)
  2. 以下のように、J2EE リソース・プロパティー・セットを取得する。
    • Jacl を使用:

      set propSet [$AdminConfig showAttribute $newds propertySet]
    • Jython を使用:
      propSet = AdminConfig.showAttribute(newds, 'propertySet')
      print propSet
    出力例:
    (cells/mycell/nodes/mynode|resources.xml#J2EEResourcePropertySet_8)
  3. 以下のように、必須の属性を取得する。
    • Jacl を使用:

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

      set name [list name RP4]
      set rpAttrs [list $name]
    • Jython を使用:
      name = ['name', 'RP4']
      rpAttrs = [name]
  5. 以下のように、J2EE リソース・プロパティーを作成する。
    • Jacl を使用:

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



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

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

最終更新: Jan 21, 2008 11:31:28 PM EST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/txml_configcustom.html