camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: global onException doesnt apply for routes loaded with loadRoutesDefinition
Date Fri, 08 Apr 2011 08:56:55 GMT
Yeah Camel 3.0 will improve on this as we will refactor and improve
parts of the internal routing engine / builder to cater for that.
So error handlers and the likes is applied in a more dynamic fashion,
instead of as now, as being applied during route build time.

On Thu, Apr 7, 2011 at 2:06 PM, Joerg Wuelker MIS-OSN
<> wrote:
> Hi,
> i am using camel 2.6.0 and try to load additional camel routes from XML
> outside the SpringXML.
> In the spring-context-xml i create a camel context with a global route and
> a global onException-definition.
> In addition i have an RoutesBuilder which loads additional
> (customer-)routes from XML using CamelContext.loadRoutesDefinition(...).
> I would like the global onExeption-Definition to apply for the
> customer-routes, too, but this doesn't work. If i move the route from the
> separated xml-file to the Spring-XML everthing works fine.
> Is there something missing in the RoutesBuilder? Currently it looks like
> this:
> InputStream is = this.getClass().getResourceAsStream(file);
> RoutesDefinition routes = context.loadRoutesDefinition(is);
> routes.setErrorHandlerBuilder(context.getErrorHandlerBuilder()); // this
> doesn't change anything because context.getErrorHandlerBuilder() returns
> null
> context.addRouteDefinitions(routes.getRoutes());
> Thanks,
> jwuelker

Claus Ibsen
CamelOne 2011:
Twitter: davsclaus
Author of Camel in Action:

View raw message