Adapter for Enterprise JavaBeans 6.5 SP3 | webMethods Adapter for Enterprise JavaBeans Documentation | webMethods Adapter for Enterprise JavaBeans Installation and User’s Documentation | Built-In Transaction Management Services | Transaction Management Overview | Implicit and Explicit Transactions | Explicit Transactions
 
Explicit Transactions
You use explicit transactions when you need to explicitly control the transactional units of work. To do this, you use additional services, known as built-in services, in your flow.
A transaction context starts when the pub.art.transaction.startTransaction() service executes. The transaction context completes when either the pub.art.transaction.commitTransaction() or pub.art.transaction.rollbackTransaction() service executes. As with implicit transactions, a single transaction context can contain no more than one EJB Local Connection connection.
Note:
With explicit transactions, you must be sure to call either a commitTransaction() or rollbackTransaction() for each startTransaction() service, or you will have dangling transactions, which will require you to reboot Integration Server.
A new explicit transaction context can be started within an existing transaction context, provided that you ensure that the transactions are committed in the reverse order they were started-that is, the last transaction to start should be the first transaction to complete, and so forth.
For example, consider the following is a valid construct:
pub.art.transaction.startTransaction()
pub.art.transaction.startTransaction()
pub.art.transaction.startTransaction()
pub.art.transaction.commitTransaction()
pub.art.transaction.commitTransaction()
pub.art.transaction.commitTransaction()
The following example shows an invalid construct:
pub.art.transaction.startTransaction()
pub.art.transaction.startTransaction()
pub.art.transaction.commitTransaction()
pub.art.transaction.commitTransaction()
For more information about designing and using flows, see the webMethods Service Development Help for your release.
For more information about transaction types, see Transaction Management of Adapter for Enterprise Javabeans Connections.