I have a route that looks like so:

    onCompletion().onFailureOnly().beanRef('myBean', 'handleFailed')
    from('seda:asdf')
        .onException(SpecificException)
            .beanRef('myBean', 'handleSpecificException')
            .handled(false)
            .end()
        .dynamicRouter('myBean', 'slip')

When myBean.slip() throws SpecificException, If I print in.body in
handleSpecificException(), I can see that it is not null.

If I print it again in handleFailed() it is now null.

I have "fixed" this by adding the following to MyBean.handleSpecificException():

    x.out.body = x.in.body
    x.out.headers = x.in.headers

Is this expected behaviour - should the workaround be required?

Thanks,

Alex

Reply via email to