Konrad Billewicz wrote:
Lindholm, Greg <glindholm <at> neom.com> writes:
What I do is use a Hibernate Servlet Filter that closes the Hibernate
session
at the end of the request. This is used in conjunction with the
HibernateUtils
class that stores the Hibernate session in ThreadLocal storage.
An example of this technique is on the Hibernate site
(http://www.hibernate.org/43.html)
This is exactly what I need. Thank you very kindly.
You might not want to do this across the board for you whole app because
it puts a lock on a (presumably pooled) database connection for the
entirety of the response. You may not have a problem, but that depends
on your performance requirements.
- Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]