geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r280656 - /geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
Date Tue, 13 Sep 2005 21:03:42 GMT
Author: djencks
Date: Tue Sep 13 14:03:40 2005
New Revision: 280656

URL: http://svn.apache.org/viewcvs?rev=280656&view=rev
Log:
GERONIMO-1010 commit a read only tx with 2 or more resources

Modified:
    geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionImpl.java

Modified: geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionImpl.java?rev=280656&r1=280655&r2=280656&view=diff
==============================================================================
--- geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
(original)
+++ geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
Tue Sep 13 14:03:40 2005
@@ -573,11 +573,14 @@
                 continue;
             }
         }
-        try {
-            txnLog.commit(xid, logMark);
-        } catch (LogException e) {
-            log.error("Unexpected exception logging commit completion for xid " + xid, e);
-            throw (SystemException)new SystemException("Unexpected error logging commit completion
for xid " + xid).initCause(e);
+        //if all resources were read only, we didn't write a prepare record.
+        if (!rms.isEmpty()) {
+            try {
+                txnLog.commit(xid, logMark);
+            } catch (LogException e) {
+                log.error("Unexpected exception logging commit completion for xid " + xid,
e);
+                throw (SystemException)new SystemException("Unexpected error logging commit
completion for xid " + xid).initCause(e);
+            }
         }
         synchronized (this) {
             status = Status.STATUS_COMMITTED;



Mime
View raw message