That might be a problem if you have a big object graph. You get a big penalty even if you only modify a small peice of the object graph.
You could do a shallow copy by getting a snapshot of the fields of the object. Then wrap up the children objects with "Versioned.makeVersioned(child)" when they are accessed. The cool thing is that you would not have any serialization at all. I know that there has to be some down-sides to this approach, help me figure them out.
This essentially requires recursively wrapping all child objects reachable from a parent with version interceptors.
I think this is what I would require for my cache, which is tree-structured.
Versions would be created only when needed, as we go.
-- Bela Ban www.javagroups.com (408) 316-4459
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development