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:
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.
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.
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.
The following table shows the differences between dynamic and static registration.
Table 7-3 Differences between dynamic and static registration
Timing | Dynamic registration | Static registration |
---|---|---|
When transaction is started | Performs no management. |
|
When first SQL is issued within transaction |
|
|
Number of times communication is established between transaction manager and HiRDB during transaction | Number of SQL statements + number of commit processing communications + 1 (communication for establishing connection)#1 | Number 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#2 | Reestablishes connection automatically the next time transaction is started.#3 | Reestablishes connection automatically the next time transaction is started.#4 |