camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller (JIRA) <j...@apache.org>
Subject [jira] [Commented] (CAMEL-5338) Exchange.copy() should make a deep copy, if the referenced objects (body, headers, properties) implements java.lang.Cloneable
Date Wed, 27 Jun 2012 21:50:44 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-5338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402581#comment-13402581
] 

Christian Müller commented on CAMEL-5338:
-----------------------------------------

Claus, if you agree I would close this issue.
                
> Exchange.copy() should make a deep copy, if the referenced objects (body, headers, properties)
implements java.lang.Cloneable
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5338
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5338
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.9.2
>            Reporter: Christian Müller
>             Fix For: 3.0.0
>
>
> We run into an issue where an exchange with a custom pojo as payload was sent to an multicast
and changed in two different sub-routes at the same time (connected by using the direct protocol).
The reason is that the Exchange.copy() method "only" creates shallow copies of the body (it's
the same for the exchange properties and message headers). I think it's a good improvement
to check whether the object implements java.lang.Cloneable and in this case create a deep
copy of the object.  
> [1] https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
> [2] https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/MessageSupport.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message