I am using 1.1.0 version.

I updated to latest snapshot from the download page and the issue seemed to
be fixed. But then I noticed that both the files now go to failure folder
(each has 3 copies !!), even though one of them is not throwing any
exception. And success folder is not getting created as expected.

So, I reverted back to 1.1.0 version. And again noticed that both files now
go to success folder even though one of them throws exception. The failed
file correctly goes to failure folder (2 copies indicating failure at two
channels). I can live with this behavior.

But in the below code, no matter how many times I tried, global
errorHandler() DOES NOT work.





James.Strachan wrote:
> 
> Can you confirm which version of Camel you are using?
> 
> On 01/10/2007, ajayappa <[EMAIL PROTECTED]> wrote:
>>
>> I've same problem. In the below case, if I've two files and one causes
>> failure, both end up in success folder and the one which caused failure
>> goes
>> to failure folder.
>>
>> One more issue, global errorHandler() commented below DOES NOT WORK.
>>
>> Am I doing something wrong ??
>>
>>         public static void main(String[] args) throws Exception {
>>                 CamelContext ctx = new DefaultCamelContext();
>>
>>                 ctx.addRoutes(new RouteBuilder() {
>>                         public void configure() throws Exception {
>> //
>> errorHandler(deadLetterChannel("file:src/data/../failure/").maximumRedeliveries(0))
>>                                
>> from("file:src/data?noop=true&recursive=false")
>>
>> .errorHandler(deadLetterChannel("file:src/data/../failure/").maximumRedeliveries(0))
>>                                 .convertBodyTo(PersonDocument.class)
>>
>> .errorHandler(deadLetterChannel("file:src/data/../failure/").maximumRedeliveries(0))
>>                                 .process(new Processor() {
>>                                                 public void
>> process(Exchange arg0) throws Exception {
>>                                                        
>> System.err.println(arg0);
>>                                                         PersonDocument m
>> = (PersonDocument) arg0.getIn().getBody();
>>                                                        
>> System.err.println(m.getAbstract());
>> //                                                      if(1==1) throw
>> new IllegalArgumentException();
>>                                                 }
>>                                        
>> }).to("file:src/data/../success");
>>                         }
>>                 });
>>
>>
>>
>>
>>
>> James.Strachan wrote:
>> >
>> > On 9/6/07, Ravi Narayana <[EMAIL PROTECTED]> wrote:
>> >>
>> >> After refreshing my workspace with the latest from trunk, it works
>> fine
>> >> now.
>> >> Sorry, I should have done this earlier.
>> >
>> > No worries! :)
>> >
>> > --
>> > James
>> > -------
>> > http://macstrac.blogspot.com/
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Dead-Letter-Channel-delivers-message-when-it-shouldn%27t--tf4390150s22882.html#a12973340
>>
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source SOA
> http://open.iona.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Dead-Letter-Channel-delivers-message-when-it-shouldn%27t--tf4390150s22882.html#a12974084
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to