webMethods Adapter Runtime 10.7 | webMethods Adapter Runtime Documentation | webMethods Adapter Runtime User’s Documentation | Transaction Management | Explicit Transactions | Explicit Transaction Usage Cases
 
Explicit Transaction Usage Cases
 
Two Local Transactions
Two XAResource Transactions
One XAResource Transaction and Two Nested Local Transactions
One XAResource Transaction and One Nested Local and XAResource Transaction
To include multiple local transactions in a single flow, you must explicitly start and end each transaction except the first one.
Depending on what the flow needs to accomplish, you may explicitly start and end XAResource transactions as well. This way, you can create a flow that includes multiple local transactions and multiple XAResource transactions.
For example, the following flow includes a local transaction nested within another local transaction:
BEGIN FLOW // start transaction 1
.
.
.
INVOKE startTransaction(2) // start transaction 2
.
.
.
INVOKE commitTransaction(2) // commit transaction 2
END FLOW // commit transaction 1
A nested transaction must adhere to the same rules that apply to container-manager transactions. That is, a nested transaction can contain one of the following:
*One local transaction, interacting with one resource
*One or more XAResource transactions, where each transaction can interact with one or more resources
*One or more XAResource transactions and one local transaction
Following are some examples of explicit transactions.