Oracle RM Switch Module

Provides the information required to build an Oracle RM switch module.

We support Oracle RM switch modules for both Oracle 11 and Oracle 12 databases.

Windows Environments

Source Code
The Oracle RM switch module COBOL source file, ESORAXA.CBL is located by default in the %ProgramFiles(x86)%\Micro Focus\Enterprise Developer\src\enterpriseserver\xa directory.
Note: 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.
Building the Switch Module
Method 1
  1. Start an Enterprise Developer command prompt, 32-bit or 64-bit depending on the application, running as an administrator.
  2. Change to the %ProgramFiles(x86)%\Micro Focus\Enterprise Developer\src\enterpriseserver\xa directory (default location).
  3. Enter build switch-module

    Where switch-module is either ora11 for Oracle 11 databases, or ora12 for Oracle 12 databases.

Method 2
  1. Start an Enterprise Developer command prompt, 32-bit or 64-bit depending on the application.
  2. Copy all files from the %ProgramFiles(x86)%\Micro Focus\Enterprise Developer\src\enterpriseserver\xa directory (default location) to any location where you have WRITE permission.
  3. Change to the directory containing the copied files.
  4. Enter build switch-module

    Where switch-module is either ora11 for Oracle 11 databases, or ora12 for Oracle 12 databases.

Build Output
The build process produces two binary RM switch module files from the ESORAXA.CBL COBOL source file:
Binary File Type
ESORAXA.DLL static
ESORAXA_D.DLL dynamic

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 Environments

Source Code
The Oracle RM switch module COBOL source file, ESORAXA.CBL is located by default in the $COBDIR/src/enterpriseserver/xa directory.
Note: 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.
Build Requirements

The build script uses the current effective working mode to determine how to build the switch module. Before invoking the build script, ensure that your database environment is set up correctly. For details see your database vendor's documentation.

Building the Switch Module
The $COBDIR/src/enterpriseserver/xa directory contains the build batch file that you can use to build the switch module.
  1. Copy all files from the $COBDIR/src/enterpriseserver/xa directory (default location) to any location where you have WRITE permission.
  2. Change to the directory containing the copied files.
  3. Enter build ora
Build Output
The build process produces four binary RM switch module files from the ESORAXA.CBL COBOL source file:
ESORAXA.so 32-bit static
ESORAXA64.so 64-bit static
ESORAXA_D.so 32-bit dynamic
ESORAXA64_D.so 64-bit dynamic

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.

All Environments

Additional Resources
For more information on using the Oracle RM switch module, including the open string definition and details of supported SQL operations, see the following:
  • The Database Access - COBSQL (Pro*COBOL) section of the Additional Software Requirements on Windows topic (Windows).
  • The Database Access - COBSQL (Pro*COBOL) section of the Additional Software Requirements for Micro Focus Enterprise Developer UNIX Components (UNIX) topic.
  • The Developing Applications with Oracle XA help topic available in the Oracle RDBMS documentation.