3.3.4 Transaction Suspend and Resume
The CORBA object must follow strict rules with respect to suspending and resuming a transaction within a method invocation. These rules and the error conditions that result from their violation are described below.
When a CORBA object method begins execution, it can be in one of the following three states with respect to transactions:
- The client application began the transaction.
- Legal server application behavior: Suspend and resume the transaction within the method execution.
- Illegal server application behavior: Return from the method with the transaction in the suspended state (that is, return from the method without invoking resume if suspend was invoked).
- Error Processing: If illegal behavior occurs, the TP Framework raises the
CORBA::TRANSACTION_ROLLEDBACK
exception to the client application and the transaction is rolled back by the Oracle Tuxedo system.
- The system began a transaction to provide
AUTOTRAN
or transaction policyalways
behavior.Note:
For each CORBA interface, setAUTOTRAN
toYes
if you want a transaction to start automatically when an operation invocation is received. SettingAUTOTRAN
toYes
has no effect if the interface is already in transaction mode. For more information aboutAUTOTRAN
, see Using CORBA Transactions.- Legal server behavior: Suspend and resume the transaction within the method execution.
Note:
Not recommended. The transaction may be timed out and aborted before the method causes the transaction to be resumed. - Illegal server behavior: Return from the method with the transaction in the suspended state (that is, return from the method without invoking resume if suspend was invoked).
- Error Processing: If illegal behavior occurs, the TP Framework raises the
CORBA::OBJ_ADAPTER
exception to the client, and the transaction is rolled back by the system. TheCORBA::OBJ_ADAPTER
exception is raised because the client application did not initiate the transaction, and, therefore, does not expect transaction error conditions to be raised.
- Legal server behavior: Suspend and resume the transaction within the method execution.
- The CORBA object is not involved in a transaction when it starts executing.
- Legal server behavior:
- Begin and commit a transaction within the method execution.
- Begin and roll back a transaction within the method execution.
- Begin and suspend a transaction within the method execution.
- Illegal server behavior: Begin a transaction and return from the method with the transaction active.
- Error Processing: If illegal behavior occurs, the TP Framework raises the
CORBA::OBJ_ADAPTER
exception to the client application and the transaction is rolled back by the Oracle Tuxedo system. TheCORBA::OBJ_ADAPTER
exception is raised because the client application did not initiate the transaction, and, therefore, does not expect transaction error conditions to be raised.
- Legal server behavior:
Parent topic: Transactions