[jboss-cvs] JBossAS SVN: r110415 - branches/JBPAPP_4_2_0_GA_CP/transaction/src/main/org/jboss/tm.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jan 20 09:49:07 EST 2011


Author: jbertram at redhat.com
Date: 2011-01-20 09:49:07 -0500 (Thu, 20 Jan 2011)
New Revision: 110415

Modified:
   branches/JBPAPP_4_2_0_GA_CP/transaction/src/main/org/jboss/tm/TransactionImpl.java
Log:
JBPAPP-5400

Modified: branches/JBPAPP_4_2_0_GA_CP/transaction/src/main/org/jboss/tm/TransactionImpl.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/transaction/src/main/org/jboss/tm/TransactionImpl.java	2011-01-20 14:23:53 UTC (rev 110414)
+++ branches/JBPAPP_4_2_0_GA_CP/transaction/src/main/org/jboss/tm/TransactionImpl.java	2011-01-20 14:49:07 UTC (rev 110415)
@@ -368,11 +368,10 @@
          if (status != Status.STATUS_COMMITTED)
          {
             Throwable causedByThrowable = cause;
-            if (getCommitStrategy() == 2) {
-               rollbackResources();
-            }
+            rollbackResources();
             completeTransaction();
-            checkHeuristics();
+            if (getCommitStrategy() == 2)
+               checkHeuristics();
             // throw jboss rollback exception with the saved off cause
             throw new JBossRollbackException("Unable to commit, tx=" +
                   toString() + " status=" + getStringStatus(status),
@@ -1360,6 +1359,7 @@
 
       // Set the status
       status = Status.STATUS_NO_TRANSACTION;
+      onePhaseCommitted = false;
 
       // Notify all threads waiting for the lock.
       notifyAll();
@@ -1889,7 +1889,10 @@
     */
    private int getCommitStrategy()
    {
-      int resourceCount = resources.size();
+      int resourceCount = 0;
+
+      if (resources != null)
+         resourceCount = resources.size();
       
       if (resourceCount == 0)
          return 0;



More information about the jboss-cvs-commits mailing list