- String alias;
- if (parameters.containsKey(JCR_REPOSITORY_ALIAS)) {
- alias = parameters.get(JCR_REPOSITORY_ALIAS).toString();
- }
- return null;
- }
+ Repository repository = super.getRepository(parameters);
+ if (repository != null)
+ return repository;
+
+ String uri;
+ if (parameters.containsKey(JCR_REPOSITORY_URI))
+ uri = parameters.get(JCR_REPOSITORY_URI).toString();
+ else if (parameters.containsKey(JcrUtils.REPOSITORY_URI))
+ uri = parameters.get(JcrUtils.REPOSITORY_URI).toString();
+ else
+ return null;
+
+ Map<String, String> params = new HashMap<String, String>();
+ params.put(JcrUtils.REPOSITORY_URI, uri);
+ repository = new Jcr2davRepositoryFactory().getRepository(params);
+ if (repository == null)
+ throw new ArgeoException("Remote Davex repository " + uri
+ + " not found");
+ log.info("Initialized remote Jackrabbit repository " + repository
+ + " from uri " + uri);