return null;
}
final StrategySelector strategySelector = registry.getService( StrategySelector.class );
ConnectionProvider connectionProvider = null;
final String providerName = getConfiguredConnectionProviderName( configurationValues );
if ( providerName != null ) {
connectionProvider = instantiateExplicitConnectionProvider( providerName, strategySelector );
}
else if ( configurationValues.get( Environment.DATASOURCE ) != null ) {
connectionProvider = new DatasourceConnectionProviderImpl();
}
if ( connectionProvider == null ) {
if ( c3p0ConfigDefined( configurationValues ) ) {
connectionProvider = instantiateC3p0Provider( strategySelector );
}
}
if ( connectionProvider == null ) {
if ( proxoolConfigDefined( configurationValues ) ) {
connectionProvider = instantiateProxoolProvider( strategySelector );
}
}
if ( connectionProvider == null ) {
if ( configurationValues.get( Environment.URL ) != null ) {
connectionProvider = new DriverManagerConnectionProviderImpl();
}
}
if ( connectionProvider == null ) {
LOG.noAppropriateConnectionProvider();
connectionProvider = new UserSuppliedConnectionProviderImpl();
}
final Map injectionData = (Map) configurationValues.get( INJECTION_DATA );
if ( injectionData != null && injectionData.size() > 0 ) {
final ConnectionProvider theConnectionProvider = connectionProvider;
new BeanInfoHelper( connectionProvider.getClass() ).applyToBeanInfo(
connectionProvider,
new BeanInfoHelper.BeanInfoDelegate() {
public void processBeanInfo(BeanInfo beanInfo) throws Exception {
final PropertyDescriptor[] descriptors = beanInfo.getPropertyDescriptors();