[jboss-svn-commits] JBL Code SVN: r24832 - labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Jan 20 11:49:33 EST 2009


Author: mark.little at jboss.com
Date: 2009-01-20 11:49:33 -0500 (Tue, 20 Jan 2009)
New Revision: 24832

Modified:
   labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionManagerImple.java
Log:
https://jira.jboss.org/jira/browse/JBTM-472

Modified: labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionManagerImple.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionManagerImple.java	2009-01-20 16:24:03 UTC (rev 24831)
+++ labs/jbosstm/trunk/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/TransactionManagerImple.java	2009-01-20 16:49:33 UTC (rev 24832)
@@ -106,33 +106,28 @@
 		 * If we are here then there is no transaction associated with the
 		 * thread.
 		 */
-
-		if (which != null)
+		
+		if ((which == null) || (which instanceof TransactionImple))
 		{
-			if (which instanceof TransactionImple)
-			{
-				TransactionImple theTransaction = (TransactionImple) which;
+		    TransactionImple theTransaction = (TransactionImple) which;
 
-				try
-				{
-					if (!AtomicAction.resume(theTransaction.getAtomicAction()))
-						throw new InvalidTransactionException();
+		    try
+		    {
+		        AtomicAction act = ((theTransaction == null) ? null : theTransaction.getAtomicAction());
+		        
+		        if (!AtomicAction.resume(act))
+		            throw new InvalidTransactionException();
 
-					theTransaction = null;
-				}
-				catch (Exception e2)
-				{
-					throw new javax.transaction.SystemException();
-				}
-			}
-			else
-				throw new InvalidTransactionException("Illegal type is: "
-						+ which);
+		        theTransaction = null;
+		    }
+		    catch (final Exception e2)
+		    {
+		        throw new javax.transaction.SystemException();
+		    }
 		}
 		else
-		{
-			// no transaction associated and none to be resumed.
-		}
+		    throw new InvalidTransactionException("Illegal type is: "
+		            + which);
 	}
 
 	/**




More information about the jboss-svn-commits mailing list