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/11/03 11:10:23 UTC
svn commit: r1405315 - in /camel/branches/camel-2.9.x: ./
camel-core/src/main/java/org/apache/camel/processor/Enricher.java
Author: davsclaus
Date: Sat Nov 3 10:10:23 2012
New Revision: 1405315
URL: http://svn.apache.org/viewvc?rev=1405315&view=rev
Log:
Enricher EIP should store TO_ENDPOINT as property like the others do.
Modified:
camel/branches/camel-2.9.x/ (props changed)
camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/Enricher.java
Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Merged /camel/trunk:r1405313
Merged /camel/branches/camel-2.10.x:r1405314
Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/Enricher.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/Enricher.java?rev=1405315&r1=1405314&r2=1405315&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/Enricher.java (original)
+++ camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/Enricher.java Sat Nov 3 10:10:23 2012
@@ -140,12 +140,8 @@ public class Enricher extends ServiceSup
}
}
- // set header with the uri of the endpoint enriched so we can use that for tracing etc
- if (exchange.hasOut()) {
- exchange.getOut().setHeader(Exchange.TO_ENDPOINT, producer.getEndpoint().getEndpointUri());
- } else {
- exchange.getIn().setHeader(Exchange.TO_ENDPOINT, producer.getEndpoint().getEndpointUri());
- }
+ // set property with the uri of the endpoint enriched so we can use that for tracing etc
+ exchange.setProperty(Exchange.TO_ENDPOINT, producer.getEndpoint().getEndpointUri());
callback.done(false);
}
@@ -183,12 +179,8 @@ public class Enricher extends ServiceSup
}
}
- // set header with the uri of the endpoint enriched so we can use that for tracing etc
- if (exchange.hasOut()) {
- exchange.getOut().setHeader(Exchange.TO_ENDPOINT, producer.getEndpoint().getEndpointUri());
- } else {
- exchange.getIn().setHeader(Exchange.TO_ENDPOINT, producer.getEndpoint().getEndpointUri());
- }
+ // set property with the uri of the endpoint enriched so we can use that for tracing etc
+ exchange.setProperty(Exchange.TO_ENDPOINT, producer.getEndpoint().getEndpointUri());
callback.done(true);
return true;