[jboss-svn-commits] JBL Code SVN: r37760 - 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 Dec 1 05:27:14 EST 2011


Author: jhalliday
Date: 2011-12-01 05:27:14 -0500 (Thu, 01 Dec 2011)
New Revision: 37760

Modified:
   labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/coordinator/ArjunaTransactionImple.java
Log:
JTS cleanup leak fix (redux). JBTM-770


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	2011-12-01 10:25:54 UTC (rev 37759)
+++ labs/jbosstm/trunk/ArjunaJTS/jts/classes/com/arjuna/ats/internal/jts/orbspecific/coordinator/ArjunaTransactionImple.java	2011-12-01 10:27:14 UTC (rev 37760)
@@ -288,7 +288,7 @@
 	 * example) then we do nothing - could throw TransactionRequired or
 	 * INVALID_TRANSACTION. However, if it was rolledback then we throw
 	 * TRANSACTION_ROLLEDBACK. Seems like an inconsistency.
-	 * 
+	 *
 	 * OTS is vague as to what to do if the transaction has been terminated,
 	 * so we make a sensible choice.
 	 *
@@ -384,12 +384,12 @@
 					CompletionStatus.COMPLETED_NO);
 		case ActionStatus.H_MIXED:
 		    if (report_heuristics)
-			throw new HeuristicMixed();		    
+			throw new HeuristicMixed();
 		    break;
 		case ActionStatus.H_HAZARD:
 		default:
 		    if (report_heuristics)
-		        throw new HeuristicHazard();		    
+		        throw new HeuristicHazard();
 		    break;
 		}
 	}
@@ -1170,7 +1170,7 @@
 			currentStatus = determineStatus(this);
 
 			// https://jira.jboss.org/jira/browse/JBTM-608
-			
+
 			if ((currentStatus == Status.StatusActive) || (currentStatus == Status.StatusPreparing))// is transaction still
 			    // running?
 			{
@@ -1255,7 +1255,7 @@
 	         * If XA compliant then return context even if we're inactive. Otherwise
 	         * throw Unavailable for consistency with other OTS implementations.
 	         */
-	        
+
 	        if (!XA_COMPLIANT)
 	            throw new Unavailable();
 	    }
@@ -1506,14 +1506,14 @@
 	            }
 	        }
 	    }
-	    
+
 	    /*
 	     * If there's no problem so far then call beforeCompletion on the underlying TwoPhaseCoordinator.
 	     */
 
 	    if (!problem)
 	        problem = !super.beforeCompletion();
-	    
+
 	    if (problem)
 	    {
 	        if (exp != null)
@@ -1643,13 +1643,9 @@
 	        _synchs = null;
 	    }
 
-	    /*
-             * If there's no problem so far then call afterCompletion on the underlying TwoPhaseCoordinator.
-             */
+        boolean superProblem = !super.afterCompletion(myStatus == Status.StatusCommitted ? ActionStatus.COMMITTED : ActionStatus.ABORTED);
 
-            problem = problem || !super.afterCompletion(myStatus == Status.StatusCommitted ? ActionStatus.COMMITTED : ActionStatus.ABORTED);
-            
-	    if (problem)
+        if (problem || superProblem)
 	    {
 	        if (exp != null)
 	            throw exp;
@@ -2234,7 +2230,7 @@
 	static boolean _propagateTerminator = false;
 
 	static boolean _propagateRemainingTimeout = true;  // OTS 1.2 onwards supported this.
-	
+
 	private static final boolean XA_COMPLIANT = true; // if we ever want to disable this then add an mbean option.
 
 	static



More information about the jboss-svn-commits mailing list