Hi Sri,

the supported headers are defined in org.apache.camel.component.exec.ExecBinding.

In your case ExecBinding.EXEC_COMMAND_ARGS header which contains a List<String> where you can find you workingDir argument.

Regards
JB

On 10/28/2010 02:05 PM, Sri 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






Reply via email to