1 28 package org.objectweb.carol.jndi.spi; 29 30 import javax.naming.spi.InitialContextFactory ; 31 32 import org.objectweb.carol.jndi.ns.JRMPRegistry; 33 import org.objectweb.carol.util.configuration.CarolDefaultValues; 34 35 43 public class JRMPContextWrapperFactory extends AbsInitialContextFactory implements InitialContextFactory { 44 45 48 public static final String REFERENCING_FACTORY = "com.sun.jndi.rmi.registry.RegistryContextFactory"; 49 50 53 protected String getReferencingFactory() { 54 return REFERENCING_FACTORY; 55 } 56 57 60 protected Class getWrapperClass() { 61 boolean localO = new Boolean (System.getProperty(CarolDefaultValues.LOCAL_JRMP_PROPERTY, "false")).booleanValue(); 62 if ((localO) && JRMPRegistry.isLocal()) { 63 return JRMPLocalContext.class; 64 } else { 65 return JRMPContext.class; 66 } 67 } 68 69 } | Popular Tags |