How to increase the Transaction Timeout in JBoss / WildFly

Transaction timeout in WildFly / JBoss can be configured in the transactions subsystem or at EJB level. When the transaction is configured in the transactions subsystem it will be the default transaction timeout for all JTA transactions. When configured at EJB level, the timeout will be specific of that EJB.

Configuring Transaction timeout in the transactions subsystem

Out of box, the transactions subsystem does not show the default value of the JTA transaction timeout:

<subsystem xmlns="urn:jboss:domain:transactions:6.0">
    <core-environment node-identifier="${}">
    <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
    <coordinator-environment statistics-enabled="${wildfly.transactions.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
    <object-store path="tx-object-store" relative-to=""/>

The value of default-timeout can be configured through the coordinator-environment element as follows:

<coordinator-environment default-timeout="300"/>

Here is how tou can increase the default transaction timeout with the CLI:

{"outcome" => "success"}

Configuring the Transaction Timeout in EJBs

Firstly, you can set the transaction timeout for a specific EJB  with the @org.jboss.ejb3.annotation.TransactionTimeout annotation:

import java.util.concurrent.TimeUnit;
import org.jboss.ejb3.annotation.TransactionTimeout;

public class SampleBean 

  @TransactionTimeout(value = 30, unit = TimeUnit.SECONDS)
  public String doSomething() throws RuntimeException

For Bean Managed Transactions, you can use the method setTransactionTimeout of the UserTransaction interface to set the timeout:

public void doSomething() {
    try {
        ut.setTransactionTimeout(600); // 10 minutes

Finally, you can also use the jboss-ejb3.xml descriptor to set the transaction timeout:

<jboss:ejb-jar xmlns:jboss=""

On the other hand, if you are using Message Driven Beans, you can set the transactionTimeout as ActivationConfigProperty of your MDB:

@MessageDriven(name = "TestMDB", activationConfig = {
        @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
        @ActivationConfigProperty(propertyName = "destination", propertyValue = "testQueue"),
        @ActivationConfigProperty(propertyName = "transactionTimeout", propertyValue="4")

Transaction Timeout order

What happens when you have multiple points when a transaction timeout can happen? there is no hierarchy in this regards. Simply put, the first scope where a timeout happens that will cause the failure of a transaction.

Typically, the subsystem transaction timeout should be large enough to cover all application cases such as EJB Transaction timeouts.


In conclusion, configuring the transaction timeout in WildFly is a straightforward process that can be done by modifying the default-timeout attribute in the coordinator-environment element of the transactions subsystem in the standalone.xml configuration file. By increasing the transaction timeout, you can allow longer-running transactions to complete successfully, while still preventing transactions from taking too long and potentially causing resource contention or deadlocks.

if you want to know more details about configuring the Transactions using a JDBC Store instead of the default file store we recommend checking this article: How to configure a JDBC Store for Transactions