You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/07/11 19:11:48 UTC
[jira] [Commented] (CAMEL-6541) DefaultUnitOfWork's headers for the
original message are the same object as the in message headers
[ https://issues.apache.org/jira/browse/CAMEL-6541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13705984#comment-13705984 ]
Claus Ibsen commented on CAMEL-6541:
------------------------------------
Well spotted
> 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
> Components: camel-core, camel-jms
> Affects Versions: 2.8.6
> Reporter: Joshua Palmer
> Priority: Minor
> Fix For: 2.10.7, 2.11.2, 2.12.0
>
>
> 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