*/
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;
}