HHH-17734 Ensure provider_class has precedence over datasource

This commit is contained in:
Christian Beikov 2024-02-21 18:25:48 +01:00
parent 0502869545
commit 8a65536c4c
1 changed files with 4 additions and 4 deletions

View File

@ -109,10 +109,6 @@ public class ConnectionProviderInitiator implements StandardServiceInitiator<Con
return null;
}
if ( configurationValues.get( AvailableSettings.DATASOURCE ) != null ) {
return new DatasourceConnectionProviderImpl();
}
final StrategySelector strategySelector = registry.requireService( StrategySelector.class );
final Object explicitSetting = configurationValues.get( AvailableSettings.CONNECTION_PROVIDER );
if ( explicitSetting != null ) {
@ -155,6 +151,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(