Just an idea ...
Scenario: A wizard, that is modifying my object tree step by step. For every step, a "savepoint" is created. The back button leads to the previous step and to the previous state of the object tree.
By using proxies for separation of state and referencial identity of each object, this should be easily achievable. On creation of the snapshot, the state is backed up. On rolling back, the proxies are attached to that saved state. The copy on write pattern would provide acceptable performance.
BTW: why isn't it possible to get a list of objects currently loaded by the session. It's only possible to ask, if a certain object is attached to a session .. or do I miss something?
regards,
holger engels
|