N
no
Hello,
According to Hibernate team the standard way to use hibernate in a J2EE
environement (on a session per request basis) is with the HibernateUtil
class describe here :
http://www.hibernate.org/hib_docs/reference/en/html/quickstart.html
notice :
public static final ThreadLocal session = new ThreadLocal();
(in order to store the hibernate session)
In an other hand, some say that you must not use ThreadLocal within a
J2EE application server
"ThreadLocal and thread pools just don't mix"
"Besides, it's a huge security risk"
look at:
http://www.devwebsphere.com/devwebsphere/2005/06/dont_use_thread.html
So, what would be "the regular" way of using hibernate ?
According to Hibernate team the standard way to use hibernate in a J2EE
environement (on a session per request basis) is with the HibernateUtil
class describe here :
http://www.hibernate.org/hib_docs/reference/en/html/quickstart.html
notice :
public static final ThreadLocal session = new ThreadLocal();
(in order to store the hibernate session)
In an other hand, some say that you must not use ThreadLocal within a
J2EE application server
"ThreadLocal and thread pools just don't mix"
"Besides, it's a huge security risk"
look at:
http://www.devwebsphere.com/devwebsphere/2005/06/dont_use_thread.html
So, what would be "the regular" way of using hibernate ?