camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fush <>
Subject Re: 1.5 error handling Spring config buggy/not complete?
Date Fri, 21 Nov 2008 08:42:17 GMT

Thanks again for following this up. I'll be watching the Jira issue.

Regarding writing my own error handler, that is a tempting option. But you
also said that when using transactions, it's "all or nothing". I still want
to use transactions, to make sure messages are not removed from the queue
before they are handled correctly. So that would prevent me from using my
own Camel error handler, right?

Claus Ibsen-2 wrote:
> Hi
> #1 + #2
> Yeah you have a use case that is a bit more advanced. I have created a
> ticket to make it easier to attach a predicate to the onException so
> you can do your custom test here also before the onexception is
> triggered.
> You could however write your own customized exception policy strategy:
> Camel has a default strategy that is used to find the matching
> exception thrown in the list of onException tags.
> There is a sample on the link above. Basically what you have to do is
> to find the matching onException to use from the given map of
> exception types. The last parameter is the actual exception thrown.
> So if the last exception is your special exception you can do the enum
> test and find the correct onException from the map, and return it.
> I am afraid the sample is for Java DSL so you could try to see if you
> can get it to work in Spring DSL as well. Let me know how it goes.
> /Claus Ibsen
> Apache Camel Committer
> Blog:

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message