jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpfis...@apache.org
Subject svn commit: r394937 - /jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
Date Tue, 18 Apr 2006 13:20:21 GMT
Author: dpfister
Date: Tue Apr 18 06:20:19 2006
New Revision: 394937

URL: http://svn.apache.org/viewcvs?rev=394937&view=rev
Log:
#JCR-395 Using transactions leads to memory leak

Modified:
    jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java

Modified: jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
URL: http://svn.apache.org/viewcvs/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java?rev=394937&r1=394936&r2=394937&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
Tue Apr 18 06:20:19 2006
@@ -291,10 +291,7 @@
         if (tx == null) {
             throw new XAException(XAException.XAER_NOTA);
         }
-        if (flags == TMSUCCESS || flags == TMFAIL) {
-            associate(null);
-            txGlobal.remove(xid);
-        } else if (flags == TMSUSPEND) {
+        if (flags == TMSUCCESS || flags == TMFAIL || flags == TMSUSPEND) {
             associate(null);
         } else {
             throw new XAException(XAException.XAER_INVAL);
@@ -325,6 +322,8 @@
             tx.prepare();
         }
         tx.commit();
+
+        txGlobal.remove(xid);
     }
 
     /**
@@ -336,6 +335,8 @@
             throw new XAException(XAException.XAER_NOTA);
         }
         tx.rollback();
+
+        txGlobal.remove(xid);
     }
 
     /**



Mime
View raw message