+ if (uri == null)
+ return null;
+
+ try {
+ Hashtable<String, String> params = new Hashtable<String, String>();
+ params.put(ArgeoJcrConstants.JCR_REPOSITORY_URI, uri);
+ // by default we use the URI as alias
+ params.put(ArgeoJcrConstants.JCR_REPOSITORY_ALIAS, uri);
+ Repository repository = repositoryFactory.getRepository(params);
+ bundleContext.registerService(Repository.class.getName(),
+ repository, params);
+ } catch (Exception e) {
+ ErrorFeedback.show("Cannot add remote repository " + uri, e);
+ }