7.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. 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 or TPBroker for C++ 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 or Environment variable group name
HiRDB1HDB1hirdb11
hirdb12
HiRDB2HDB2hirdb21
hirdb22

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

trnstring -n HiRDB_DB_SERVER -i H1 -o "HDB1*hirdb11" -O "HDB1+hirdb12"
trnstring -n HiRDB_DB_SERVER -i H2 -o "HDB2*hirdb21" -O "HDB2+hirdb22"

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 * variable-setup-file-name or environment-variable-group-name.
-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-file-name or environment-variable-group-name.
  • Specify the same environment variable group ID for -o and -O.
  • Specify the same environment variables in the file or registry 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 for C++

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

Resource managerEnvironment variable group IDEnvironment variable setup file name or Environment variable group name
HiRDB1HDB1hirdb11
hirdb12
HiRDB2HDB2hirdb21
hirdb22

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*hirdb11"
tsdefvalue /OTS/RM/HiRDB_DB_SERVER_1/xa_open_string_info         2
-s "HDB1+hirdb12"

tsdefvalue /OTS/RM/HiRDB_DB_SERVER_2/DMN/xa_open_string_info     1
-s "HDB2*hirdb21"
tsdefvalue /OTS/RM/HiRDB_DB_SERVER_2/xa_open_string_info         2
-s "HDB2+hirdb22"

Explanation:
  1. For /OTS/RM/RM-name/DMN/xa_open_string_info, specify the open character string that is used by TPBroker for C++'s recovery process. Insert an asterisk (*) between the environment variable group identifier and environment variable setup file or environment variable group name.
  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. Insert a plus sign (+) between the environment variable group identifier and environment variable setup file or environment variable group name.
  • 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 or environment variable group.
  • 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='

(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 the following table.

Table 7-4 Library names for RM-related object names

Library typeLibrary name
Single threadpdcltx32.lib
Single thread
(Multi-connection facility supported)
pdcltxs.lib#
Multi-thread
(Multi-connection facility supported)
pdcltxm.lib
#: Specify this library name when linking to TUXEDO.

(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 HiRDB Version 9 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 for C++

Specify the client environment definition in TPBroker for C++'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.

(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: