JEUSの設定ファイル

本付録では、domain.xmlの内容と項目について説明します。

1. 概要

OpenFrame GWをJEUSと接続するために、以下のディレクトリに格納されているdomain.xmlにサーバーとリソースの情報を設定します。

${JEUS_HOME}/domains/<domain_name>/config/

2. サーバーの追加

OpenFrame GWがインストールされるサーバーの情報をdomain.xmlの<server>タグに設定します。

<server>
     <lifecycle-invocation>
            <class-name>com.tmax.ofgw.Main</class-name>
            <invocation>
               <invocation-method>
                  <method-name>init</method-name>
               </invocation-method>
               <invocation-type>READY</invocation-type>
            </invocation>
     </lifecycle-invocation>
     <lifecycle-invocation>
            <class-name>com.tmax.ofgw.Main</class-name>
            <invocation>
               <invocation-method>
                  <method-name>shutdown</method-name>
               </invocation-method>
               <invocation-type>BEFORE_UNDEPLOY</invocation-type>
            </invocation>
         </lifecycle-invocation>

     <data-sources>
          <data-source>ds1</data-source>
     </data-sources>
</server>

以下は、各項目についての説明です。

項目 説明

<lifecycle-invocation>

ドメイン内のすべてのサーバーに各種ライフサイクル・イベントを指定することができます。

<invocation-method>

呼び出しに使用されるメソッドを指定します。

<invocation-type>

メソッドが呼び出される時点を指定します。

  • READY : サーバーの起動後、登録されたアプリケーションがデプロイされ、サービスが準備された時点です。

  • BEFORE_UNDEPLOY : サーバーの起動後、登録されたアプリケーションがデプロイされる前の時点です。

<data-sources>

サーバーで使用可能なデータソースを指定します。

3. リソースの追加

domain.xmlの<resources>タグにOpenFrame GWが使用するリソース情報を設定します。

</servers>
...
<resources>
<data-source>
  <database>
    <data-source-id>ds1</data-source-id>
     <export-name>ds1</export-name>
     <data-source-class-name>com.tmax.tibero.jdbc.ext.TbConnectionPoolDataSource
     </data-source-class-name>
     <data-source-type>ConnectionPoolDataSource</data-source-type>
     <vendor>tibero</vendor>
     <server-name>192.168.33.225</server-name>
     <port-number>7629</port-number>
     <database-name>TVSAM</database-name>
     <user>tibero</user>
     <password>tmax</password>
     <login-timeout>0</login-timeout>
     <auto-commit>DRIVER</auto-commit>
     <stmt-query-timeout>0</stmt-query-timeout>
     <pool-destroy-timeout>10000</pool-destroy-timeout>
     <support-xa-emulation>false</support-xa-emulation>
     <connection-pool>
        <pooling>
           <min>2</min>
           <max>30</max>
           <step>1</step>
           <period>3600000</period>
        </pooling>
        <wait-free-connection>
           <enable-wait>false</enable-wait>
           <wait-time>10000</wait-time>
        </wait-free-connection>
        <max-use-count>0</max-use-count>
        <dba-timeout>-1</dba-timeout>
        <stmt-caching-size>-1</stmt-caching-size>
        <stmt-fetch-size>-1</stmt-fetch-size>
        <connection-trace>
           <enabled>false</enabled>
           <get-connection-trace>true</get-connection-trace>
           <auto-commit-trace>false</auto-commit-trace>
        </connection-trace>
        <use-sql-trace>false</use-sql-trace>
        <keep-connection-handle-open>false</keep-connection-handle-open>
     </connection-pool>
  </database>
  </data-source>
</resources>
...
</domain>

以下は、各項目についての説明です。

項目 説明

<data-source-id>

データソースのIDを指定します。<server>に指定した<data-source>と同じく指定します。

<export-name>

データソースのJNDI名を指定します。未設定時には、データソースのIDをJNDI名として使用します。OpenFrame GW設定ファイル(ofgw.properties)のdatasource.nameと同じ名前を指定します。

<data-source-class-name>

JDBCドライバーのデータソース・クラス名(パッケージ名を含む)を指定します。

<data-source-type>

データソースのタイプを指定します。

<vendor>

JDBCドライバーのベンダー名を指定します。

<server-name>

データベースが実行されるホスト名またはIPアドレスを指定します。

<port-number>

データベース・リスナーのポート番号を指定します。

<database-name>

データベース名を指定します。

<user>

データベースのユーザーIDを指定します。

<password>

データベースのユーザー・パスワードを指定します。

設定の詳細については、『JEUS XMLリファレンスガイド』を参照してください。