Hi Benoit,

On 9/1/06, Benoit Hudzia <[EMAIL PROTECTED]> wrote:

One problem arises at that level because the message and the instance of
objects within are passed as reference. This means that when one entity is
modifying the object passed it is also modifying the object on the other
entity (since they share the same reference). It might be useful in some
case (actually its very useful in most of my internal
communication/routing
within the peer), but its not really consistent with communication
abstraction because when you are communicating you should not share
message
/ objects .


I see.

To go around such problem I used deep cloning technique of the object
(custom fast serialization / de-serialization during the routing of the
message within the peers) . But it might useful to enable/disable such
behaviour at the vmpipe level. Or maybe proposing a deep cloning filter
for
people that want it?


The best solution would be using an immutable objects, but it isn't
sometimes easy as I say.  Deep cloning filter would be a nice idea.

If people are interested I can donate the code for deep cloning filter.


Sure.  I am interested and will be looking forware to your donation.  Please
create a JIRA issue and attach the patch file to the issue.  Please don't
forget to mark a checkbox that your attachment will belong to the ASF, which
takes care of license stuff.

Thank you,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6

Reply via email to