From: Doug C. <de...@fl...> - 2002-02-27 05:09:50
|
> Heres some extra issues for you: > 1. You can't keep any state, apart from actual elements and a pointer to > the session, in the collection wrapper. This is to support rollback of > the session state when an exception occurs. I understand what you're saying, and I hate to be dense, but can you point to where in the current code you depend on or take advantage of this feature of collection wrappers? In particular, I can't see where the collection wrapper itself (i.e., the composition of the collection) is rolled back. The method setCleanState seems a likely place to snapshot the collection state, but this only seems to happen for component elements and arrays (not for my example map of dates and many-to-ones for example). <snip> > single change: > * write() and read() take an argument: the index being accessed > SessionImplementor.initialize() and SessionImplementor.dirty() > also recieve that argument. The wrapper itself never knows how > fully initialized it is. This is consistent with the current > design. The CollectionEntry keeps track of which elements changed > and which are initialized. I briefly considered this design, and don't remember why I ruled it out; probably because the other idea occurred to me; but with the other issues you raised, it's beginning to look good again! e |