geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r990077 - /geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/CommitTask.java
Date Fri, 27 Aug 2010 09:33:58 GMT
Author: xuhaihong
Date: Fri Aug 27 09:33:58 2010
New Revision: 990077

URL: http://svn.apache.org/viewvc?rev=990077&view=rev
Log:
GERONIMO-5558 Transaction Commit status is not configured correctly

Modified:
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/CommitTask.java

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/CommitTask.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/CommitTask.java?rev=990077&r1=990076&r2=990077&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/CommitTask.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/CommitTask.java
Fri Aug 27 09:33:58 2010
@@ -22,12 +22,8 @@ package org.apache.geronimo.transaction.
 
 import java.util.Iterator;
 import java.util.List;
-import java.util.TimerTask;
 
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
 import javax.transaction.Status;
-import javax.transaction.SystemException;
 import javax.transaction.xa.XAException;
 import javax.transaction.xa.Xid;
 
@@ -62,8 +58,8 @@ public class CommitTask implements Runna
         synchronized (this) {
             status = Status.STATUS_COMMITTING;
         }
-        for (Iterator i = rms.iterator(); i.hasNext();) {
-            TransactionBranch manager = (TransactionBranch) i.next();
+        for (Iterator<TransactionBranch> i = rms.iterator(); i.hasNext();) {
+            TransactionBranch manager = i.next();
             try {
                 try {
                     manager.getCommitter().commit(manager.getBranchId(), false);
@@ -106,7 +102,7 @@ public class CommitTask implements Runna
             }
         }
         //if all resources were read only, we didn't write a prepare record.
-        if (rms.isEmpty() && status == Status.STATUS_COMMITTED) {
+        if (rms.isEmpty() && status == Status.STATUS_COMMITTING) {
             try {
                 txLog.commit(xid, logMark);
                 synchronized (this) {



Mime
View raw message