jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r638060 - /jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java
Date Mon, 17 Mar 2008 20:39:27 GMT
Author: jukka
Date: Mon Mar 17 13:39:18 2008
New Revision: 638060

URL: http://svn.apache.org/viewvc?rev=638060&view=rev
Log:
1.4: Merged revision 637865 (JCR-1480, without test cases)

Modified:
    jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java

Modified: jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java?rev=638060&r1=638059&r2=638060&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java
(original)
+++ jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java
Mon Mar 17 13:39:18 2008
@@ -463,7 +463,9 @@
      * Delegate the call to our XA item state manager.
      */
     public void prepare(TransactionContext tx) throws TransactionException {
-        ((XAItemStateManager) stateMgr).prepare(tx);
+        if (vmgrLocked) {
+            ((XAItemStateManager) stateMgr).prepare(tx);
+        }
     }
 
     /**
@@ -473,9 +475,11 @@
      * global repository manager to update its caches.
      */
     public void commit(TransactionContext tx) throws TransactionException {
-        ((XAItemStateManager) stateMgr).commit(tx);
-        Map xaItems = (Map) tx.getAttribute(ITEMS_ATTRIBUTE_NAME);
-        vMgr.itemsUpdated(xaItems.values());
+        if (vmgrLocked) {
+            ((XAItemStateManager) stateMgr).commit(tx);
+            Map xaItems = (Map) tx.getAttribute(ITEMS_ATTRIBUTE_NAME);
+            vMgr.itemsUpdated(xaItems.values());
+        }
     }
 
     /**
@@ -484,7 +488,9 @@
      * Delegate the call to our XA item state manager.
      */
     public void rollback(TransactionContext tx) {
-        ((XAItemStateManager) stateMgr).rollback(tx);
+        if (vmgrLocked) {
+            ((XAItemStateManager) stateMgr).rollback(tx);
+        }
     }
 
     /**



Mime
View raw message