Hi,
I want to know, in standalone application, when/where to call HibernateUtil.shutdown(); in the localThread design mode:
<property name="current_session_context_class">thread</property>
My DAO layer is based on "Java Persistence with Hibernate"
----------
/**
* Closes the current SessionFactory and releases all resources.
* <p>
* The only other method that can be called on HibernateUtil
* after this one is rebuildSessionFactory(Configuration).
*/
public static void shutdown() {
log.debug("Shutting down Hibernate");
// Close caches and connection pools
getSessionFactory().close();
// Clear static variables
sessionFactory = null;
}
----
thanks
|