Export to GitHub

dphibernate - issue #3

Incorrect HibernateUtil Is Opening New Sessions


Posted on Feb 29, 2008 by Happy Camel

In net.digitalprimates.persistence.hibernate.utils.filters.HibernateSessionServletFilter the HibernateUtil from net.digitalprimates.persistence.hibernate.utils.HibernateUtil is being used and causing a new instance of Hibernate to start at every request.

Suggest providing an interface so that users can roll their own version HibernateUtil (i.e. utilizing Spring, etc.).

Comment #1

Posted on Feb 29, 2008 by Helpful Monkey

doc bug - The HibernateSessionServletFilter and HibernateUtil classes are meant to be used together. Not with other implementations. However, if you have some other way to manage a long session at the request level, such as spring. You should do that instead of using these classes. Then the only thing you need to do is provide a simple class and method which can return the open running session (from spring for instance).

Comment #2

Posted on Mar 9, 2008 by Helpful Monkey

(No comment was entered for this change.)

Status: Fixed

Labels:
Component-Docs Priority-Medium Component-Persistence