3 Replies Latest reply on Oct 28, 2015 3:58 AM by Wolf-Dieter Fink

    JTA transaction timeout

    Nagapavan Bandarupalli Newbie

      What is the purpose of JTA transaction timeout in JBOSS EAP ? How we can configure this in EAP sever ?

        • 1. Re: JTA transaction timeout
          Jay SenSharma Master

          The default transaction-timeout can be found at the "transaction" subsystem of your JBoss EAP profile (like standalone.xml) as following:  (300 seconds) 


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


          It can be easily changed via JBoss-cli or console (setting 0 means disabling it)




          At individual component level we can configure the timeouts as well like EJBs can be configured to use a different timeout using @org.jboss.ejb3.annotation.TransactionTimeout or using jboss-ejb3.xml <tx:trans-timeout>

          • 2. Re: JTA transaction timeout
            Mark Little Master

            JTA timeouts are described in the JTA specification as well as in the Narayana manual(s).

            • 3. Re: JTA transaction timeout
              Wolf-Dieter Fink Master

              The purpose is to limit transaction duration because it might be unwanted that a transaction commits after x seconds.

              Let's assume a browser request and a guarantee for a response after 10 sec. (i.e. payment), the client might give a response "not available try again" and you must ensure that the current request does not apply.


              But note that the Tx timeout take affect only if the code run into the next action with the Tx manager.

              For example if you have long running SQL queries this query will not be interrupted, it still continue.

              Also if your code process something and to not touch any resource or the Tx-manager.