// by default
if (dbSourceName != null)
{
DataSource ds = (DataSource)new InitialContext().lookup(dbSourceName);
if (ds != null)
return new GenericConnectionFactory(ds, containerName, multiDb, valueStorageProvider, maxBufferSize,
swapDirectory, swapCleaner);
throw new RepositoryException("Datasource '" + dbSourceName + "' is not bound in this context.");
}
return new GenericConnectionFactory(dbDriver, dbUrl, dbUserName, dbPassword, containerName, multiDb,
valueStorageProvider, maxBufferSize, swapDirectory, swapCleaner);
}