AbstractConnectionFactory factory;
for (int i = 0; i < databases.length; i++) {
// Load the mapping file from the URL specified in the database
// configuration file, relative to the configuration file.
// Fail if cannot load the mapping for whatever reason.
Mapping mapping = new Mapping(loader);
if (resolver != null) { mapping.setEntityResolver(resolver); }
if (baseURI != null) { mapping.setBaseURL(baseURI); }
factory = DatabaseRegistry.createFactory(jdoConf, i, mapping);
factory.setClassDescriptorResolver(classDescriptorResolver);
if (init) { factory.initialize(); }
String name = databases[i].getName();