If you want to invoke the route, you still need to send a message to the route, 
even the message body and header are empty.


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Friday, July 19, 2013 at 11:32 AM, Tarun Kumar wrote:

> 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 
> (mailto: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 
> > (mailto: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 (mailto:cib...@redhat.com)
> > Twitter: davsclaus
> > Blog: http://davsclaus.com
> > Author of Camel in Action: http://www.manning.com/ibsen
>  



Reply via email to