From: Gavin K. <Gav...@ex...> - 2002-12-15 02:18:12
|
> Looking at the code, I would add LifeCycle callback in=20 > SessionImpl.flushEntities(). Am I missing anywhere else that=20 > an update could happen? =20 Nope, thats the only place. > Also, is it worth while for me to=20 > submit this as a patch? Changing the LifeCycle interface=20 > would break existing usages, but I could extend it to=20 > LifeCycleFlush or something and add the callback in > SessionImpl.flushEntities() if it would be useful to other people. No, we discussed this long ago and decided against adding an onDirty() call to the Lifecycle interface. A reason for this is=20 the following sequence of events in the flush sequence: (1) grab the object's properties (2) diff the current values against previous state //(3) if dirty call onDirty() .... not in current implementation //(4) grab the property values _again_ to see if they changed (5) persist the new property values If we did have the onDirty() call at step (3), we would have to grab the object state _again_ before step (5). This would have a negative impact upon performance. Interceptor.onFlushDirty() lets you meddle with the object properties in a way that avoids the double reflection. ********** CAUTION - Disclaimer ********** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS******** End of Disclaimer ********** |