EDB PostgreSQL RM スイッチ モジュール

EDB PostgreSQL RM スイッチ モジュールのビルドに必要な情報について説明します。
重要: This topic applies to a feature that is in Early Adopter Program (EAP) release status. We intend to provide the finalized feature in a future release. Please contact Micro Focus SupportLine if you require further clarification.

EDB PostgreSQL モジュールは、PostgreSQL の SQL 呼び出しを利用して 2 フェーズ コミット サポートを提供し、このスイッチ モジュールを使用して行われたすべてのデータベース接続が必ず単一の XA トランザクションに参加するようにします。

PostgreSQL サーバーの XA 用の構成

重要: EDB PostgreSQL RM スイッチ モジュールを使用する前に、max_prepared_transactions プロパティの値をデフォルト値の 0 (ゼロ) から 0 よりも大きい値に変更して、PostgreSQL サーバーを構成する必要があります。この変更を行った後、次に進む前にサーバーを再起動する必要があります。max_prepared_transactions 構成プロパティの詳細については、PostgreSQL のドキュメントを参照してください。

Windows 環境

ソース コード
EDB PostgreSQL RM スイッチ モジュールの COBOL ソース ファイルである ESPGSQLXA.CBL は、デフォルトでは、%ProgramFiles(x86)%\Micro Focus\Enterprise Developer\src\enterpriseserver\xa ディレクトリに配置されています。
注: If you prefer to supply user credentials programatically rather than in the xa_open string, instructions for doing so are provided in the COBOL source file in the Customization section.
ビルド要件
EDB PostgreSQL RM スイッチ モジュールをビルドするには、使用している Windows のバージョン用の Windows ソフトウェア開発キット (SDK) がインストールされている必要があります。

このスイッチ モジュールをビルドする前に、Windows SDK LIB ディレクトリのサブディレクトリにある odbc32.lib ファイルのパスが LIB 環境変数に含まれていることを確認してください。

スイッチ モジュールのビルド
方法 1
  1. 管理者として、アプリケーションに応じて 32 ビットまたは 64 ビットの Enterprise Developer command promptを起動します。
  2. %ProgramFiles(x86)%\Micro Focus\Enterprise Developer\src\enterpriseserver\xa ディレクトリ (デフォルトの場所) に移動します。
  3. 次のように入力します。 build pg [directives]
方法 2
  1. アプリケーションに応じて 32 ビットまたは 64 ビットの Enterprise Developer command promptを起動します。
  2. %ProgramFiles(x86)%\Micro Focus\Enterprise Developer\src\enterpriseserver\xa ディレクトリ (デフォルトの場所) にあるすべてのファイルを、WRITE 権限がある任意の場所にコピーします。
  3. コピーしたファイルが含まれているディレクトリに移動します。
  4. 次のように入力します。 build pg [directives]
ビルド出力
ビルド プロセスによって、ESPGSQLXA.CBL COBOL ソース ファイルから、バイナリ形式の次の 2 つのスイッチ モジュール ファイルが生成されます。
バイナリ ファイル タイプ
ESPGSQLXA_S.DLL 静的
ESPGSQLXA.DLL 動的

You can register an RM switch module with Enterprise Server dynamically, or register it statically depending on which binary file you use. We recommend that you use the dynamic switch module option, as this ensures that only active databases used in the global transaction participate in the TM/RM XA flow.

UNIX 環境

ソース コード
EDB PostgreSQL RM スイッチ モジュールの COBOL ソース ファイルである ESPGSQLXA.CBL は、デフォルトでは、$COBDIR/src/enterpriseserver/xa ディレクトリに配置されています。
注: If you prefer to supply user credentials programatically rather than in the xa_open string, instructions for doing so are provided in the COBOL source file in the Customization section.
ビルド要件
ビルド スクリプトでは、現在の有効な作業モードを使用して、スイッチ モジュールのビルド方法が決定されます。
スイッチ モジュールのビルド
$COBDIR/src/enterpriseserver/xa ディレクトリには、スイッチ モジュールのビルドに使用できる build スクリプト ファイルが含まれています。
  1. $COBDIR/src/enterpriseserver/xa ディレクトリ (デフォルトの場所) にあるすべてのファイルを、WRITE 権限がある任意の場所にコピーします。
  2. コピーしたファイルが含まれているディレクトリに移動します。
  3. 次のように入力します。 build pg
ビルド出力
ビルド プロセスによって、ESPGSQLXA.CBL COBOL ソース ファイルから、バイナリ形式の次の 4 つの RM スイッチ モジュール ファイルが生成されます。
ESPGSQLXA.so 32 ビット 動的
ESPGSQLXA64.so 64 ビット 動的
ESPGSQLXA_S.so 32 ビット 静的
ESPGSQLXA64_S.so 64 ビット 静的

You can register an RM switch module with Enterprise Server dynamically, or register it statically depending on which binary file you use. We recommend that you use the dynamic switch module option, as this ensures that only active databases used in the global transaction participate in the TM/RM XA flow.

すべての環境

追加リソース
EDB PostgreSQL RM スイッチ モジュールの使い方の詳細については、「EDB PostgreSQL xa_open 文字列」を参照してください。