11.29.3 Called Service That Starts a New Explicit Transaction
If a communication call is made with TPNOTRAN, and the called service is not automatically placed in transaction mode by a configuration option, the service can define multiple transactions using explicit calls to tpbegin(), tpcommit(), and tpabort(). As a result, the transaction can be completed before a call is issued to tpreturn().
In this situation, the following facts apply:
-
tpreturn()plays no transaction role; that is, the role oftpreturn()is always the same, regardless of whether transactions are explicitly defined in the service routine. -
tpreturn()can return any value inrval, regardless of the outcome of the transaction. - Typically, the system returns processing errors, buffer type
errors, or application failure, and follows the normal rules for
TPESVCFAIL,TPEITYPE/TPEOTYPE, andTPESVCERR. - The state of the caller’s transaction is not affected by any failed messages or application failures returned to the caller.
- The caller is vulnerable to the possibility that its own transaction may time out as it waits for its reply.
- If no reply is expected, the caller’s transaction cannot be affected in any way by the communication call.
Parent topic: Sample Transaction Scenarios