/**
* @version $Rev: 607077 $ $Date: 2007-12-27 08:55:23 -0600 (Thu, 27 Dec 2007) $
*/
public class javaURLContextFactory implements ObjectFactory {
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception {
RemoteInitialContextFactory context = new RemoteInitialContextFactory();
String serverUri = System.getProperty("openejb.server.uri");
String moduleId = System.getProperty("openejb.client.moduleId");
Properties props = new Properties();
props.setProperty(Context.PROVIDER_URL, serverUri);
props.setProperty("openejb.client.moduleId", moduleId);
return context.getInitialContext(props);
}