* @see org.hibernate.engine.spi.SessionFactoryImplementor#getConnectionProvider
*/
public static DataSource getDataSource(SessionFactory sessionFactory) {
if (sessionFactory instanceof SessionFactoryImplementor) {
ConnectionProvider cp = ((SessionFactoryImplementor) sessionFactory).getConnectionProvider();
return cp.unwrap(DataSource.class);
}
return null;
}
/**