What is the best place in a servlet for Hibernate code returning a HibernateSessionFactory?
I saw many examples: some established a db connection in the maintenance methods. Others - use smth, like HibernateUtil (Singleton), which returns a HibernateSessionFactory.
I don’t know if HibernateUtil can be used in multi-threaded servlets?
source
share