commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1593852 - in /commons/proper/jcs/trunk: commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheManager.java commons-jcs-jcache/src/main/java/org/apache/commons/jcs/jcache/JCSCachingManager.java
Date Sun, 11 May 2014 20:23:22 GMT
Author: rmannibucau
Date: Sun May 11 20:23:22 2014
New Revision: 1593852

URL: http://svn.apache.org/r1593852
Log:
ensuring to get a new cache manager instance by cache manager

Modified:
    commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheManager.java
    commons/proper/jcs/trunk/commons-jcs-jcache/src/main/java/org/apache/commons/jcs/jcache/JCSCachingManager.java

Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheManager.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheManager.java?rev=1593852&r1=1593851&r2=1593852&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheManager.java
(original)
+++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/engine/control/CompositeCacheManager.java
Sun May 11 20:23:22 2014
@@ -222,6 +222,13 @@ public class CompositeCacheManager
         return new CompositeCacheManager();
     }
 
+    protected static CompositeCacheManager createInitializedInstance()
+    {
+        final CompositeCacheManager compositeCacheManager = new CompositeCacheManager();
+        compositeCacheManager.initialize();
+        return compositeCacheManager;
+    }
+
     /**
      * Default constructor
      */

Modified: commons/proper/jcs/trunk/commons-jcs-jcache/src/main/java/org/apache/commons/jcs/jcache/JCSCachingManager.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-jcache/src/main/java/org/apache/commons/jcs/jcache/JCSCachingManager.java?rev=1593852&r1=1593851&r2=1593852&view=diff
==============================================================================
--- commons/proper/jcs/trunk/commons-jcs-jcache/src/main/java/org/apache/commons/jcs/jcache/JCSCachingManager.java
(original)
+++ commons/proper/jcs/trunk/commons-jcs-jcache/src/main/java/org/apache/commons/jcs/jcache/JCSCachingManager.java
Sun May 11 20:23:22 2014
@@ -36,6 +36,14 @@ import static org.apache.commons.jcs.jca
 
 public class JCSCachingManager implements CacheManager
 {
+    private static class InternalManager extends CompositeCacheManager
+    {
+        protected static CompositeCacheManager create()
+        {
+            return createInitializedInstance();
+        }
+    }
+
     private final CachingProvider provider;
     private final URI uri;
     private final ClassLoader loader;
@@ -43,7 +51,7 @@ public class JCSCachingManager implement
     private final ConcurrentMap<String, Cache<?, ?>> caches = new ConcurrentHashMap<String,
Cache<?, ?>>();
     private final Properties configProperties;
     private volatile boolean closed = false;
-    private CompositeCacheManager delegate = CompositeCacheManager.getUnconfiguredInstance();;
+    private CompositeCacheManager delegate = InternalManager.create();
 
     public JCSCachingManager(final CachingProvider provider, final URI uri, final ClassLoader
loader, final Properties properties)
     {



Mime
View raw message