Code example for SessionFactory

Methods: closeisClosed

0
	public SessionFactory getInstance() {
		return factory;
	} 
 
	void destroy(@Disposes SessionFactory factory) {
		if (!factory.isClosed()) {
			factory.close();
		} 
		factory = null;
	} 
 
	public void dropAndCreate() { 
		destroy(this.factory);
		cfg.getSchema().drop(true, true);
		cfg.getSchema().create(true, true);
		init(); 
	} 
 
	public void drop() { 
		factory.close();
Experience pair programming with AI  Get Codota for Java