gdamour 2004/07/27 19:22:53
Modified: modules/transaction/src/java/org/apache/geronimo/transaction/manager RecoveryImpl.java Log: Tests that at least one transaction branch has been removed prior to log the committed event. Indeed, if all the branches have been processed and if no branch has been removed, then the committed event has already been logged. Revision Changes Path 1.5 +2 -2 incubator-geronimo/modules/transaction/src/java/org/apache/geronimo/transaction/manager/RecoveryImpl.java Index: RecoveryImpl.java =================================================================== RCS file: /home/cvs/incubator-geronimo/modules/transaction/src/java/org/apache/geronimo/transaction/manager/RecoveryImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- RecoveryImpl.java 27 Jul 2004 03:52:15 -0000 1.4 +++ RecoveryImpl.java 28 Jul 2004 02:22:53 -0000 1.5 @@ -152,7 +152,7 @@ if (warn && removed == 0) { log.error("XAResource named: " + name + " returned branch xid for xid: " + xidBranchesPair.getXid() + " but was not registered with that transaction!"); } - if (xidBranchesPair.getBranches().isEmpty()) { + if (xidBranchesPair.getBranches().isEmpty() && 0 != removed ) { try { ourXids.remove(new ByteArrayWrapper(xidBranchesPair.getXid().getGlobalTransactionId())); txLog.commit(xidBranchesPair.getXid(), xidBranchesPair.getMark());