HHH-13529 Dot not access hot JdbcServices over ServiceRegistry
This commit is contained in:
parent
2c304a5e18
commit
6e373f2e17
|
@ -279,16 +279,11 @@ public interface SessionFactoryImplementor extends Mapping, SessionFactory, Quer
|
||||||
*
|
*
|
||||||
* @return The dialect
|
* @return The dialect
|
||||||
*
|
*
|
||||||
* @deprecated (since 5.2) instead, use this factory's {{@link #getServiceRegistry()}} ->
|
* @deprecated (since 5.2) instead, use {@link JdbcServices#getDialect()}
|
||||||
* {@link JdbcServices#getDialect()}
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
default Dialect getDialect() {
|
default Dialect getDialect() {
|
||||||
if ( getServiceRegistry() == null ) {
|
return getJdbcServices().getDialect();
|
||||||
throw new IllegalStateException( "Cannot determine dialect because serviceRegistry is null." );
|
|
||||||
}
|
|
||||||
|
|
||||||
return getServiceRegistry().getService( JdbcServices.class ).getDialect();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -301,7 +296,7 @@ public interface SessionFactoryImplementor extends Mapping, SessionFactory, Quer
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
default SQLExceptionConverter getSQLExceptionConverter() {
|
default SQLExceptionConverter getSQLExceptionConverter() {
|
||||||
return getServiceRegistry().getService( JdbcServices.class ).getSqlExceptionHelper().getSqlExceptionConverter();
|
return getJdbcServices().getSqlExceptionHelper().getSqlExceptionConverter();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -314,7 +309,7 @@ public interface SessionFactoryImplementor extends Mapping, SessionFactory, Quer
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
default SqlExceptionHelper getSQLExceptionHelper() {
|
default SqlExceptionHelper getSQLExceptionHelper() {
|
||||||
return getServiceRegistry().getService( JdbcServices.class ).getSqlExceptionHelper();
|
return getJdbcServices().getSqlExceptionHelper();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue