3.3.1 Transaction Policies
Eligibility of CORBA objects to participate in global transactions is controlled by the transaction policies assigned to implementations at compile time. The following policies can be assigned.
Note:
The transaction policies are set in an ICF file that is configured at OMG IDL compile time. For a description of the ICF file, refer to the Implementation Configuration File (ICF) section.-
neverThe implementation is not transactional. Objects created for this interface can never be involved in a transaction. The system generates an exception (
INVALID_TRANSACTION) if an implementation with this policy is involved in a transaction. AnAUTOTRANpolicy specified in theUBBCONFIGfile for the interface is ignored. -
ignoreThe implementation is not transactional. This policy instructs the system to allow requests within a transaction to be made of this implementation. An
AUTOTRANpolicy specified in theUBBCONFIGfile for the interface is ignored. -
optional(This is the defaulttransaction_policy.)The implementation may be transactional. Objects can be involved in a transaction if the request is transactional. Servers containing transactional objects must be configured within a group associated with an XA-compliant resource manager. If the
AUTOTRANparameter is specified in theUBBCONFIGfile for the interface,AUTOTRANis on. -
alwaysThe implementation is transactional. Objects are required to always be involved in a transaction. If a request is made outside a transaction, the system automatically starts a transaction before invoking the method. The transaction is committed when the method ends. (This is the same behavior that results from specifying
AUTOTRANfor an object with the option transaction policy, except that no administrative configuration is necessary to achieve this behavior, and it cannot be overridden by administrative configuration.) Servers containing transactional objects must be configured within a group that is associated with an XA-compliant resource manager.
Note:
Theoptional policy is the only transaction policy that can be influenced by administrative configuration. If the system administrator sets the AUTOTRAN attribute for the interface by means of the UBBCONFIG file or by using administrative tools, the system automatically starts a transaction upon invocation of the object, if it is not already infected with a transaction (that is, the behavior is as if the always policy were specified).
Parent topic: Transactions