private volatile int connectionCount = 0;
@Override
public void start(ConnectionFactoryConfiguration config, ClassLoader classLoader) throws CacheLoaderException {
SimpleConnectionFactoryConfiguration factoryConfiguration;
if (config instanceof SimpleConnectionFactoryConfiguration) {
factoryConfiguration = (SimpleConnectionFactoryConfiguration) config;
}
else {
throw new CacheLoaderException("ConnectionFactoryConfiguration has to be an instance of " +
"SimpleConnectionFactoryConfiguration.");
}
loadDriver(factoryConfiguration.driverClass(), classLoader);
this.connectionUrl = factoryConfiguration.connectionUrl();
this.userName = factoryConfiguration.username();
this.password = factoryConfiguration.password();
if (log.isTraceEnabled()) {
log.tracef("Starting connection %s", this);
}
}