@Override
    public void dispose(final SessionFactory sessionFactory) {
        if (sessionFactory != null && !sessionFactory.isClosed()) {
            logger.info("Disposing of hibernate session factory.");
            sessionFactory.close();
        }
    }
@ Override public void dispose ( final SessionFactory sessionFactory ) { if ( sessionFactory != null && ! sessionFactory . isClosed ( ) ) { logger . info ( "Disposing of hibernate session factory." ) ; sessionFactory . close ( ) ; } }
Dispose of the hibernate session.

@param sessionFactory The session to dispose.