An event source can change the transaction mode being used by an
emitter.
Why and when to perform this task
This transaction mode change remains in effect for subsequent
event submissions, but it does not change the transaction mode defined in
the emitter factory profile.
Note: Transactions are supported only in a J2EE
container.
Steps for this task
To change the transaction mode, use the setTransactionMode(int)
method. emitter.setTransactionMode(transactionMode);
The
transactionMode is an integer constant defined by the interface TransactionMode:
- TransactionMode.NEW (send the event in a new transaction)
- TransactionMode.SAME (send the event in the current transaction)
- TransactionMode.DEFAULT (send the event using the current emitter settings)