On Thu, Sep 29, 2011 at 1:11 PM, heinrichheine <martin.heinem...@vitaphone.de> wrote: > Ah, > yes its still there but the location must be changed. > My 2.5 code: > route.onException( ExchangeTimedOutException.class ) > .setHeader( "incomingroute", constant(config.getRouteName()) ) > .wireTap( DEAD_LETTER ) > .setHeader( RoutingConstants.RESULT_CODE, constant( > ResponseCodes.RESPONSE_SERVER_BUSY.getCode() ) ) > .setHeader( RoutingConstants.RESULT_TEXT, simple( "${property." > + ResponseCodes.RESPONSE_SERVER_BUSY.property() + "}" ) ) > .handled( true ) > .to( directResponse ) > .stop() > > The handled is not allowed to be placed after a wireTap call. > > route.onException( ExchangeTimedOutException.class ) > .setHeader( "incomingroute", constant(config.getRouteName()) ) > .handled( true ) > .wireTap( DEAD_LETTER ) > .setHeader( RoutingConstants.RESULT_CODE, constant( > ResponseCodes.RESPONSE_SERVER_BUSY.getCode() ) ) > .setHeader( RoutingConstants.RESULT_TEXT, simple( "${property." > + ResponseCodes.RESPONSE_SERVER_BUSY.property() + "}" ) ) > .to( directResponse ) > .stop() > This compiles >
Yeah handled(true) has to be in the top in the onException. > > Claus Ibsen-2 wrote: >> >> On Thu, Sep 29, 2011 at 12:52 PM, heinrichheine >> <martin.heinemann@> wrote: >>> Hi, >>> i currently migrating my Camel Java DSL route from Camel 2.5 to 2.8.1 >>> and i figured out, that in the onException clause, there is no >>> .handled(true) method anymore. >>> Where is it gone or how should i mark my messages as handled now? >>> >> >> It should still be there on onException. >> >> Can you post the code with the problem? >> >> >>> Thanks >>> >>> martin >>> >>> -- >>> View this message in context: >>> http://camel.465427.n5.nabble.com/Where-is-the-handled-method-Migrating-from-2-5-to-2-8-1-tp4852597p4852597.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >>> >> >> >> >> -- >> Claus Ibsen >> ----------------- >> FuseSource >> Email: cibsen@ >> Web: http://fusesource.com >> Twitter: davsclaus, fusenews >> Blog: http://davsclaus.blogspot.com/ >> Author of Camel in Action: http://www.manning.com/ibsen/ >> > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Where-is-the-handled-method-Migrating-from-2-5-to-2-8-1-tp4852597p4852647.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/