Joshua Palmer created CAMEL-6541:
------------------------------------

             Summary: DefaultUnitOfWork's headers for the original message are 
the same object as the in message headers
                 Key: CAMEL-6541
                 URL: https://issues.apache.org/jira/browse/CAMEL-6541
             Project: Camel
          Issue Type: Bug
    Affects Versions: 2.8.6
            Reporter: Joshua Palmer
            Priority: Minor


For jms messages, the useOriginalMessage does not work when headers are changed 
during the route because the DefaultUnitOfWork's headers are the same object as 
the in message's headers.

In DefaultUnitOfWork, 
this.originalInMessage.setHeaders(exchange.getIn().getHeaders()); should be 
changed to create a copy of the headers instead of directly assigning.

Maybe changed to this.originalInMessage.setHeaders((Map<String,Object>) new 
CaseInsensitiveMap(exchange.getIn().getHeaders()));

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to