7.2.4 Transaction transfer

For a UAP that connects to HiRDB using the HiRDB XA library, you can execute transaction commit processing by a process other than the one used at the time the UAP accessed HiRDB. This is called transaction transfer. The following figure gives an overview of transaction transfer.

Figure 7-6 Overview of transaction transfer

[Figure]

Advantages
When transaction transfer is used, the transaction manager's UAP processing can accept the next service request without having to wait for transaction completion. This makes it possible to execute a UAP with fewer processes. However, the number of server processes used by HiRDB and the number of lock-release waits# may increase.
#: Compared to when transaction transfer is not used, accesses to HiRDB for the next service request are more likely to be placed in lock-release wait status until the transaction is completed.
Criteria
When the transaction manager is to use the transaction transfer function, HiRDB must also use the transaction transfer function.
When the transaction manager is not to use the transaction transfer function, HiRDB must not use the transaction transfer function.
The following should be noted when the transaction manager can set whether the transaction transfer function is to be used:
  • The transaction transfer function should be used when the UAP processing workload is greater than the HiRDB access workload.
Operating procedure
To use this function, 1 must be set in the PDXAMODE operand of the client environment definition; to not use this function, either 0 must be set in this operand or specification of the operand must be omitted.
For details about the PDXAMODE operand, see the HiRDB Version 9 UAP Development Guide.
Notes
  1. If the information indicating whether the transaction transfer function is to be used does not match between the transaction manager and HiRDB, transactions may not be settled, HiRDB may terminate abnormally, or control may be returned to the transaction manager with an error.
  2. When this function is used, the scope of LOCK TABLE UNTIL DISCONNECT in the LOCK statement changes. For details about the scope of LOCK TABLE UNTIL DISCONNECT, see the HiRDB Version 9 UAP Development Guide.
Organization of this subsection
(1) OpenTP1 used as the transaction manager

(1) OpenTP1 used as the transaction manager

When this function is used, HiRDB supports OpenTP1's commit optimization and prepare optimization. Therefore, this function should be used when the -d option is omitted from OpenTP1's trnstring operand. When the -d option is specified, this function should not be used.

The following table shows the relationship between the transaction service definition's trnstring operand in the OpenTP1 system definition and HiRDB's PDXAMODE operand.

Table 7-2 Relationship between OpenTP1's trnstring operand and HiRDB's PDXAMODE operand

trnstring operand specificationPDXAMODE
operand value
-d option omitted1
-d option specified0
Note
  • If the trnstring operand's value does not match the PDXAMODE operand's value, HiRDB cannot settle transactions. In this case, HiRDB returns to OpenTP1 an XA function error return code (-6).

For details about the trnstring operand, see the manual OpenTP1 System Definition. For details about commit optimization and prepare optimization, see the manual OpenTP1 Programming Guide.