7

How can I increase JTA transaction timeout in WildFly?

Can be updated in standalone.xml as well as from Admin Console right?

Danyal Sandeelo
  • 12,196
  • 10
  • 47
  • 78

2 Answers2

9

The transaction timeout can also be changed in standalone.xml directly (without using the JBoss Client). Just add this to the transactions subsystem:

<coordinator-environment default-timeout="1800"/>
NetForce1
  • 103
  • 2
  • 6
  • For more info, see the [documentation](https://docs.oracle.com/cd/E52191_03/Platform.11-1/ATGInstallGuide/html/s0406settingthetransactiontimeoutonjb01.html). – Jacob van Lingen Feb 21 '19 at 08:56
5

If you are using Wildfly in standalone, you can use Jboss Client to do this configuration:

[standalone@localhost:9990 /] /subsystem=transactions:write-attribute(name=default-timeout,value=500)  
{  
    "outcome" => "success",  
    "response-headers" => {  
        "operation-requires-reload" => true,  
        "process-state" => "reload-required"  
    }  
} 

If you are using Wildfly in domain mode:

[domain@localhost:9990 /] /profile=full/subsystem=transactions:write-attribute(name=default-timeout,value=500)  
{  
    "outcome" => "success",  
    "result" => undefined,  
    "server-groups" => {"main-server-group" => {"host" => {"master" => {  
        "server-one" => {"response" => {  
            "outcome" => "success",  
            "response-headers" => {  
                "operation-requires-reload" => true,  
                "process-state" => "reload-required"  
            }  
        }},  
        "server-two" => {"response" => {  
            "outcome" => "success",  
            "response-headers" => {  
                "operation-requires-reload" => true,  
                "process-state" => "reload-required"  
            }  
        }}  
    }}}}  
}

You can also do this configurations in the Management Interface .

You can also specify the time by method or class with an annotation. But the annotation can be different among the application servers, there is no specification about this in J2EE. For example, in Wildfly the annotation is @TransactionTimeout:

@TransactionTimeout(1500)  

And the time unit used in all cases is always in seconds.

Dherik
  • 17,757
  • 11
  • 115
  • 164