jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r641274 - /jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java
Date Wed, 26 Mar 2008 12:02:19 GMT
Author: jukka
Date: Wed Mar 26 05:02:15 2008
New Revision: 641274

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

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

Modified: jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java?rev=641274&r1=641273&r2=641274&view=diff
==============================================================================
--- jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java
(original)
+++ jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java
Wed Mar 26 05:02:15 2008
@@ -462,7 +462,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);
+        }
     }
 
     /**
@@ -472,9 +474,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());
+        }
     }
 
     /**
@@ -483,7 +487,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