You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2012/09/22 10:28:34 UTC

svn commit: r1388751 - in /camel/branches/camel-2.10.x: ./ components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheEndpoint.java

Author: davsclaus
Date: Sat Sep 22 08:28:33 2012
New Revision: 1388751

URL: http://svn.apache.org/viewvc?rev=1388751&view=rev
Log:
CAMEL-5623: Cache-Component doesn't work with decorated Caches. Thanks to Reinhard Prechtl for the patch.

Modified:
    camel/branches/camel-2.10.x/   (props changed)
    camel/branches/camel-2.10.x/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheEndpoint.java

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1388750

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.10.x/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheEndpoint.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheEndpoint.java?rev=1388751&r1=1388750&r2=1388751&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheEndpoint.java (original)
+++ camel/branches/camel-2.10.x/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheEndpoint.java Sat Sep 22 08:28:33 2012
@@ -103,15 +103,15 @@ public class CacheEndpoint extends Defau
      */
     public Ehcache initializeCache() {
         CacheManager cacheManager = getCacheManagerFactory().getInstance();
-        Cache cache;
+        Ehcache cache;
         if (cacheManager.cacheExists(config.getCacheName())) {
             if (LOG.isTraceEnabled()) {
                 LOG.trace("Found an existing cache: {}", config.getCacheName());
                 LOG.trace("Cache {} currently contains {} elements",
                         config.getCacheName(),
-                        cacheManager.getCache(config.getCacheName()).getSize());
+                        cacheManager.getEhcache(config.getCacheName()).getSize());
             }
-            cache = cacheManager.getCache(config.getCacheName());
+            cache = cacheManager.getEhcache(config.getCacheName());
         } else {
             cache = new Cache(config.getCacheName(),
                     config.getMaxElementsInMemory(),