8.2.6 Information to be registered in the transaction manager

For details about how to register HiRDB as the resource manager in the transaction manager, see the applicable transaction manager documentation. Specification of information in the transaction manager is explained as follows.

For a WebLogic Server, perform the operations listed beginning in (6) below.

Organization of this subsection
(1) RM switch name
(2) RM name
(3) Open character string
(4) Close character string
(5) RM-related object name
(6) Client environment definition
(7) JDBC drivers (limited to use with WebLogic Server)

(1) RM switch name

HiRDB's RM switch name determines whether dynamic or static registration is used. The following shows the HiRDB's RM switch name (xa_switch_t structure-name):

(2) RM name

The RM name(resource manager name) defined in the RM switch (xa_switch_t structure) is HiRDB_DB_SERVER.

(3) Open character string

If you are using the multi-connection facility, specify the open character string to be used when the transaction manager opens the resource manager with xa_open. If you are not using the multi-connection facility, there is no need to specify an open character string. If the transaction manager is TP1/EE, specify the open character string for a single HiRDB that has been registered. For the TUXEDO or WebLogic Server transaction manager, you cannot use the multi-connection facility.

To use the multi-connection facility, register multiple HiRDBs in the transaction manager and specify the open character string for each HiRDB. For the open character string, specify the following information:

Use one of the following formats:

An open character string in any other format is ignored. The environment variable group ID always consists of four bytes, and the open character string cannot be longer than 256 bytes.

The following shows an example of registering the open character string for the OpenTP1, TPBroker, or TP1/EE transaction manager.

(a) OpenTP1

Register the open character string using the trnstring operand in OpenTP1's transaction service definition. This example registers two HiRDBs in OpenTP1. The registration conditions are as follows:

Resource managerEnvironment variable group IDEnvironment variable setup file name
HiRDB1HDB1/usr/conf/HiRDB/HiRDB11.ini
/usr/conf/HiRDB/HiRDB12.ini
HiRDB2HDB2/usr/conf/HiRDB/HiRDB21.ini
/usr/conf/HiRDB/HiRDB22.ini

The following shows an example of registering the open character string:

trnstring -n HiRDB_DB_SERVER -i H1 -o "HDB1*/usr/conf/HiRDB/HiRDB11.ini"
-O "HDB1+/usr/conf/HiRDB/HiRDB12.ini"
trnstring -n HiRDB_DB_SERVER -i H2 -o "HDB2*/usr/conf/HiRDB/HiRDB21.ini"
-O "HDB2+/usr/conf/HiRDB/HiRDB22.ini"

Explanation:
-n: Specifies the name of the resource manager.
-i: Specifies the resource manager extension.
-o: Specifies the character string for the xa_open function for transaction service.
This is the open character string that is used by OpenTP1's transaction service process. The format is environment-variable-group-ID * environment-variable-setup-filename.
-O: Specifies the character string for the xa_open function for the user server.
This is the open character string that is used by the user server process. The format is environment-variable-group-ID + environment-variable-setup-filename.
  • Specify the same environment variable group ID for -o and -O.
  • Specify the same environment variables in the file that are specified for -o and -O.
Note
You can select the HiRDB to be connected from the user service using the trnrmid operand in OpenTP1's user service definition. The following example connects to HiRDB1 and HiRDB2:

trnrmid -n HiRDB_DB_SERVER -i H1,H2

(b) TPBroker

Register the open character string using the xa_open_string_info operand in TPBroker's resource manager definition. This example registers two HiRDBs in TPBroker. The registration conditions are as follows:

Resource managerEnvironment variable group IDEnvironment variable setup file name
HiRDB1HDB1/usr/conf/HiRDB/HiRDB11.ini
/usr/conf/HiRDB/HiRDB12.ini
HiRDB2HDB2/usr/conf/HiRDB/HiRDB21.ini
/usr/conf/HiRDB/HiRDB22.ini

The following shows an example of registering the open character string:

tsdefvalue /OTS/RM/HiRDB_DB_SERVER_1/DMN/xa_open_string_info     1
-s "HDB1*/usr/conf/HiRDB/HiRDB11.ini"
tsdefvalue /OTS/RM/HiRDB_DB_SERVER_1/xa_open_string_info         2
-s "HDB1+/usr/conf/HiRDB/HiRDB12.ini"

tsdefvalue /OTS/RM/HiRDB_DB_SERVER_2/DMN/xa_open_string_info     1
-s "HDB2*/usr/conf/HiRDB/HiRDB21.ini"
tsdefvalue /OTS/RM/HiRDB_DB_SERVER_2/xa_open_string_info         2
-s "HDB2+/usr/conf/HiRDB/HiRDB22.ini"

Explanation:
  1. For /OTS/RM/RM-name/DMN/xa_open_string_info, specify the open character string that is used by TPBroker's recovery process. Separate the environment variable group ID and environment variable setup file name by an asterisk (*).
  2. For /OTS/RM/RM-name/xa_open_string_info, specify the open character string that is used by the application program process and settlement process. Separate the environment variable group ID and environment variable setup file name by a plus sign (+).
  • If the RM-name is the same, specify the same environment variable group ID.
  • If the RM-name is the same, specify the same environment variable content for each environment variable setup file.
  • If the TPRMINFO environment variable is specified for the settlement process, specify the character string specified in /OTS/RM/RM-name/xa_open_string_info as the open character string for /OTS/RM/RM-name/(TPRMINFO-value)/xa_open_string_info. If the multi-connection facility is used, specify 'TPRMINFO=' as the default in /OTS/completion_process_env even when TPRMINFO is not specified for the settlement process. The following shows an example:

tsdefvalue /OTS completion_process_env -a 'TPRMINFO='

(c) TP1/EE

Register the open character string using the trnstring operand in the TP1/EE transaction-related definition. This example registers two HiRDBs in TP1/EE. The registration conditions are as follows:

Resource managerEnvironment variable group IDEnvironment variable setup file name
HiRDB1HDB1/usr/conf/HiRDB/HiRDB11.ini
/usr/conf/HiRDB/HiRDB12.ini
HiRDB2HDB2/usr/conf/HiRDB/HiRDB21.ini
/usr/conf/HiRDB/HiRDB22.ini

The following shows an example of registering the open character string:

trnstring -n HiRDB_DB_SERVER -i H1 -o "HDB1*/usr/conf/HiRDB/HiRDB11.ini" \
   -O "HDB1+/usr/conf/HiRDB/HiRDB12.ini"
trnstring -n HiRDB_DB_SERVER -i H2 -o "HDB2*/usr/conf/HiRDB/HiRDB21.ini" \
   -O "HDB2+/usr/conf/HiRDB/HiRDB22.ini"

Explanation:
-n: Specifies the name of the resource manager.
-i: Specifies the resource manager extension.
-o:
Specifies the open character string that is used by TP1/EE's recovery and monitoring threads.
The format is environment-variable-group-ID*environment-variable-setup-file-name.
-O:
Specifies the open character string that is used by the process thread.
The format is environment-variable-group-ID+environment-variable-setup-file-name.
  • In -o and -O, specify the same environment variable group ID.
  • Set the same environment variables in the files that are set in -o and -O.

(4) Close character string

There is no need to specify a character string to enable the transaction manager to close the resource manager using xa_close.

(5) RM-related object name

For the RM-related object name, specify the library name listed in Table 8-5. The suffix for the shared library depends on the platform. The suffix is .so in Solaris and Linux, and .a in AIX 5L. The archive library name is common to all platforms.

Table 8-5 Library names for RM-related object names

Library typeLibrary name
Shared librarySingle threadlibzclty.sl (libzcltx.sl)
Single thread
(Multi-connection facility supported)
libzcltys.sl11 (libzcltxs.sl)
Multi-thread
(Multi-connection facility supported)2
libzcltyk.sl (libzcltxk.sl)
Archive librarySingle threadlibcltya.a (libcltxa.a)
Notes
  1. When using dynamic registration, you may specify the library name enclosed in parentheses.
  2. Select either a shared library or archive library, whichever is appropriate to the purpose. It is more advantageous to select the shared library because it has the following benefits:
  • The object size of the UAP is small.
  • There is no need to relink when upgrading HiRDB.
1 Specify this library name when linking to TUXEDO.
2 Applicable to HI-UX 11.0 and Solaris.

(6) Client environment definition

To enable the transaction manager to control HiRDB transaction processing, the HiRDB client environment definition must be specified in the transaction manager definitions. For details about how to specify the client environment definition in an OLTP environment, see the manual HiRDB Version 8 UAP Development Guide.

(a) OpenTP1

If the transaction manager is OpenTP1, the client environment definition must be specified in the putenv format in the following OpenTP1 system definitions:

For details about these definitions, see the manual OpenTP1 System Definition.

To connect to multiple OpenTP1s, be sure to specify the following client environment definition:

(b) TPBroker

Specify the client environment definition in TPBroker's system definition.

(c) TUXEDO

Specify the client environment definition in the file that was specified with the ENVFILE parameter in the TUXEDO configuration file (UBBCONFIG file). For details about the TUXEDO configuration file, see the TUXEDO documentation.

(d) WebLogic Server

The WebLogic Server process environment variables must contain the specifications for the client environment definition.

(e) TP1/EE

If the transaction manager is TP1/EE, you must specify the client environment definition in the following system definitions for the OpenTP1 that is in the TP1/EE execution environment:

For details about these definitions, see the manual OpenTP1 System Definition.

If you connect to multiple TP1/EEs, make sure that the following client environment definition is specified:

(7) JDBC drivers (limited to use with WebLogic Server)

When HiRDB is registered, the following JDBC driver package name and driver class name must be specified: