From: Gavin K. <Gav...@ex...> - 2002-12-03 22:07:19
|
I agree. Furthermore there are some serious conceptual problems with regards to ensuring transaction isolation and also potential performance problems if a single task required multiple connections to the database. -----Original Message----- From: Max Rydahl Andersen [mailto:ma...@eo...]=20 Sent: Tuesday, 3 December 2002 10:59 PM To: Jonas Van Poucke; Hibernate Developers Subject: Re: [Hibernate] Lazy Collections No! If an session has been closed forcefully or by other means, hibernate internals should not reopen the session - at least not per default! If the session has been closed there is a reason for it - one might be to ensure that the ui-layer does not accidently fetches data by "dotting" around in the object graph. If you want the session to be (re)opend - why don't you just keep the session open ? /max ----- Original Message ----- From: "Jonas Van Poucke" <jvp...@ti...> To: "Hibernate Developers" <hib...@li...> Sent: Tuesday, December 03, 2002 9:20 AM Subject: [Hibernate] Lazy Collections The implementation of the write() method in cirrus.hibernate.collections.PersistentCollection states: protected final void write() { initialize(true); if ( session!=3Dnull && session.isOpen() ) session.dirty(this); } This means the session needs to be open. Also, the Docs mentions that lazy collections need to have an open session. Could we safely modify the code to reopen the session when needed? protected final void write() { initialize(true); if ( session !=3D null ) { if ( session.isOpen() ) { session.dirty(this); } else { // Re-open session session.reopen(); // ommitted try-catch session.dirty(this); } } } ************************************************************************ **** *** Hou uw internetverbruik beter onder controle ... surf met Tiscali Complete .... http://tiscali.complete.be ------------------------------------------------------- This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en _______________________________________________ hibernate-devel mailing list hib...@li... https://lists.sourceforge.net/lists/listinfo/hibernate-devel ------------------------------------------------------- This SF.net email is sponsored by: Get the new Palm Tungsten T=20 handheld. Power & Color in a compact size!=20 http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en _______________________________________________ hibernate-devel mailing list hib...@li... https://lists.sourceforge.net/lists/listinfo/hibernate-devel ********** 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 ********** |