On Wed, Nov 19, 2008 at 1:33 PM, Fush <[EMAIL PROTECTED]> wrote: > > I was assuming that if an exception (any other than FunctionalException) was > thrown from within my <onException> clause, it would be handled by the > TransactionManager as for all other exceptions. But apparently not. :) > > I have to expect exceptions from the myOwnErrorHandler bean, because it > calls a remote system. What are my options if I would like to write my own > implementation of the <onException> tag? Would that be feasible? Do you know > of any examples/tutorials for that? Sort of. I am about to leave the office, but you have a very interesting use-case that I need to dig into. If time permits I will be online tonight.
You can define your own exception policy strategy: http://activemq.apache.org/camel/error-handler.html That is the policy to determine which onException should be triggered. But to get it clear. If your bean myOwnErrorHandler throws an exception what do you want to happen? > > > Claus Ibsen-2 wrote: >> >> Hi >> >> Ha ha you have a catch-22 situation ;) You are doing the "handling" of >> the exception (kinda like a finally) but in that process you also have >> an exception being thrown. >> >> What would be the ideal situation to do here? >> - Let Camel try to find a new onException that matches the new >> exception being thrown? >> - Or log it as a kind of WARN (this is the easiest to do) >> >> We should beware that we don't push the it to far and it gets to >> complex to understand what happens. >> >> Any thoughts? >> >> >> A workaround in your bean is to use >> try .. catch code style and handle the new exception your self. >> >> >> /Claus Ibsen >> Apache Camel Committer >> Blog: http://davsclaus.blogspot.com/ >> > > -- > View this message in context: > http://www.nabble.com/1.5-error-handling-Spring-config-buggy-not-complete--tp20562554s22882p20578887.html > Sent from the Camel - Users mailing list archive at Nabble.com. > >
