Explicit Transaction Usage Cases
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:
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:
![*](chapterTOC_bullet.png)
One local transaction, interacting with one resource
![*](chapterTOC_bullet.png)
One or more XAResource transactions; each transaction can interact with one or more resources
![*](chapterTOC_bullet.png)
One or more XAResource transactions and one local transaction
Following are some examples of explicit transactions.