Yes look at the EIP patterns such as Recipient List
On Thu, Oct 28, 2010 at 2:05 PM, Sri <[email protected]> wrote: > > Hello All, > > I am using camel-exec for to execute a java command. > > version I am using are > > Camel 2.5-SNAPSHOT and > JDK1.6 ver > > my requirement is set the parameters in the route from the headers I am > getting from end point. > > following is the route i am using . > > from("direct:titan") > .to("exec:java?workingDir="+<getFromHeader()>+"&useStderrOnEmptyStdout=true&args=-jar > Titan.jar "+getFromHeader() ) > .process(new Processor() { > public void process(Exchange exchange) > throws Exception { > String processOutput = (String) > exchange.getIn().getBody(String.class); > Integer exitCode = (Integer) > exchange.getIn().getHeader(ExecBinding.EXEC_EXIT_VALUE, Integer.class); > logger.info(processOutput); > logger.info("Exit code: " + exitCode); > > > I need to pass the highlighted part from the headers. > > > is there any way that I can send these parameters dynamically I mean > creating the destination end point string dynamically. > > > thanks in advance for your suggestions. > > Regards > Sri > > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/setting-headers-in-destination-endpoint-for-exec-tp3240403p3240403.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
