camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem jiang <willem.ji...@gmail.com>
Subject Re: invoking camel route
Date Fri, 19 Jul 2013 06:49:33 GMT
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.ibsen@gmail.com (mailto:claus.ibsen@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.tarun23@gmail.com (mailto:agrawal.tarun23@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: cibsen@redhat.com (mailto:cibsen@redhat.com)
> > Twitter: davsclaus
> > Blog: http://davsclaus.com
> > Author of Camel in Action: http://www.manning.com/ibsen
>  




Mime
View raw message