2 Replies Latest reply on Dec 12, 2014 12:30 PM by Mark Lybarger

    From component bean to camel route

    Mark Lybarger Apprentice

      I'm looking to send from a component bean (service) to a camel route for routing the message to other components?  any help searching for an example would be nice!

       

      thanks,

      -mark-

        • 1. Re: From component bean to camel route
          Keith Babo Master

          Do you have a specific challenge/question w/r/t routing from bean services to Camel services?  From a switchyard.xml standpoint, you would just have two components : one for a bean service implementation and another for the camel implementation.  The bean service would have a reference defined which wired to the camel service.  Inside your bean service, use the following to make the reference available to your implementation:

           

          @Inject @Reference

          private SomeCamelService camelService;

           

          Check out the Consuming a Service section in the bean service docs for more info:

          Bean - SwitchYard - Project Documentation Editor

          1 of 1 people found this helpful
          • 2. Re: From component bean to camel route
            Mark Lybarger Apprentice

            No, I'm looking for a example,  My use case is this.  I have a bean that gets invoked from an service reference.  The bean does some up front processing, then needs to send a message to be routed on.   As part of the routing, it might get sent to another bean.  I guess what I don't know how to do is how to put my own objects onto the message context so that i can transfer information from my bean to the camel route.  Typically a camel route just has a configure() method on it(dsl route).

            So, for the below image, before the ProxyService camel route in the middle, I have a bean component in there.

            camel-soap-proxy.jpg