Hi

You can try storing that JMSCorrelationID as a property directly on
the Exchange instead of the Message.
Then it ought to be kept safe.

exchange.setProperty("xxx", value);


On Tue, Sep 6, 2011 at 6:25 PM, pkleczka <[email protected]> wrote:
> Hello
>
> *Problem*: When an incoming message arrives in my queue, I copy the message
> ID into the JMSCorrelationID on header before routing to other internal
> queues. When my exception handling engages, the property disappears.
>
> Below is the method signature for the bean I am calling when the exception
> happens:
> *public String transform(String message)*
>
> Below is the XML for my route:
>
>
> In my exception handler, I call a bean to "wrap" the original message in
> some additional XML (including my JMSCorrelationID). The signature for that
> method is:
> *public void respond(Exchange exchange, Exception exception)*
>
> In that method, I pull the JMSCorrelationID as follows:
> *exchange.getIn().getHeader("JMSCorrelationID");*
>
> In another error handler, that uses a try/catch block, I get back a non-null
> JMSCorrelationID. I am at a loss as to why I am getting a null on the
> onException handler.  Any pointers are appreciated.
>
> Thanks,
> Peter
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Missing-properties-on-exception-tp4775029p4775029.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to