0

Open EJB を使用して Websphere Community サーバーにデプロイされた EJB にアクセスするにはどうすればよいですか? 次のようなコードを使用しようとしていますが、URL に何を使用すればよいかわかりません。ポート 2809 と 1099 を ejb: と IIOP URL プレフィックスで試したことに注意してください。

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

4

1 に答える 1

0

これを試して:

props.put(Context.PROVIDER_URL,"ejbd://127.0.0.1:4201");
于 2010-05-19T19:20:52.013 に答える