DefaultHttpParams.setHttpParamsFactory(new MyHttpParamsFactory(
System.getProperty(PARAM_JCR_REMOTING_REFERER, "http://localhost/")
));
System.out.printf("Connecting via JCR remoting to %s%n", address.getSpecificURI().toString());
return new RepositoryFactoryImpl().getRepository(parameters);
} catch (IOException e) {
throw new RepositoryException(e);
}
}