camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-6541) DefaultUnitOfWork's headers for the original message are the same object as the in message headers
Date Thu, 11 Jul 2013 17:11:48 GMT

    [ 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

Mime
View raw message