* 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
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
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
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
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()
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