Hi Claus,

My camelContext has > 1 route. From testMethod, i dont want to send any
body or headers. i just want to invoke route1 from this method.


On Thu, Jul 18, 2013 at 9:33 PM, Claus Ibsen <claus.ib...@gmail.com> wrote:

> Hi
>
> See this page
> http://camel.apache.org/walk-through-an-example.html
>
> You can use a producer template to send a message to a Camel route
> from java code.
>
> On Thu, Jul 18, 2013 at 5:58 PM, Tarun Kumar <agrawal.taru...@gmail.com>
> wrote:
> > Hi,
> >
> > I want to invoke camel route from java code.
> > CamelContext doesn't seem to have any method to invoke route.
> > Here is what my code looks like:
> >
> > @Autowired
> > private CamelContext cc;
> >
> > public void testMethod() {
> >   System.out.println(cc.getRouteStatus("route1"));      // prints true
> >   // how to invoke this route - route1 from here?
> > }
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cib...@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>

Reply via email to