pupsnow / dphibernate

Automatically exported from code.google.com/p/dphibernate
0 stars 0 forks source link

Incorrect HibernateUtil Is Opening New Sessions #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In 
net.digitalprimates.persistence.hibernate.utils.filters.HibernateSessionServletF
ilter 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.).

Original issue reported on code.google.com by andy.pow...@me.com on 29 Feb 2008 at 10:11

GoogleCodeExporter commented 9 years ago
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).

Original comment by mni...@gmail.com on 29 Feb 2008 at 11:53

GoogleCodeExporter commented 9 years ago

Original comment by mni...@gmail.com on 9 Mar 2008 at 9:27