During a recent discussion regarding connection pooling, Hibernate
session management and database connection management a suggestion was
made about forcing the hibernate session to close at the end of each
http request.
I wanted to provide a reference to what is currently being done
regarding this.
Curently the class org.mifos.framework.ApplicationIntitializer (which
implements ServletContextListener and ServletRequestListener) defines
the following method:
Public void requestDestroyed(ServletRequestEvent event) {
HibernateUtil.closeSession();
}
The intent of this method is to force the current Hibernate session to
close at the end of each request.
This is not how we would like to ultimately manage sessions, but it was
done as a stopgap measure to avoid sessions being left open in cases
where they are not closed properly.
--Van
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/