Transactions Configuration Reference
This page provides reference information on the elements you configure for transactions. For more information on how to configure transactions in flows, see Transaction Management. |
Abstract transaction
A placeholder for transaction elements. Transactions allow a series of operations to be grouped together.
Attributes of <abstract-transaction…>
Name | Type | Required | Default | Description |
---|---|---|---|---|
action |
enumeration |
yes |
The type of action the transaction should take, one of the following: NONE - Never participate in a transaction. ALWAYS_BEGIN - Always start a new transaction when receiving a message. An exception will be thrown if a transaction already exists. BEGIN_OR_JOIN - If a transaction is already in progress when a message is received, join the transaction if possible. Otherwise, start a new transaction. ALWAYS_JOIN - Always expects a transaction to be in progress when a message is received. If there is no transaction, an exception is thrown. JOIN_IF_POSSIBLE - Join the current transaction if one is available. Otherwise, no transaction is created. NOT_SUPPORTED - Execute outside any existent transaction |
|
timeout |
integer |
no |
Timeout for the transaction (ms). |
Custom transaction
A user-defined or otherwise unsupported third-party transactions.
Attributes of <custom-transaction…>
Name | Type | Required | Default | Description |
---|---|---|---|---|
action |
enumeration |
yes |
The type of action the transaction should take, one of the following: NONE - Never participate in a transaction. ALWAYS_BEGIN - Always start a new transaction when receiving a message. An exception will be thrown if a transaction already exists. BEGIN_OR_JOIN - If a transaction is already in progress when a message is received, join the transaction if possible. Otherwise, start a new transaction. ALWAYS_JOIN - Always expects a transaction to be in progress when a message is received. If there is no transaction, an exception is thrown. JOIN_IF_POSSIBLE - Join the current transaction if one is available. Otherwise, no transaction is created. NOT_SUPPORTED - Execute outside any existent transaction |
|
timeout |
integer |
no |
Timeout for the transaction (ms). |
|
factory-class |
class name |
no |
A class that implements the TransactionFactory interface that will be instantiated and used to generate a transaction. This attribute and the 'factory-ref' attribute are mutually exclusive; one of the two is required. |
|
factory-ref |
string |
no |
A bean that implements the TransactionFactory interface that will be used to generate a transaction. This attribute and the 'factory-class' attribute are mutually exclusive; one of the two is required. |
Xa transaction
An XA transaction.
Attributes of <xa-transaction…>
Name | Type | Required | Default | Description |
---|---|---|---|---|
action |
enumeration |
yes |
The type of action the transaction should take, one of the following: NONE - Never participate in a transaction. ALWAYS_BEGIN - Always start a new transaction when receiving a message. An exception will be thrown if a transaction already exists. BEGIN_OR_JOIN - If a transaction is already in progress when a message is received, join the transaction if possible. Otherwise, start a new transaction. ALWAYS_JOIN - Always expects a transaction to be in progress when a message is received. If there is no transaction, an exception is thrown. JOIN_IF_POSSIBLE - Join the current transaction if one is available. Otherwise, no transaction is created. NOT_SUPPORTED - Execute outside any existent transaction |
|
timeout |
integer |
no |
Timeout for the transaction (ms). |
|
interactWithExternal |
boolean |
no |
If this is set to "true", Mule interacts with transactions begun outside of Mule. E.g. if an external transaction is active, then BEGIN_OR_JOIN willjoin it, and ALWAYS_BEGIN will cause an exception to be thrown. |