}
private static Dialect determineDialectBasedOnJdbcMetadata(
JdbcConnectionContext jdbcConnectionContext,
ServiceRegistry serviceRegistry) {
final DialectResolver dialectResolver = serviceRegistry.getService( DialectResolver.class );
try {
final DatabaseMetaData databaseMetaData = jdbcConnectionContext.getJdbcConnection().getMetaData();
final Dialect dialect = dialectResolver.resolveDialect( databaseMetaData );
if ( dialect == null ) {
throw new HibernateException(
"Unable to determine Dialect to use [name=" + databaseMetaData.getDatabaseProductName() +
", majorVersion=" + databaseMetaData.getDatabaseMajorVersion() +