7.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 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, or other similar problem), 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

The following table shows the differences between dynamic and static registration.

Table 7-3 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.#1
When first SQL is issued within transaction
  • Starts managing transaction under transaction manager's control.
  • Starts HiRDB transaction.
  • Processes SQL.
  • Establishes connection.#1
  • 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)#1Number of SQL statements + number of commit processing communications + 1 (for transaction startup processing) + 1 (communication for establishing connection)#1
Reconnection method if connection between transaction manager and HiRDB is broken during processing#2Reestablishes connection automatically the next time transaction is started.#3Reestablishes connection automatically the next time transaction is started.#4
#1
Applicable when the XA interface supporting multi-thread is used.
#2
Connections broken as a result of network errors cannot be detected. However, if the transaction manager is TPBroker for C++ or Weblogic Server, connections are established when a transaction starts, so reconnection is possible.
#3
If the transaction manager is OpenTP1/Server Base, specifying transaction in the OpenTP1/Server Base operand trn_rm_open_close_scope enables reconnection even when a connection is broken as a result of a network error.
#4
If the transaction manager is OpenTP1/Server Base, reconnection is possible even in the event of a connection broken as a result of a network error.