Return-Path: Delivered-To: apmail-camel-commits-archive@www.apache.org Received: (qmail 6789 invoked from network); 16 Apr 2011 12:24:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Apr 2011 12:24:45 -0000 Received: (qmail 636 invoked by uid 500); 16 Apr 2011 12:24:45 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 610 invoked by uid 500); 16 Apr 2011 12:24:45 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 603 invoked by uid 99); 16 Apr 2011 12:24:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Apr 2011 12:24:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Apr 2011 12:24:43 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E011A2388903; Sat, 16 Apr 2011 12:24:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1093978 - /camel/trunk/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheProducer.java Date: Sat, 16 Apr 2011 12:24:23 -0000 To: commits@camel.apache.org From: davsclaus@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110416122423.E011A2388903@eris.apache.org> 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");