portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r989438 - /portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java
Date Thu, 26 Aug 2010 03:43:55 GMT
Author: rwatler
Date: Thu Aug 26 03:43:55 2010
New Revision: 989438

URL: http://svn.apache.org/viewvc?rev=989438&view=rev
Log:
Correct clustered page notification eviction of properties cache concurrent modification exception
and logic typo to cover properties cache purge special case

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java?rev=989438&r1=989437&r2=989438&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java
Thu Aug 26 03:43:55 2010
@@ -223,8 +223,9 @@ public class DatabasePageManagerCache im
                             Set index = (Set)propertiesCacheIndexMap.get(path);
                             if (index != null)
                             {
-                                // remove all indexed fragment keys
-                                Iterator fragmentKeyIter = index.iterator();
+                                // remove all indexed fragment keys, (copy first since "quiet"
removes
+                                // from fragment property caches will side effect this set
while iterating)
+                                Iterator fragmentKeyIter = (new ArrayList(index)).iterator();
                                 while (fragmentKeyIter.hasNext())
                                 {
                                     String fragmentKey = (String)fragmentKeyIter.next();
@@ -235,7 +236,7 @@ public class DatabasePageManagerCache im
                                     {
                                         clearPrincipalPropertiesCache(fragmentId);
                                     }
-                                    // remove fragment property cache
+                                    // ensure removed from fragment property cache
                                     DatabasePageManagerCache.propertiesCache.removeQuiet(fragmentKey);
                                     DatabasePageManagerCache.propertiesPathCache.removeQuiet(fragmentKey);
                                 }
@@ -341,7 +342,7 @@ public class DatabasePageManagerCache im
                         }
                     }                    
                 }
-                else if (fragmentKeyOrPath != null)
+                else if (fragmentKeyOrPath == null)
                 {
                     // remove all cache keys from properties cache index
                     synchronized (DatabasePageManagerCache.class)



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message