Integration Server 10.7 | JMS Client Development Guide | Transaction Management | 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 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 pub.art.transaction:commitTransaction or pub.art.transaction:rollbackTransaction for each pub.art.transaction:startTransaction; otherwise, you will have dangling transactions that will require you to reboot Integration Server. You must also ensure that the startTransaction is outside the SEQUENCE.
A new explicit transaction context can be started within a transaction context, provided that you ensure that the transactions within the 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 on.
The following example shows 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
Note:
You can use the pub.flow:getLastError service in the SEQUENCE to retrieve the error information when a sequence fails. For more information about using the pub.flow:getLastError service, see webMethods Integration Server Built-In Services Reference pub.flow:getLastError.
For more information about designing and using flows, see webMethods Service Development Help.