5. Configuring transactions
5
Defining transactions behavior by selecting an action
NONE-Never participate in a transaction, and commit any previously existing
Transaction
ALWAYS_BEGIN-Always start a new transaction
Committing any previously existing transactions
BEGIN_OR_JOIN-If there is an existing transaction, join that transaction
If not, start a new transaction
ALWAYS_JOIN-Always expect and join an existing transaction
Throw an exception if no previous transaction exists
JOIN_IF_POSSIBLE-Join an existing transaction if one exists
If no transaction exists, run non- transactionally
6. Example
6
Flow example where two connectors uses XA transaction to function as a single
transaction unit
<flow name="JmsToJdbc">
<jms:inbound-endpoint queue="my.queue" reuseSession="false"/>
<xa-transaction action="ALWAYS_BEGIN" timeout="60000"/>
</jms:inbound-endpoint>
<jdbc:outbound-endpoint address="writeTest" type="2">
<xa-transaction action="ALWAYS_JOIN"/>
</jdbc:outbound-endpoint>
</flow>
7. Example
6
Flow example where two connectors uses XA transaction to function as a single
transaction unit
<flow name="JmsToJdbc">
<jms:inbound-endpoint queue="my.queue" reuseSession="false"/>
<xa-transaction action="ALWAYS_BEGIN" timeout="60000"/>
</jms:inbound-endpoint>
<jdbc:outbound-endpoint address="writeTest" type="2">
<xa-transaction action="ALWAYS_JOIN"/>
</jdbc:outbound-endpoint>
</flow>