use of org.apache.openejb.client.RemoteInitialContextFactory in project tomee by apache.
the class javaURLContextFactory method getObjectInstance.
@Override
public Object getObjectInstance(final Object obj, final Name name, final Context nameCtx, final Hashtable<?, ?> environment) throws Exception {
final RemoteInitialContextFactory context = new RemoteInitialContextFactory();
final String serverUri = System.getProperty("openejb.server.uri");
final String moduleId = System.getProperty("openejb.client.moduleId");
final Properties props = new Properties();
props.setProperty(Context.PROVIDER_URL, serverUri);
props.setProperty("openejb.client.moduleId", moduleId);
return context.getInitialContext(props);
}
Aggregations