Danyal Sandeelo
Danyal Sandeelo

Reputation: 12401

Increase JTA transaction timeout limit in WildFly

How can I increase JTA transaction timeout in WildFly?

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

Upvotes: 8

Views: 18364

Answers (2)

Dherik
Dherik

Reputation: 19130

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.

Upvotes: 5

NetForce1
NetForce1

Reputation: 113

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"/>

Upvotes: 10

Related Questions