camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpalmer1026 <>
Subject Re: Error Handling with Spring XML
Date Tue, 12 Apr 2011 14:17:12 GMT
Hi Claus,

I'm actually not changing the error handler using adviceWith. My spring
application context file defines a single error handler, which I reference
as an attribute on the camelContext tag to make it context-scoped. When I
subsequently simulate an error using advice with, I get the exception. If I
modify the application context file and move the error handler ref attribute
to the route that I am advising, everything works as expected.

My test method that is using adviceWith is as follows:

public void testSimulateConnectionError() throws Exception {
   RouteDefinition route = context.getRouteDefinition("fileSystemToFtp");
   route.adviceWith(context, new RouteBuilder() {
      public void configure() throws Exception {
            .process(new SimulateHttpErrorProcessor());
        // mocks and assertions

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message