title: Camel not passing Exchange properties
body: <p>i need to pass some parameters on the properties of the Exchange object. As far as i know and read about it, it's better to create my parameters on the exchange properties, because the headers of the message can change during routing.
  Camel is creating new exchange from route to route, but not preserving history of any of my parameters.</p>
  
  <p>Now some context: I'm using Camel (2.16.1) deployed on WebLogic 12C</p>
  
  <p>The relevant Maven part:</p>
  
  <pre><code>&lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;camel.version&gt;2.16.1&lt;/camel.version&gt;
    &lt;/properties&gt;
  
    &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
              &lt;version&gt;4.1.6.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
              &lt;artifactId&gt;camel-core&lt;/artifactId&gt;
              &lt;version&gt;${camel.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
              &lt;artifactId&gt;camel-spring&lt;/artifactId&gt;
              &lt;version&gt;${camel.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
              &lt;artifactId&gt;camel-cxf&lt;/artifactId&gt;
              &lt;version&gt;${camel.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
              &lt;artifactId&gt;camel-jms&lt;/artifactId&gt;
              &lt;version&gt;${camel.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
              &lt;artifactId&gt;camel-test-spring&lt;/artifactId&gt;
              &lt;version&gt;${camel.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.ejb&lt;/groupId&gt;
              &lt;artifactId&gt;ejb-api&lt;/artifactId&gt;
              &lt;version&gt;3.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
              &lt;version&gt;1.7.13&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  </code></pre>
  
  <p>The Camel Context:</p>
  
  <pre><code>&lt;camelContext xmlns="http://camel.apache.org/schema/spring"&gt;
      &lt;route&gt;
          &lt;from uri="file:/Users/user/camel-test/in?noop=false" /&gt;
          &lt;process ref="TestProcess"/&gt;
          &lt;to uri="file:/Users/user/camel-test/out" /&gt;
      &lt;/route&gt;
      &lt;route&gt;
          &lt;from uri="file:/Users/user/camel-test/out?noop=false" /&gt;
          &lt;process ref="TestProcess"/&gt;
          &lt;to uri="jms:CamelServer/CamelJMSModule!CamelQueue" /&gt;
      &lt;/route&gt;
  &lt;/camelContext&gt;
  </code></pre>
  
  <p>As you can see i'm using a class called TestProcess, to affect the Exchange object like this:</p>
  
  <pre><code>package com.test.camel;
  
  import org.apache.camel.Exchange;
  import org.apache.camel.Processor;
  
  public class TestProcess implements Processor {
  
      public void process(Exchange exchange) throws Exception {
  
          //Just to get the Exchange ID, this ID is changing between routes
          System.out.println(exchange.getExchangeId());
  
          //The first time i try to get my custom property should return null of course
          System.out.println(exchange.getProperty("MY_PARAMETER_ID"));
  
          //So if my property does not exist in properties i will create it
          if(exchange.getProperty("MY_PARAMETER_ID") == null) {
              exchange.setProperty("MY_PARAMETER_ID", "SOME_VALUE");  
          }
      }
  }
  </code></pre>
  
  <p>My problem is: I never get my property on properties during all routing. 
  My goal is to set some properties when Camel starts to route my message, and have those properties available till the end of process.</p>
  
  <p>The class TestProcess demonstrates how i trying to access the properties.
  I also tried on the XML like, not working as well:</p>
  
  <pre><code>&lt;camelContext xmlns="http://camel.apache.org/schema/spring"&gt;
      &lt;route&gt;
          &lt;from uri="file:/Users/user/camel-test/in?noop=false" /&gt;
          &lt;setProperty propertyName="MY_PARAMETER_ID"&gt;
                  &lt;simple&gt;some-value&lt;/simple&gt;
          &lt;/setProperty&gt;
          &lt;to uri="file:/Users/user/camel-test/out" /&gt;
      &lt;/route&gt;
      &lt;route&gt;
          &lt;from uri="file:/Users/user/camel-test/out?noop=false" /&gt;
          &lt;log message="MY_PARAMETER_ID = ${header.MY_PARAMETER_ID}" /&gt;
          &lt;to uri="jms:CamelServer/CamelJMSModule!CamelQueue" /&gt;
      &lt;/route&gt;
  &lt;/camelContext&gt;
  </code></pre>
  
  <p>UPDATE: After a couple of you say that it was not possible to send property/header attributes from a file endpoint, just jms or direct, i tried using JMS but i still have the same problem, as you can see on the context:</p>
  
  <pre><code>&lt;camelContext xmlns="http://camel.apache.org/schema/spring"&gt;
      &lt;route&gt;
          &lt;from uri="jms:CamelServer/CamelJMSModule!ReceiverQueue" /&gt;
          &lt;setProperty propertyName="MY_PARAMETER_ID"&gt;
              &lt;simple&gt;some-value&lt;/simple&gt;
          &lt;/setProperty&gt;
          &lt;to uri="jms:CamelServer/CamelJMSModule!CamelQueue" /&gt;
      &lt;/route&gt;
      &lt;route&gt;
          &lt;from uri="jms:CamelServer/CamelJMSModule!CamelQueue" /&gt;
          &lt;log message="MY_PARAMETER_ID = ${header.MY_PARAMETER_ID}" /&gt;
          &lt;to uri="jms:CamelServer/CamelJMSModule!FinalQueue" /&gt;
      &lt;/route&gt;
  &lt;/camelContext&gt;
  </code></pre>
  
  <p>Any ideas? What i'm doing wrong?</p>
  
  <p>With the example where i'm only using JMS, the only attribute that didn't change from on Exchange object to the other is the:</p>
  
  <pre><code>exchange.getIn().getHeader("breadcrumbId")
  </code></pre>
  
  <p>According to Camel documentation this is:</p>
  
  <blockquote>
    <p>Camel 2.8: An unique id used for tracking messages across transports.</p>
  </blockquote>
  
  <p>But this breadcrumbId only remains the same with JMS routes NOT with FILE routes.</p>
  
  <p>Thanks!</p>