jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r409542 - /jackrabbit/branches/1.0/jackrabbit/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
Date Fri, 26 May 2006 02:32:04 GMT
Author: jukka
Date: Thu May 25 19:32:04 2006
New Revision: 409542

URL: http://svn.apache.org/viewvc?rev=409542&view=rev
Log:
1.0: Merged revision 394937: JCR-395

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

Modified: jackrabbit/branches/1.0/jackrabbit/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.0/jackrabbit/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java?rev=409542&r1=409541&r2=409542&view=diff
==============================================================================
--- jackrabbit/branches/1.0/jackrabbit/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
(original)
+++ jackrabbit/branches/1.0/jackrabbit/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
Thu May 25 19:32:04 2006
@@ -37,6 +37,7 @@
 import javax.transaction.xa.Xid;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Collections;
 
 /**
  * Session extension that provides XA support.
@@ -52,7 +53,7 @@
     /**
      * Global transactions
      */
-    private static final Map txGlobal = new HashMap();
+    private static final Map txGlobal = Collections.synchronizedMap(new HashMap());
 
     /**
      * Default transaction timeout, in seconds.
@@ -321,6 +322,8 @@
             tx.prepare();
         }
         tx.commit();
+
+        txGlobal.remove(xid);
     }
 
     /**
@@ -332,6 +335,8 @@
             throw new XAException(XAException.XAER_NOTA);
         }
         tx.rollback();
+
+        txGlobal.remove(xid);
     }
 
     /**



Mime
View raw message