jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r919461 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerImpl.java
Date Fri, 05 Mar 2010 16:01:27 GMT
Author: jukka
Date: Fri Mar  5 16:01:27 2010
New Revision: 919461

URL: http://svn.apache.org/viewvc?rev=919461&view=rev
Log:
JCR-1440: NPE Thrown when two Cluster Nodes are hitting the same underlying database

Automatically update internal version history caches when receiving updates from other cluster
nodes.

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerImpl.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerImpl.java?rev=919461&r1=919460&r2=919461&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerImpl.java
Fri Mar  5 16:01:27 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.jackrabbit.core.version;
 
+import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Collection;
 import java.util.List;
@@ -692,6 +693,15 @@
         esc.setUserData(userData);
 
         sharedStateMgr.externalUpdate(changes, esc);
+
+        Collection<InternalVersionItem> items =
+            new ArrayList<InternalVersionItem>();
+        for (Map.Entry<ItemId, InternalVersionItem> entry : versionItems.entrySet())
{
+            if (changes.has(entry.getKey())) {
+                items.add(entry.getValue());
+            }
+        }
+        itemsUpdated(items);
     }
 
     //--------------------------------------------------------< inner classes >



Mime
View raw message