Provides the information required to build the generic one-phase commit for ODBC RM switch module.
Restriction: This topic applies only when the Enterprise Server feature is enabled.
- Source Code
- The generic one-phase commit for ODBC RM switch module COBOL source file,
ESODBCXA.CBL is located by default in the
%ProgramFiles(x86)%\Micro Focus\Visual COBOL for Visual Studio 2012\src\enterpriseserver\xa directory.
- Limitations
- The ODBC module supports only a one-phase commit, therefore the following SQL operations are not supported in the source for your deployed container-managed service:
- CONNECT
- DISCONNECT
- BEGIN TRANSACTION
- COMMIT
- ROLLBACK
- Build Requirements
- Build the switch module in your development environment.
Some OpenESQL directives are process-based, and typically need to be set in within the code of the program that makes the database connection. If you are executing services under
Enterprise Server that are deployed as container-managed applications, these directives must be specified when compiling the RM switch module, rather then when compiling your program source.
- Building the Switch Module
-
- Method 1
-
- Start aVisual COBOL command prompt, 32-bit or 64-bit depending on the application, running as an administrator.
- Change to the
%ProgramFiles(x86)%\Micro Focus\Visual COBOL for Visual Studio 2012\src\enterpriseserver\xa directory (default location).
- Enter
build odbc [directives]
- Method 2
-
- Start aVisual COBOL command prompt, 32-bit or 64-bit depending on the application.
- Copy all files from the
%ProgramFiles(x86)%\Micro Focus\Visual COBOL for Visual Studio 2012\src\enterpriseserver\xa directory (default location) to any location where you have WRITE permission.
- Change to the directory containing the copied files.
- Enter
build odbc [directives]
- Build Output
- The build process produces two binary RM switch module files from the
ESODBCXA.CBL COBOL source file:
File
|
Type
|
ESODBCXA.DLL
|
static
|
ESODBCXA_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.