// directly against current classloader or build a non-delegating child
// to override with connection specific classes
Class clazz = Class.forName(className, false, loader);
ConnectionProvider connectionProvider =
(ConnectionProvider) clazz.newInstance();
connectionProvider.initialize(connectionSettings);
return connectionProvider.connect();
} catch (IllegalAccessException e) {
throw new ConnectionException("Could not access ConnectionClass", e);
} catch (InstantiationException e) {
throw new ConnectionException("Could not instantiate ConnectionClass", e);