List of usage examples for javax.naming Reference Reference
public Reference(String className, RefAddr addr)
From source file:org.jahia.services.content.JCRStoreProvider.java
protected Repository getRepositoryByRMI() { Repository instance = null;//from ww w . j a v a 2 s . c o m try { Class<? extends ObjectFactory> factoryClass = Class.forName(factory).asSubclass(ObjectFactory.class); ObjectFactory factory = (ObjectFactory) factoryClass.newInstance(); instance = (Repository) factory.getObjectInstance( new Reference(Repository.class.getName(), new StringRefAddr("url", url)), null, null, null); logger.info("Repository {} acquired via RMI", getKey()); } catch (Exception e) { logger.error("Cannot get by RMI", e); } return instance; }