camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Error handling with recipientList
Date Thu, 05 Nov 2009 18:04:10 GMT
On Thu, Nov 5, 2009 at 4:09 PM, mcrive <mcrive@optasportsdata.com> wrote:
>
> 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
>
>

Hi

I just added a FTP unit test that uses recipient list and error
handling. And it works for me.
http://svn.apache.org/viewvc?rev=833105&view=rev


>
> 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.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message