camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ioca...@apache.org
Subject svn commit: r1214132 - in /camel/trunk/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast: HazelcastComponentHelper.java listener/CamelListener.java
Date Wed, 14 Dec 2011 09:52:53 GMT
Author: iocanel
Date: Wed Dec 14 09:52:52 2011
New Revision: 1214132

URL: http://svn.apache.org/viewvc?rev=1214132&view=rev
Log:
[CAMEL-4776] Modified Hazelcast helper method to properly add the headers & body to the
in message.

Modified:
    camel/trunk/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastComponentHelper.java
    camel/trunk/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/listener/CamelListener.java

Modified: camel/trunk/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastComponentHelper.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastComponentHelper.java?rev=1214132&r1=1214131&r2=1214132&view=diff
==============================================================================
--- camel/trunk/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastComponentHelper.java
(original)
+++ camel/trunk/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastComponentHelper.java
Wed Dec 14 09:52:52 2011
@@ -50,14 +50,14 @@ public class HazelcastComponentHelper {
     }
 
     public static void setListenerHeaders(Exchange ex, String listenerType, String listenerAction,
String cacheName) {
-        ex.getOut().setHeader(HazelcastConstants.CACHE_NAME, cacheName);
+        ex.getIn().setHeader(HazelcastConstants.CACHE_NAME, cacheName);
         HazelcastComponentHelper.setListenerHeaders(ex, listenerType, listenerAction);
     }
 
     public static void setListenerHeaders(Exchange ex, String listenerType, String listenerAction)
{
-        ex.getOut().setHeader(HazelcastConstants.LISTENER_ACTION, listenerAction);
-        ex.getOut().setHeader(HazelcastConstants.LISTENER_TYPE, listenerType);
-        ex.getOut().setHeader(HazelcastConstants.LISTENER_TIME, new Date().getTime());
+        ex.getIn().setHeader(HazelcastConstants.LISTENER_ACTION, listenerAction);
+        ex.getIn().setHeader(HazelcastConstants.LISTENER_TYPE, listenerType);
+        ex.getIn().setHeader(HazelcastConstants.LISTENER_TIME, new Date().getTime());
     }
 
     /**

Modified: camel/trunk/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/listener/CamelListener.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/listener/CamelListener.java?rev=1214132&r1=1214131&r2=1214132&view=diff
==============================================================================
--- camel/trunk/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/listener/CamelListener.java
(original)
+++ camel/trunk/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/listener/CamelListener.java
Wed Dec 14 09:52:52 2011
@@ -36,11 +36,11 @@ public class CamelListener {
         Exchange exchange = consumer.getEndpoint().createExchange();
 
         // set object to body
-        exchange.getOut().setBody(value);
+        exchange.getIn().setBody(value);
 
         // set headers
         if (key != null) {
-            exchange.getOut().setHeader(HazelcastConstants.OBJECT_ID, key);
+            exchange.getIn().setHeader(HazelcastConstants.OBJECT_ID, key);
         }
 
         HazelcastComponentHelper.setListenerHeaders(exchange, HazelcastConstants.CACHE_LISTENER,
operation, cacheName);



Mime
View raw message