camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcrive <mcr...@optasportsdata.com>
Subject Re: Error handling with recipientList
Date Thu, 05 Nov 2009 15:09:54 GMT

doing the same thing with Camel 2.1 I can see what I am expecting
so it is definetly something with FTP component...
seems it is not keeping headers that are set on interceptSendToEndpoint



mcrive wrote:
> 
> 
> I think the issue is in the FTP component,
> by using following context
> 
> context.addRoutes(new RouteBuilder() {
> 
> 	public void configure() {
> 
> 		onException(Exception.class)
> 				.handled(true)
> 			
> .to("log:org.apache.camel.example?showHeaders=true&showCaughtException=true");
> 
> 		interceptSendToEndpoint("(ftp|direct):.*").process(new Processor() {
> 				public void process(Exchange exchange) throws Exception {
> 						String target =
> exchange.getIn().getHeader(Exchange.INTERCEPTED_ENDPOINT, String.class);
> 						exchange.getIn().setHeader("target", target);
> 						System.out.println("target:" + target);
> 				}
> 		});
> 
> 		from("direct:start").recipientList(header("foo"));
> 		from("direct:kabom").throwException(new
> IllegalArgumentException("Damn"));
> 
> 	}
> });
> 
> context.start();
> 
> String foo =
> "direct:foo,direct:kabom,ftp://notexist@ftp.unknown.com?password=what&tempPrefix=tmp&fileName=cif-prototype/feed.xml";
> template.sendBodyAndHeader("direct:start", "Hello World", "foo", foo);
> 
> 
> the log shows me target=direct://kabom for the error raised on
> direct:kabom enpoint
> it shows me target=direct://start for the error raised on the ftp
> endpoint.
> that's the issue I am facing, I am not able to see target=ftp://... when
> catching the exception on the FTP endpoint, looks like the header is not
> propagated to the FTP component.
> 
> 

-- 
View this message in context: http://old.nabble.com/Error-handling-with-recipientList-tp26196454p26215744.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message