OpenTP1 Version 7 Programming Guide

[Contents][Index][Back][Next]

2.3.1 Transaction in client/server mode

OpenTP1 can implement one transaction with multiple-process RPCs. This transaction is called a global transaction. A transaction to be processed in client/server mode can be ensured by implementing this global transaction.

Organization of this subsection
(1) Transaction start and synchronization point acquisition (commitment)
(2) UAPs that can call transaction control functions

(1) Transaction start and synchronization point acquisition (commitment)

Before transactions can be controlled during client/server mode communication, the transaction start and the acquisition of a synchronization point must be explicitly specified in the UAP.

To start a transaction, invoke the following function:

To acquire a synchronization point, invoke the following functions:

The client UAP becomes a root transaction branch when the transaction start function is called. Functions for acquiring transaction synchronization points (commitment) are called from the root transaction branch from which the transaction start function was called.

After a transaction start function is called, another transaction start function cannot be called in the global transaction.

When a UAP being executed requests a service as a transaction, the service is being executed as a transaction upon the request. The function dc_trn_begin() cannot be called with the requested service.

(2) UAPs that can call transaction control functions

Only SUPs and SPPs can call functions which start a transaction or acquire the synchronization point. Since transaction processing for MHPs is automatically controlled by OpenTP1, MHPs cannot call transaction control functions. SPPs which are requested for service by MHPs via the function dc_rpc_call() cannot call transaction control functions, either.

UAPs that handle offline work cannot use transaction control functions.

UAPs providing the OpenTP1 client facility (CUPs) use the transaction control functions existing in the TP1/Client library.