RE: Being Lazy with Hibernate

2005-09-20 Thread Martin Ravell
> > -Original Message- > From: Letícia Álvares Barbalho [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 20 September 2005 11:03 PM > To: Struts Users Mailing List > Subject: Re: Being Lazy with Hibernate > > I use struts and Hibernate 3 and lazy initialization work

RE: Being Lazy with Hibernate

2005-09-20 Thread Martin Ravell
> > -Original Message- >From: Bill Schneider [mailto:[EMAIL PROTECTED] >Sent: Tuesday, 20 September 2005 11:01 PM >To: user@struts.apache.org >Subject: Re: Being Lazy with Hibernate > >>>>>Has anyone been able to get a Struts / Hibernate app to work

RE: Being Lazy with Hibernate

2005-09-20 Thread Martin Ravell
> > -Original Message- > From: David Delbecq [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 20 September 2005 10:28 PM > To: Struts Users Mailing List > Subject: Re: Being Lazy with Hibernate > > See sections > 20.1.4. Initializing collections and proxies and 1.4

Re: Being Lazy with Hibernate

2005-09-20 Thread Letícia Álvares Barbalho
I use struts and Hibernate 3 and lazy initialization works just fine for me. I didn't have to do anything. What's your hibernate version? On 9/20/05, Bill Schneider <[EMAIL PROTECTED]> wrote: > > >>>Has anyone been able to get a Struts / Hibernate app to work nicely > with > >>>Lazy Initializat

Re: Being Lazy with Hibernate

2005-09-20 Thread Bill Schneider
Has anyone been able to get a Struts / Hibernate app to work nicely with Lazy Initialization? Whenever I have things with Lazy set to true I'm getting a "Failed to lazily initialize a collection" Exception. The easiest way to do this is to use the "open session in view" pattern. If you're usin

Re: Being Lazy with Hibernate

2005-09-20 Thread Sergey Pariev
what this entails? Regards Marty -Original Message- From: David Delbecq [mailto:[EMAIL PROTECTED] Sent: Tuesday, 20 September 2005 10:04 PM To: Struts Users Mailing List Subject: Re: Being Lazy with Hibernate For lazy initialization to work, at the moment of the lazy initialisation, (t

Re: Being Lazy with Hibernate

2005-09-20 Thread David Delbecq
gt;Sent: Tuesday, 20 September 2005 10:04 PM >To: Struts Users Mailing List >Subject: Re: Being Lazy with Hibernate > >For lazy initialization to work, at the moment of the lazy initialisation, >(that is the moment you request the data) the hibernate session must >not be closed.

RE: Being Lazy with Hibernate

2005-09-20 Thread Martin Ravell
? Regards Marty -Original Message- From: David Delbecq [mailto:[EMAIL PROTECTED] Sent: Tuesday, 20 September 2005 10:04 PM To: Struts Users Mailing List Subject: Re: Being Lazy with Hibernate For lazy initialization to work, at the moment of the lazy initialisation, (that is the moment you

Re: Being Lazy with Hibernate

2005-09-20 Thread David Delbecq
For lazy initialization to work, at the moment of the lazy initialisation, (that is the moment you request the data) the hibernate session must not be closed. The best way to do this is to store the hibernate session in the user session and use a servlet filter to connect/disconnect/reconnect the h