[jboss-svn-commits] JBL Code SVN: r24829 - labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Jan 20 11:18:50 EST 2009


Author: mark.little at jboss.com
Date: 2009-01-20 11:18:50 -0500 (Tue, 20 Jan 2009)
New Revision: 24829

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

Modified: labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/TransactionManagerImple.java
===================================================================
--- labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/TransactionManagerImple.java	2009-01-20 16:18:35 UTC (rev 24828)
+++ labs/jbosstm/trunk/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/TransactionManagerImple.java	2009-01-20 16:18:50 UTC (rev 24829)
@@ -115,48 +115,46 @@
 	public void resume (Transaction which) throws InvalidTransactionException,
 			java.lang.IllegalStateException, javax.transaction.SystemException
 	{
-		if (jtaLogger.logger.isDebugEnabled())
-		{
-			jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionManagerImple.resume");
-		}
+	    if (jtaLogger.logger.isDebugEnabled())
+	    {
+	        jtaLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jta.logging.FacilityCode.FAC_JTA, "TransactionManagerImple.resume");
+	    }
 
-		super.checkTransactionState();
+	    super.checkTransactionState();
 
-        if (which != null)
-        {
-            if (which instanceof TransactionImple)
-            {
-                TransactionImple theTransaction = (TransactionImple) which;
+	    /*
+	     * Need to resume null as the standard says this is the
+	     * same as suspend (breaking thread-to-transaction association).
+	     */
 
-                try
-                {
-                    ControlWrapper cont = theTransaction.getControlWrapper();
+	    if ((which == null) || (which instanceof TransactionImple))
+	    {
+	        TransactionImple theTransaction = (TransactionImple) which;
 
-                    OTSImpleManager.current().resumeWrapper(cont);
+	        try
+	        {
+	            ControlWrapper cont = ((theTransaction == null) ? null : theTransaction.getControlWrapper());
 
-                    cont = null;
-                    theTransaction = null;
-                }
-                catch (org.omg.CosTransactions.InvalidControl e1)
-                {
-                    //throw new InvalidTransactionException();
-                }
-                catch (org.omg.CORBA.SystemException e2)
-                {
-                    throw new javax.transaction.SystemException();
-                }
-            }
-            else
-            {
-                throw new InvalidTransactionException();
-            }
-        }
-        else
-        {
-            // resume a null tx == nothing to do
-        }
-    }
+	            OTSImpleManager.current().resumeWrapper(cont);
 
+	            cont = null;
+	            theTransaction = null;
+	        }
+	        catch (org.omg.CosTransactions.InvalidControl e1)
+	        {
+	            throw new InvalidTransactionException();
+	        }
+	        catch (org.omg.CORBA.SystemException e2)
+	        {
+	            throw new javax.transaction.SystemException();
+	        }
+	    }
+	    else
+	    {
+	        throw new InvalidTransactionException();
+	    }
+	}
+
 	/**
 	 * Creates a TransactionManageImple from the given information.
 	 *




More information about the jboss-svn-commits mailing list