11.29.2 Called Service in Different Transaction with AUTOTRAN Set

If you issue a communication call with the TPNOTRAN flag set and the called service is configured such that a transaction automatically starts when the service is called, the system places both the calling and called processes in transaction mode, but the two constitute different transactions. In this situation, the following facts apply:

  • tpreturn() plays the initiator’s transaction role: it terminates the transaction in the service in which the transaction was automatically started. Alternatively, if the transaction is automatically started in a service that terminates with tpforward(), the tpreturn() call issued in the last service in the forward chain plays the initiator’s transaction role: it terminates the transaction. (For an example, refer to the figure called Figure 11-1 .)
  • Because it is in transaction mode, tpreturn() is vulnerable to the failure of any participant in the transaction, as well as to transaction timeouts. In this scenario, the system is more likely to return a failed message.
  • The state of the caller’s transaction is not affected by any failed messages or application failures returned to the caller.
  • The caller’s own transaction may timeout as the caller waits for a reply.
  • If no reply is expected, the caller’s transaction cannot be affected in any way by the communication call.

Figure 11-1 Transaction Roles of tpforward( ) and tpreturn() with AUTOTRAN


Transaction Roles of tpforward( ) and tpreturn() with AUTOTRAN Diagram