2 Replies Latest reply on May 11, 2015 8:01 AM by Mark Lybarger

    pass context properties to camel route

    Mark Lybarger Apprentice

      I have a simple switchyard application. input from a file to a bean component to a camel route.  i would like the bean to be able to set a property which can be read by the camel route. sort of like a session property in the http servlet world.

      2015-05-08 16_37_59-JBoss - bar_src_main_resources_META-INF_switchyard.xml - JBoss Developer Studio.png

      The bean has code to get the context and set a property, but the route doesn't seem to have that:



      public class ExampleBean implements Example {




        Context context;



        Exchange exchange;




        Ex ex;



        public String message(String m) {

        Context c = exchange.getContext();

        c.setProperty("foo", "bar", Scope.EXCHANGE);


        return null;






      This is not working. The camel route doesn't show the property on the exchange.  How can I add a property to be sent to the camel route?