public void contextDestroyed(ServletContextEvent event) {
   HibernateUtil.getSessionFactory().close();
 }
 public void contextInitialized(ServletContextEvent event) {
   HibernateUtil.getSessionFactory();
 }