Re: Where to store a hibernate session in Flow?

2004-08-06 Thread Jean-Baptiste Quenot
* Mark Lundquist: Why do you need to close the factory? Just leave it open. You might also look at implementing the Thread Local Session pattern (http://hibernate.bluemars.net/42.html). I implement this pattern with a class called HibernateFactory, which wraps the session factory

Re: Where to store a hibernate session in Flow?

2004-08-04 Thread Brent Johnson
You should use the HttpSessionBindingListener for closing your hibernate session when the user session expires. You can use the HttpSessionListener if you want, but when sessionDestroyed() gets called the session is already gone. So it doesnt help much. Use

Re: Where to store a hibernate session in Flow?

2004-08-04 Thread Mark Lundquist
On Aug 3, 2004, at 7:34 PM, Joel McConaughy wrote: Good to hear from you, Mark. Likewise :-) Actually, what I'd like to do is keep the session factory open during the course of either the session or application context. Then I can just open and close sessions as needed -- hopefully providing

Where to store a hibernate session in Flow?

2004-08-03 Thread Joel McConaughy
I would like to open one hibernate session for each user session and close it when the session is invalidated or times out. I can see how save the hibernate session in Flow using cocoon.session.setAttribute() and cocoon.session.getAttribute() however there doesn't seem to be a way to get

Re: Where to store a hibernate session in Flow?

2004-08-03 Thread Mark Lundquist
On Aug 3, 2004, at 6:20 PM, Joel McConaughy wrote: I would like to open one hibernate session for each user session and close it when the session is invalidated or times out. I can see how save the hibernate session in Flow using cocoon.session.setAttribute() and cocoon.session.getAttribute()

Re: Where to store a hibernate session in Flow?

2004-08-03 Thread Joel McConaughy
Good to hear from you, Mark. Actually, what I'd like to do is keep the session factory open during the course of either the session or application context. Then I can just open and close sessions as needed -- hopefully providing a performance improvement. If there really isn't any way to