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]

Reply via email to