Code example for Wrapped

Methods: unwrap

0
	 */ 
	public static DataSource getDataSource(SessionFactory sessionFactory) {
		if (getConnectionProviderMethod != null && sessionFactory instanceof SessionFactoryImplementor) {
			Wrapped cp = (Wrapped) ReflectionUtils.invokeMethod(getConnectionProviderMethod, sessionFactory);
			if (cp != null) {
				return cp.unwrap(DataSource.class);
			} 
		} 
		return null; 
	} 
 
	/** 
	 * Perform actual closing of the Hibernate Session, 
	 * catching and logging any cleanup exceptions thrown. 
	 * @param session the Hibernate Session to close (may be {@code null}) 
	 * @see org.hibernate.Session#close() 
	 */ 
	public static void closeSession(Session session) {
		if (session != null) {
			try { 
Contextual code suggestions in your IDE  Get Codota for Java