Thanks for the quick response. onException doesn't seem to catch the
exception. Am I missing something?
I would like to reset the maximumRedeliveries on ANY exception for this
route, so
I've also tried to remove the <exception> filtering from the configuration
as follows:
<onException>
<redeliveryPolicy>
<maximumRedeliveries>2</maximumRedeliveries>
</redeliveryPolicy>
<to uri="log:MySpecialLogger"/>
</onException>
but it does not work either.
Thanks again for the input.
---------------
Claus Ibsen wrote:
>
> Hi
>
> There have been some refinements in this in the later releases. But as I
> recall it was because the max redelivery counter was off by one is some
> situations.
>
> Are you sure the onException catches your exception? You could try setting
> a special destination so you are sure its using the onException. Eg that
> it logs the exception with MySpecialLogger
>
> <onException>
> <exception>
> java.lang.Exception
> </exception>
> <redeliveryPolicy>
> <maximumRedeliveries>2</maximumRedeliveries>
> </redeliveryPolicy>
> <to uri="log:MySpecialLogger"/>
> </onException>
>
>
>
> Med venlig hilsen
>
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
> -----Original Message-----
> From: 0xygen08 [mailto:[EMAIL PROTECTED]
> Sent: 31. oktober 2008 22:38
> To: [email protected]
> Subject: Camel 1.3 - how to overwrite redeliveryPolicy via Spring XML
>
>
> Hi,
> I am using Camel 1.3, and try to overwrite the default redeliveryPolicy on
> one of the route.
> I tried with the following spring configuration, and I didn't have problem
> starting
> application, but the maximumRedeliveries was still using default value 5.
>
> Is it possible to do that in Camel 1.3 (I can't upgrade to 1.4/1.5 just
> yet)?
> Thanks,
> -O
>
> <camelContext id="mycontext" autowireRouteBuilders="false"
> xmlns="http://activemq.apache.org/camel/schema/spring">
>
> <route>
> <from uri="my:src"/>
> <onException>
> <exception>
> java.lang.Exception
> </exception>
> <redeliveryPolicy>
> <maximumRedeliveries>2</maximumRedeliveries>
> </redeliveryPolicy>
> </onException>
>
> <to uri="md:x.queue"/>
> <to uri="bean:xxr"/>
>
> </route>
> </camelContext>
> --
> View this message in context:
> http://www.nabble.com/Camel-1.3---how-to-overwrite-redeliveryPolicy-via-Spring-XML-tp20274414s22882p20274414.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
--
View this message in context:
http://www.nabble.com/Camel-1.3---how-to-overwrite-redeliveryPolicy-via-Spring-XML-tp20274414s22882p20309146.html
Sent from the Camel - Users mailing list archive at Nabble.com.