Author: davsclaus
Date: Sat Apr 16 12:24:23 2011
New Revision: 1093978

URL: http://svn.apache.org/viewvc?rev=1093978&view=rev
Log:
CAMEL-3862: Fixed camel-cache to replicate cache across nodes using listeners. 
Thanks to Piotr for the patch.

Modified:
    
camel/trunk/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheProducer.java

Modified: 
camel/trunk/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheProducer.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheProducer.java?rev=1093978&r1=1093977&r2=1093978&view=diff
==============================================================================
--- 
camel/trunk/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheProducer.java
 (original)
+++ 
camel/trunk/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheProducer.java
 Sat Apr 16 12:24:23 2011
@@ -102,13 +102,13 @@ public class CacheProducer extends Defau
                 LOG.debug("Adding an element with key " + key + " into the 
Cache");
             }
             element = createElementFromBody(exchange, 
CacheConstants.CACHE_OPERATION_ADD);
-            cache.put(new Element(key, element), true);
+            cache.put(new Element(key, element));
         } else if 
(operation.equalsIgnoreCase(CacheConstants.CACHE_OPERATION_UPDATE)) {
             if (LOG.isDebugEnabled()) {
                 LOG.debug("Updating an element with key " + key + " into the 
Cache");
             }
             element = createElementFromBody(exchange, 
CacheConstants.CACHE_OPERATION_UPDATE);
-            cache.put(new Element(key, element), true);
+            cache.put(new Element(key, element));
         } else if 
(operation.equalsIgnoreCase(CacheConstants.CACHE_OPERATION_DELETEALL)) {
             if (LOG.isDebugEnabled()) {
                 LOG.debug("Deleting All elements from the Cache");
@@ -118,7 +118,7 @@ public class CacheProducer extends Defau
             if (LOG.isDebugEnabled()) {
                 LOG.debug("Deleting an element with key " + key + " into the 
Cache");
             }
-            cache.remove(key, true);
+            cache.remove(key);
         } else if 
(operation.equalsIgnoreCase(CacheConstants.CACHE_OPERATION_GET)) {
             if (LOG.isDebugEnabled()) {
                 LOG.debug("Quering an element with key " + key + " from the 
Cache");


Reply via email to