-
1. Re: JTA transaction timeout
jaysensharma Oct 24, 2015 1:02 AM (in response to naga_b)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)
example:
/subsystem=transactions:write-attribute(name=default-timeout,value=900)
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
marklittle Oct 24, 2015 7:10 AM (in response to naga_b)JTA timeouts are described in the JTA specification as well as in the Narayana manual(s).
-
3. Re: JTA transaction timeout
wdfink Oct 28, 2015 3:58 AM (in response to naga_b)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.