8.2.5 Registering HiRDB in the transaction manager

To link your HiRDB to OLTP, you need to register the HiRDB in the transaction manager. You can use each transaction manager's commands and functions to register HiRDB in the transaction manager:

Organization of this subsection
(1) Dynamic registration and static registration
(2) Differences between dynamic and static registration

(1) Dynamic registration and static registration

There are two ways to register HiRDB as the source manager in the transaction manager:

You cannot use both dynamic and static registration with a single transaction manager.

For a WebLogic Server, only static registration can be used.

(a) Dynamic registration

If you dynamically register HiRDB in the transaction manager, HiRDB is placed under the control of the transaction manager when the UAP issues the first SQL statement within a transaction. This method reduces the transaction manager's transaction control overhead for HiRDB when the UAP accesses multiple resources including HiRDB, or when the application program may not access HiRDB at all.

(b) Static registration

If you statically register HiRDB in the transaction manager, HiRDB is placed under the control of the transaction manager when a transaction is started, whether or not the UAP issues any SQL statements. When OpenTP1 is used as the transaction manager and the connection between a UAP and HiRDB is broken (due to abnormal termination of a unit or server process, etc.), OpenTP1 re-establishes connection at the time a transaction is started. Therefore, there is no need to restart the UAP.

(2) Differences between dynamic and static registration

Table 8-4 lists the differences between dynamic and static registration.

Table 8-4 Differences between dynamic and static registration

TimingDynamic registrationStatic registration
When transaction is startedPerforms no management.
  • Checks to see if connection is being established.
  • Starts managing transaction under transaction manager's control.
  • Establishes connection.#
When first SQL is issued within transaction
  • Starts managing transaction under transaction manager's control.
  • Starts HiRDB transaction.
  • Processes SQL.
  • Establishes connection.#
  • Starts HiRDB transaction.
  • Processes SQL statements.
Number of times communication is established between transaction manager and HiRDB during transactionNumber of SQL statements + number of commit processing communications + 1 (communication for establishing connection)#Number of SQL statements + number of commit processing communications + 1 (for transaction startup processing) + 1 (communication for establishing connection)#
Reconnection method if connection between transaction manager and HiRDB is broken during processingReestablishes connection automatically the next time transaction is started.Reestablishes connection automatically the next time transaction is started.
#: Applicable when the XA interface supporting multi-thread is used.