Adapter for JMS 6.1 SP1 | webMethods Adapter for JMS Documentation | webMethods Adapter for JMS 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.
Note:
When using a MessageRequestor service, the requesting message that the service sends to the JMS destination cannot be rolled back if an operation fails within the transaction context. That is, the MessageRequestor service automatically commits the requesting message. If it did not, the JMS provider would never deliver the request and would therefore never receive a reply message. See the JMS Specification for more information about transaction management requirements in JMS providers.
A transaction context starts when the pub.art.transaction.startTransaction() service is executed. The transaction context is completed when either the pub.art.transaction.commitTransaction() or pub.art.transaction.rollbackTransaction() service is executed. As with implicit transactions, a single transaction context can contain any number of XA_TRANSACTION connections but no more than one LOCAL_TRANSACTION connection.
Note:
With explicit transactions, you must be sure to call either a commitTransaction() or rollbackTransaction() for each startTransaction(); otherwise you will have dangling transactions that will require you to reboot Integration Server.
A new explicit transaction context can be started within a transaction context, provided that you ensure that the transactions within the transaction context are completed 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 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 JMS Connections.