OpenTP1 Version 7 Programming Guide

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

2.3.3 Specification of transaction attribute

When setting up a UAP execution environment, specify whether to run UAP processes as transactions. A UAP process is called a UAP with the transaction attribute if it is specified so that it will work as a transaction. The transaction attribute must be specified for UAPs which update files or perform other transaction processing.

Organization of this subsection
(1) How to give transaction attribute to UAP
(2) How to give nontransaction attribute to UAP

(1) How to give transaction attribute to UAP

To make a server UAP process a transaction branch, specify that the UAP have the transaction attribute. The transaction attribute is specified by the following method:

Processing of a UAP with the transaction attribute works as a transaction when:

(2) How to give nontransaction attribute to UAP

The nontransaction attribute (atomic_update=N or the specification that the transaction facility be not used) must be specified for server UAPs which perform only operation and other server UAPs which do not require that transactions be guaranteed. Server UAPs with the nontransaction attribute can always offer service to not only the present, but also other client UAPs independent of global transaction processing. Even if the server UAP is requested for service by multiple client UAPs, it can start handling these service requests without waiting until synchronization point acquisition processing is completed. This helps reduce the overhead involved in service request waits.

The figure below shows the relationship between RPCs and the transaction attribute.

Figure 2-31 Relationship between RPCs and transaction attribute

[Figure]

#
The contents of a resource accessed by global transaction B are returned to the status immediately before global transaction B is started. The function for acquiring a synchronization point (the function dc_trn_unchained_commit() in the figure) returns an error to report that global transaction B has rolled back.
(a) Using nontransactional RPC from transaction process

If a transaction process requests a UAP for service and the requested UAP has the transaction attribute, the service request is handled by a transaction process. It is possible to make such service requests not handled by a transaction process. For this purpose, specify the argument to the function dc_rpc_call() to indicate that the RPC is nontransactional.