HHH-17734 Ensure provider_class has precedence over datasource

This commit is contained in:
Christian Beikov 2024-02-21 18:27:21 +01:00 committed by Steve Ebersole
parent 00d6777d05
commit 3700bbf4f0
1 changed files with 4 additions and 4 deletions

View File

@ -104,10 +104,6 @@ public class ConnectionProviderInitiator implements StandardServiceInitiator<Con
return null;
}
if ( configurationValues.get( AvailableSettings.DATASOURCE ) != null ) {
return new DatasourceConnectionProviderImpl();
}
final StrategySelector strategySelector = registry.getService( StrategySelector.class );
final Object explicitSetting = configurationValues.get( AvailableSettings.CONNECTION_PROVIDER );
if ( explicitSetting != null ) {
@ -150,6 +146,10 @@ public class ConnectionProviderInitiator implements StandardServiceInitiator<Con
}
}
if ( configurationValues.get( AvailableSettings.DATASOURCE ) != null ) {
return new DatasourceConnectionProviderImpl();
}
ConnectionProvider connectionProvider = null;
final Class<? extends ConnectionProvider> singleRegisteredProvider = getSingleRegisteredProvider(