code: public void contextDestroyed(ServletContextEvent servletContextEvent)
      {
          ServletContext ctx = servletContextEvent.getServletContext();
          HibernateSessionService service = (HibernateSessionService)ctx.getAttribute(ServletContextKeys.SESSION_SERVICE);
          if(service != null) service.close();
      }
docs: {@inheritDoc}