Code example for Session

Methods: close

0
	 */ 
	public static void closeSession(Session session) { 
		if (session != null) { 
			logger.debug("Closing Hibernate Session"); 
			try { 
				session.close(); 
			} 
			catch (HibernateException ex) { 
				logger.debug("Could not close Hibernate Session", ex); 
			} 
			catch (Throwable ex) { 
				logger.debug("Unexpected exception on closing Hibernate Session", ex); 
			} 
		} 
	} 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java