private static Repository getRepository(Map parameters)
throws RepositoryException {
Repository repo = null;
Iterator factories = ServiceRegistry.lookupProviders(RepositoryFactory.class);
while (factories.hasNext()) {
RepositoryFactory factory = (RepositoryFactory) factories.next();
repo = factory.getRepository(parameters);
if (repo != null) {
break;
}
}
return repo;