It can also call non static methods, if the bean has a default no-arg constructor.
Or if you have enlisted a bean instance in the registry, and refer to the bean id of this instance instead. On Tue, May 28, 2013 at 9:47 AM, Tarun Kumar <agrawal.taru...@gmail.com> wrote: > Hi Claus, > > Thanks for the reply. Bean-integration works only if method i am calling is > public static. What if i want to call non-static method? > > > On Sun, May 26, 2013 at 2:02 PM, Claus Ibsen <claus.ib...@gmail.com> wrote: > >> Ad 1) >> See this FAQ >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html >> >> >> Ad 2) >> See about bean integration and bean parameter binding at >> http://camel.apache.org/bean-integration.html >> >> And about the bean language >> http://camel.apache.org/bean-language.html >> >> On Thu, May 23, 2013 at 12:26 PM, Tarun Kumar <agrawal.taru...@gmail.com> >> wrote: >> > 1. In my routes, output exchange of first endpoint gives me one id that i >> > use in .to() to form endpoint url. So, basically my .to() url will look >> > like: >> > >> > abc.com/cid >> > >> > This cid i get from out exchange of first endpoint. How can i set that? >> > >> > 2. in camel dynamic router, i saw : >> > >> > >> > from("direct:start") >> > // use a bean as the dynamic router >> > .dynamicRouter(method(DynamicRouterTest.class, "slip")); >> > >> > public String slip(String body) { >> > bodies.add(body); >> > invoked++; >> > >> > if (invoked == 1) { >> > return "mock:a"; >> > } else if (invoked == 2) { >> > return "mock:b,mock:c"; >> > } else if (invoked == 3) { >> > return "direct:foo"; >> > } else if (invoked == 4) { >> > return "mock:result"; >> > } >> > >> > // no more so return null return null; >> > } >> > >> > >> > But, here my question is : who will set body (method parameter) in slip >> method? >> > >> > >> > Thanks, >> > >> > Tarun >> >> >> >> -- >> Claus Ibsen >> ----------------- >> www.camelone.org: The open source integration conference. >> >> Red Hat, Inc. >> FuseSource is now part of Red Hat >> Email: cib...@redhat.com >> Web: http://fusesource.com >> Twitter: davsclaus >> Blog: http://davsclaus.com >> Author of Camel in Action: http://www.manning.com/ibsen >> -- Claus Ibsen ----------------- www.camelone.org: The open source integration conference. Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen