camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Exchange properties not removed
Date Mon, 26 Jul 2010 09:00:50 GMT
On Mon, Jul 26, 2010 at 10:41 AM, S. Ali Tokmen
<savas-ali.tokmen@bull.net> wrote:
> Hello
>
> While in a Pipeline, new Exchanges are created for each Processor. At the
> end of the Pipeline, the main Exchange is updated with values from the
> latest created Exchange.
> Here is the executed block of code:
>
>   if (source.hasProperties()) {
>      result.getProperties().putAll(source.getProperties());
>   }
>
> As we can see, if the source Exchange was removed of some properties, the
> property disappearance will never made it into the result Exchange.
>
> Is this expected?
>

Yes Camel uses a defensive copy of the Exchange while routing.

This will change in the future (Camel 3.0 or maybe a bit earlier) as
we want to rework this a bit to only copy on demand.
The API changes in Camel 2.0 was the first step in this direction.



> Cheers
>
> --
>
> S. Ali Tokmen
> savas-ali.tokmen@bull.net
>
> Office: +33 4 76 29 76 19
> GSM:    +33 66 43 00 555
>
> Bull, Architect of an Open World TM
> http://www.bull.com
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message