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/ On Wed, Nov 19, 2008 at 1:13 PM, Fush <[EMAIL PROTECTED]> wrote: > > Thanks for looking into it. I've come across one more behavior, that I don't > quite understand: Given the route below, if the method in myOwnErrorHandler > throws an exception (ie my own errorhandling fails), the message is > redelivered 5 times. Can this be configured somehow (where), or am I > supposed to handle this manually in the myOwnErrorHandler bean? Basically, > what are my options for configuring and/or manually implementing the > <onException> handling? I can't seem to find much documentation/examples for > it. > > <camelContext id="myRouting" > xmlns="http://activemq.apache.org/camel/schema/spring"> > <route> > <from uri="activemq:queue/myQueue/aQueue" /> > <choice> > <when> > <xpath>//type = 'myType'</xpath> > <onException> > > <exception>org.my.exception.FunctionalException > </exception> > <redeliveryPolicy > maximumRedeliveries="0" /> > <handled> > <constant>true</constant> > </handled> > <to uri="bean:myOwnErrorHandler" /> > </onException> > <unmarshal> > <jaxb prettyPrint="true" > contextPath="org.my.domain.message" /> > </unmarshal> > <to uri="bean:myBean" /> > </when> > </choice> > </route> > </camelContext> > -- > View this message in context: > http://www.nabble.com/1.5-error-handling-Spring-config-buggy-not-complete--tp20562554s22882p20578586.html > Sent from the Camel - Users mailing list archive at Nabble.com. > >
