Contact Us 1-800-596-4880

Transactions Configuration Reference

This page provides reference information on the elements you configure for transactions. For more information on transactions, 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.

timeout

integer

no

Timeout for the transaction (ms).

Child Elements of <abstract-transaction…​>

Name Cardinality Description

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.

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.

Child Elements of <custom-transaction…​>

Name Cardinality Description

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.

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.

Child Elements of <xa-transaction…​>

Name Cardinality Description

Websphere transaction manager

The WebSphere transaction manager.

Attributes of <websphere-transaction-manager…​>

Name Type Required Default Description

name

name (no spaces)

no

transactionManager

An optional name for the transaction manager. The default value is "transactionManager".

Child Elements of <websphere-transaction-manager…​>

Name Cardinality Description

Jboss transaction manager

The JBoss transaction manager.

Attributes of <jboss-transaction-manager…​>

Name Type Required Default Description

name

name (no spaces)

no

transactionManager

An optional name for the transaction manager. The default value is "transactionManager".

Child Elements of <jboss-transaction-manager…​>

Name Cardinality Description

Weblogic transaction manager

The WebLogic transaction manager.

Attributes of <weblogic-transaction-manager…​>

Name Type Required Default Description

Child Elements of <weblogic-transaction-manager…​>

Name Cardinality Description

environment

0..1

The JNDI environment.

Jrun transaction manager

The JRun transaction manager.

Attributes of <jrun-transaction-manager…​>

Name Type Required Default Description

name

name (no spaces)

no

transactionManager

An optional name for the transaction manager. The default value is "transactionManager".

Child Elements of <jrun-transaction-manager…​>

Name Cardinality Description

Resin transaction manager

The Resin transaction manager.

Attributes of <resin-transaction-manager…​>

Name Type Required Default Description

name

name (no spaces)

no

transactionManager

An optional name for the transaction manager. The default value is "transactionManager".

Child Elements of <resin-transaction-manager…​>

Name Cardinality Description

Jndi transaction manager

Retrieves a named transaction manager factory from JNDI.

Custom transaction manager

A user-implemented transaction manager.

Attributes of <custom-transaction-manager…​>

Name Type Required Default Description

class

class name

yes

The class to instantiate to create a transaction manager.

Child Elements of <custom-transaction-manager…​>

Name Cardinality Description

environment

0..1

The JNDI environment.

spring:property

0..*

Spring-style property element for custom configuration.