camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: possible onException bug when using routeContext
Date Tue, 20 Jul 2010 11:34:59 GMT
Hi

Could you create a JIRA ticket

On Tue, Jul 20, 2010 at 1:17 PM, Andreas Asmuss <andreasasmuss@gmail.com> wrote:
>
> Hi
>
> I have two routes in a routecontext. Both share an errorhandler but one of
> the routes has a special exception clause. These routes works as expected
> when defined directly in a camelContext, but when imported from a
> routeContext, behaviour is flawed. In the routes below route2 "inherits" the
> onException behaviour of route1 when route1 is defined after route2 (and
> therefore route1 is started latest).
>
> If I change the startup order the routes will behave as expected. It also
> works if they both have onException behaviour on the same exception.
>
> <routeContext id="routeCtx" xmlns="http://camel.apache.org/schema/spring">
>        <route id="route2" errorHandlerRef="deadLetterErrorHandler">
>                <from uri="file:test/2/in" />
>                <throwException ref="Exception" />
>                <to uri="file:test/2/out" />
>        </route>
>
>        <route id="route1" errorHandlerRef="deadLetterErrorHandler">
>                <from uri="file:test/1/in" />
>                <onException>
>                        <exception>java.lang.Exception</exception>
>                        <handled>
>                                <constant>true</constant>
>                        </handled>
>                        <to uri="file:test/1/onex" />
>                </onException>
>                <throwException ref="Exception" />
>                <to uri="file:test/1/out" />
>        </route>
> </routeContext>
> --
> View this message in context: http://camel.465427.n5.nabble.com/possible-onException-bug-when-using-routeContext-tp1616244p1616244.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message