Have you tried the following? http://www.hibernate.org/43.html.
Regards, Nicolás -----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Lionel Sent: Miércoles, 05 de Mayo de 2004 08:58 a.m. To: [EMAIL PROTECTED] Subject: Re: Struts and Hibernate Session Joe Germuska wrote: >> Acutally, I have put the getHibernateSession() on a ActionFormBase. >> After each SQL action (load, find...) I close the Session. I don't >> believe this is a good design and would like to improve it. > > This is actually how Hibernate is meant to be used. The session > lifespan is supposed to approximate that of a transaction. The problem is that when I load an object, put the object into HttpSession, close the hibernate Session. If later I call a getter on lazy loaded children, I get a LazyException, connection closed.... I want to keep the children lazy loaded because I scarcely need them. The only solution I found is to open a new Session, reload the object, and then load the children... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] NOTA DE CONFIDENCIALIDAD Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario. Muchas gracias. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]