[Mulgara-svn] r1079 - branches/mgr-121-lockrecovery/src/jar/resolver/java/org/mulgara/resolver
ronald at mulgara.org
ronald at mulgara.org
Sat Jul 12 19:44:57 UTC 2008
Author: ronald
Date: 2008-07-12 12:44:53 -0700 (Sat, 12 Jul 2008)
New Revision: 1079
Modified:
branches/mgr-121-lockrecovery/src/jar/resolver/java/org/mulgara/resolver/MulgaraInternalTransactionFactory.java
Log:
Set the transaction-timeout on the JTA TM to "infinite".
r1064 removed the setting of any timeout, but that only means the TM's default
timeout is now always used, which may be shorter than our timeout. Setting the
TM's timeout to infinite instead is the proper fix.
Modified: branches/mgr-121-lockrecovery/src/jar/resolver/java/org/mulgara/resolver/MulgaraInternalTransactionFactory.java
===================================================================
--- branches/mgr-121-lockrecovery/src/jar/resolver/java/org/mulgara/resolver/MulgaraInternalTransactionFactory.java 2008-07-11 17:49:38 UTC (rev 1078)
+++ branches/mgr-121-lockrecovery/src/jar/resolver/java/org/mulgara/resolver/MulgaraInternalTransactionFactory.java 2008-07-12 19:44:53 UTC (rev 1079)
@@ -84,6 +84,15 @@
this.explicitXA = null;
this.transactionManager = transactionManagerFactory.newTransactionManager();
+ try {
+ /* "disable" the TM's timeout because we implement timeouts ourselves; we also don't set
+ * it to our timeout because that can interfere with txn cleanup if the TM's timeout has
+ * fired by causing rollback or commit to fail.
+ */
+ this.transactionManager.setTransactionTimeout(Integer.MAX_VALUE);
+ } catch (SystemException es) {
+ logger.warn("Unable to disable transaction timeout on jta tm", es);
+ }
}
public MulgaraTransaction getTransaction(boolean write) throws MulgaraTransactionException {
More information about the Mulgara-svn
mailing list