How can I access an EJB deployed on websphere community server using Open EJB? I'开发者_如何学运维m trying to use code like the following but am not sure what to use for a URL. Note I've tried port 2809 and 1099 with ejb: and IIOP URL prefixes.
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.openejb.client.RemoteInitialContextFactory");
props.put(Context.PROVIDER_URL,"IIOP://127.0.0.1:2809");
Context ctx = new InitialContext(props);
Object ref = ctx.lookup("CalculatorRemote ");
CalculatorImpl h = (CalculatorImpl )PortableRemoteObject.narrow(ref,CalculatorImpl.class);
Try this:
props.put(Context.PROVIDER_URL,"ejbd://127.0.0.1:4201");
精彩评论