portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r643129 - /portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java
Date Mon, 31 Mar 2008 20:25:11 GMT
Author: ate
Date: Mon Mar 31 13:25:06 2008
New Revision: 643129

URL: http://svn.apache.org/viewvc?rev=643129&view=rev
Log:
Reloading the Spring container with different DatabasePageManager settings for things like
constraints/permissions and alike didn't work as the DatabasePageManagerCache only would initialize
once.

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=643129&r1=643128&r2=643129&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
Mon Mar 31 13:25:06 2008
@@ -55,17 +55,18 @@
      */
     public synchronized static void cacheInit(DatabasePageManager dbPageManager)
     {
-        if (pageManager == null)
+        if (pageManager != null)
         {
-            cacheByOID = new HashMap();
-            cacheLRUList = new LinkedList();
-            cacheByPath = new HashMap();
-            cacheSize = dbPageManager.getCacheSize();
-            cacheExpiresSeconds = dbPageManager.getCacheExpiresSeconds();
-            constraintsEnabled = dbPageManager.getConstraintsEnabled();
-            permissionsEnabled = dbPageManager.getPermissionsEnabled();
-            pageManager = dbPageManager;
+            cacheClear();
         }
+        cacheByOID = new HashMap();
+        cacheLRUList = new LinkedList();
+        cacheByPath = new HashMap();
+        cacheSize = dbPageManager.getCacheSize();
+        cacheExpiresSeconds = dbPageManager.getCacheExpiresSeconds();
+        constraintsEnabled = dbPageManager.getConstraintsEnabled();
+        permissionsEnabled = dbPageManager.getPermissionsEnabled();
+        pageManager = dbPageManager;
     }
 
     /**



---------------------------------------------------------------------
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