开发者

Accessing an EJB deployed on websphere community server using Open EJB?

开发者 https://www.devze.com 2022-12-29 17:09 出处:网络
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

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");
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号