« Return to Thread: Exception handling ... onException

Re: Exception handling ... onException

by DRy () :: Rate this Message:

Reply to Author | View in Thread

Hi,

if I replace Exception.class with IOException (for example) it works fine for these two types of exception then!

>        onException(UnmarshalException.class)
>            .useOriginalBody()
>            .handled(true)
>                .bean(exceptionLogBean)
>                .process(new Publish2CenterExceptionBean())
>            .end();
>
>        onException(IOException.class)
>            .maximumRedeliveries(-1).redeliveryDelay(1000)
>            .useOriginalBody()
>            .handled(true)
>                .bean(exceptionLogBean)
>            .rollback()

Any ideas so far ... ?


There is another problem within this:

If there is a another (a new) exception within any onException-part, the message is lost. Even in an onException where maximumRedeliveries(-1) is set (like in onException(IOException.class) in my example)!


... DRy

 « Return to Thread: Exception handling ... onException

Need professional support or training for Apache Camel? Graphic Design by Hiram and the Nabble Forum configured by James