Adapter Development Kit 6.5 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Integration Server Transaction Support | 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, adapter users must explicitly start and end each transaction except the first one.
Depending on what the flow needs to accomplish, adapter users may explicitly start and end XAResource transactions as well. This way, they can create a flow that includes multiple local transactions and multiple XAResource transactions.
To support this, Integration Server provides the following built-in services:
*pub.art.transaction.startTransaction (see WmART.pub.art.transaction:startTransaction
*pub.art.transaction.commitTransaction (see WmART.pub.art.transaction:commitTransaction
*pub.art.transaction.rollbackTransaction (see WmART.pub.art.transaction:rollbackTransaction
*pub.art.transaction.setTransactionTimeout (see WmART.pub.art.transaction:setTransactionTimeout
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; 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.