camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hekon...@apache.org
Subject git commit: [JGroups] Refactored exchange creation.
Date Thu, 26 Dec 2013 21:55:10 GMT
Updated Branches:
  refs/heads/master 24533f672 -> 67d3f8ead


[JGroups] Refactored exchange creation.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/67d3f8ea
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/67d3f8ea
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/67d3f8ea

Branch: refs/heads/master
Commit: 67d3f8eadf6912c64241a7652b36e746d0759014
Parents: 24533f6
Author: Henryk Konsek <hekonsek@gmail.com>
Authored: Thu Dec 26 22:54:50 2013 +0100
Committer: Henryk Konsek <hekonsek@gmail.com>
Committed: Thu Dec 26 22:54:50 2013 +0100

----------------------------------------------------------------------
 .../org/apache/camel/component/jgroups/JGroupsEndpoint.java | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/67d3f8ea/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsEndpoint.java
b/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsEndpoint.java
index 058954a..ce7a131 100644
--- a/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsEndpoint.java
+++ b/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsEndpoint.java
@@ -74,19 +74,24 @@ public class JGroupsEndpoint extends DefaultEndpoint {
         Exchange exchange = createExchange();
         exchange.getIn().setHeader(HEADER_JGROUPS_SRC, message.getSrc());
         exchange.getIn().setHeader(HEADER_JGROUPS_DEST, message.getDest());
-        exchange.getIn().setHeader(HEADER_JGROUPS_CHANNEL_ADDRESS, resolvedChannel.getAddress());
         exchange.getIn().setBody(message.getObject());
         return exchange;
     }
 
     public Exchange createExchange(View view) {
         Exchange exchange = createExchange();
-        exchange.getIn().setHeader(HEADER_JGROUPS_CHANNEL_ADDRESS, resolvedChannel.getAddress());
         exchange.getIn().setBody(view);
         return exchange;
     }
 
     @Override
+    public Exchange createExchange() {
+        Exchange exchange = super.createExchange();
+        exchange.getIn().setHeader(HEADER_JGROUPS_CHANNEL_ADDRESS, resolvedChannel.getAddress());
+        return exchange;
+    }
+
+    @Override
     protected void doStart() throws Exception {
         super.doStart();
         resolvedChannel = resolveChannel();


Mime
View raw message