Code example for SessionFactory

Methods: close

0
        this.sessionFactory = sessionFactory;
    } 
 
    public void shutdown() { 
        try { 
            sessionFactory.close();
            sessionTL.remove();
            interceptorTL.remove(); 
        } catch (HibernateException e) {
           e.printStackTrace(System.out);
        } 
        sessionFactory = null;
    } 
 
    public Properties getHibernateProperties() {
        return ((AnnotationSessionFactoryBean) sessionFactory).getHibernateProperties();
    } 
 
    /** 
     * Return the hibernate session factory 
Experience pair programming with AI  Get Codota for Java