[jboss-svn-commits] JBL Code SVN: r18716 - labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/coordinator.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Mar 6 06:34:01 EST 2008
Author: mark.little at jboss.com
Date: 2008-03-06 06:34:00 -0500 (Thu, 06 Mar 2008)
New Revision: 18716
Modified:
labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/coordinator/ArjunaTransactionImple.java
Log:
http://jira.jboss.com/jira/browse/JBTM-337
Modified: labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/coordinator/ArjunaTransactionImple.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/coordinator/ArjunaTransactionImple.java 2008-03-06 11:30:38 UTC (rev 18715)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/coordinator/ArjunaTransactionImple.java 2008-03-06 11:34:00 UTC (rev 18716)
@@ -2122,13 +2122,18 @@
*/
/*
- * Currently send over the original timeout, and not
- * what is remaining. Will make this configurable until
- * the specification is clarified.
+ * By default we send over the time remaining (in seconds), since that
+ * is what OTS 1.2 requires. For backward compatibility with earlier
+ * versions, there's a configurable option.
*/
if (TransactionReaper.transactionReaper() != null)
+ {
+ if (_propagateRemainingTimeout)
+ context.timeout = TransactionReaper.transactionReaper().getRemainingTimeout(control);
+ else
context.timeout = TransactionReaper.transactionReaper().getTimeout(control);
+ }
else
context.timeout = 0;
}
@@ -2338,6 +2343,8 @@
static boolean _checkedTransactions = false;
static boolean _propagateTerminator = false;
+
+ static boolean _propagateRemainingTimeout = true; // OTS 1.2 onwards supported this.
/**
* @message com.arjuna.ats.internal.jts.orbspecific.coordinator.ipunknown
@@ -2395,6 +2402,14 @@
if (propTerm.compareTo("YES") == 0)
_propagateTerminator = true;
}
+
+ String propRemainingTimeout = jtsPropertyManager.propertyManager.getProperty(com.arjuna.ats.jts.common.Environment.OTS_1_0_TIMEOUT_PROPAGATION);
+
+ if (propRemainingTimeout != null)
+ {
+ if (propTerm.compareTo("NO") == 0)
+ _propagateRemainingTimeout = false;
+ }
}
}
More information about the jboss-svn-commits
mailing list