Yeah, I've now moved the onException to right after the <from> tag. It looks
like this:
<onException>
<exception>org.my.exception.FunctionalException</exception>
<redeliveryPolicy maximumRedeliveries="0" />
<choice>
<when>
<methodCall bean="myOwnErrorHandler"
method="hasSpecialEnumCode"/>
<handled>
<constant>true</constant>
</handled>
<to
uri="activemq:queue/myQueue/myFunctionalErrorQueue"/>
</when>
<otherwise/>
</choice>
</onException>
But there are two problems with this:
1. The <handled> tag can't be inside the <when> tags.
2. If the <methodCall> resolves to false (ie the special enum is not found,
and the <otherwise> tag is entered), I would like the normal
redeliveryPolicy set on the jmsConnectionFactory to kick in and handle the
exception (ie with delay/redeliveries). But with the present configuration,
it seems like I must implement some error handling within the <otherwise>,
right?
Claus Ibsen-2 wrote:
>
> Hi
>
> Could you try to move the onException outside the from tag?
>
> It should be like this:
>
> <route>
> <onException>
> </onException
> <from>
> ...
> </route>
>
--
View this message in context:
http://www.nabble.com/1.5-error-handling-Spring-config-buggy-not-complete--tp20562554s22882p20602491.html
Sent from the Camel - Users mailing list archive at Nabble.com.