<jbossts:transaction-manager>
<property key="test" value="TEST"/>
</jbossts:transaction-manager>
JBoss Transaction Manager Reference
Mule Runtime Engine versions 3.5, 3.6, and 3.7 reached End of Life on or before January 25, 2020. For more information, contact your Customer Success Manager to determine how you can migrate to the latest Mule version. |
This module enables Mule to use the JBoss transaction manager (previously Arjuna) to configure XA transactions. Developers can configure one Transaction Manger per Mule instance. For more information, see JBoss Transactions, Deploying Mule to JBoss, Transaction Management, JBoss jBPM Module Reference.
Configuration
To configure an instance of the JBoss transaction manager within Mule, add this element to your Mule XML config file. You can configure arbitrary properties on the transaction manager that are passed on to the underlying transaction manager. For example:
You can then declare XA transactions on endpoints supporting XA transactions, and all those transactions are managed by the JBoss transaction manager. Mule auto-generates the transaction manager XA node ID. To specify the ID yourself, add the following property:
<jbossts:transaction-manager>
<properties>
<spring:entry key="com.arjuna.ats.arjuna.xa.nodeIdentifier" value="SomeUserNodeId"/>
</properties>
</jbossts:transaction-manager>
Additional Properties for the JBoss Transaction Manager
You can configure many properties for the JBoss Transaction Manager. These configurable properties are detailed in the Environment class.
The following is an example that demonstrates how to configure properties related to transaction timeout.
Configuring Transaction Timeout Properties
There are two properties that relate to timeouts for JBoss transactions. (Note that the information for timeout properties comes from here).
-
com.arjuna.ats.arjuna.coordinator.defaultTimeout
-
This defaultTimeout property defines the timeout period for each transaction created for this manager. Transactions that have not terminated before the timeout value expires are automatically rolled back. The default value is 60 seconds.
-
-
com.arjuna.ats.arjuna.coordinator.txReaperTimeout
-
JBossTS uses a separate reaper thread that monitors all locally created transactions and forces them to roll back if their timeouts elapse. To prevent this reaper thread from consuming application time, it only runs periodically. By default, the reaper thread is set to monitor locally transactions every 120000 milliseconds. You can override this default value by setting the txReaperTimeout property. Note that if the defaultTimeout property value is less than the txReaperTimeout property value, the reaper thread checks for transactions once every defaultTimeout seconds.
-
<jbossts:transaction-manager >
<property key="com.arjuna.ats.arjuna.coordinator.defaultTimeout" value="47" /><!-- this is in seconds -->
<property key="com.arjuna.ats.arjuna.coordinator.txReaperTimeout" value="108000"/><!-- this is in milliseconds -->
</jbossts:transaction-manager>