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.

Reply via email to