Author: davsclaus
Date: Sat Nov  3 10:08:13 2012
New Revision: 1405314

URL: http://svn.apache.org/viewvc?rev=1405314&view=rev
Log:
Enricher EIP should store TO_ENDPOINT as property like the others do.

Modified:
    camel/branches/camel-2.10.x/   (props changed)
    
camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/processor/Enricher.java

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1405313

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: 
camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/processor/Enricher.java
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/processor/Enricher.java?rev=1405314&r1=1405313&r2=1405314&view=diff
==============================================================================
--- 
camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/processor/Enricher.java
 (original)
+++ 
camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/processor/Enricher.java
 Sat Nov  3 10:08:13 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;


Reply via email to