Hi, i finally find the option needed :

onException(Exception.class)
.handled(false)
.setExchangePattern(ExchangePattern.InOnly)
.to("vm:dead-letter");

from("cxf:bean:myCXFEndpoint")
.errorHandler(defaultErrorHandler().logHandled(false).logStackTrace(false).logExhausted(false))
.process(preProcessor_)

Thanks


On Mon, Jun 4, 2012 at 2:33 PM, Hervé BARRAULT <herve.barra...@gmail.com>wrote:

> Hi,
> I defined a simple route with camel-cxf :
>
> from("cxf:bean:myCXFEndpoint")
>             .process(preProcessor_)
>
> When having an exception I have two logs (one from camel one from cxf).
>
> Now, i want to add an exception handling (to avoid the camel log and do
> some processing for the exception).
>
> for example :
> from("cxf:bean:myCXFEndpoint")
>             .errorHandler(deadLetterChannel("seda:deadLetterEndpoint"))
>             .process(preProcessor_)
>
> But in this case, I loose the exception (behavior of a deadletterChannel).
>
> So I have tried something like this :
> onException(Exception.class)
>         .handled(false)
>         .to("seda:deadLetterEndpoint");
>
> from("cxf:bean:myCXFEndpoint")
>         .process(preProcessor_)
>
> But in this case, I have also the log of the default Error Handler
>
> Should I implement completely an error handler to have this behavior (
> processing an error without marking it as handled and without an ERROR log)
> ?
>
> FYI : I'm using an old camel 2.4
>
> Thanks for answers
> Regards
> Hervé
>
>

Reply via email to