Hello Rodger,
Try this..
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,
"org.openejb.client.RemoteInitialContextFactory");
p.put(Context.PROVIDER_URL, "ejbd://localhost:4201");
Context c = new InitialContext(p);
Echo echo = (Echo) c.lookup("EchoRemote");
Regards,
Rodney
On Wed, Aug 26, 2009 at 6:23 PM, Rodger <[email protected]> wrote:
> Hi,
> I have a remote interface *my.test.Echo* and a ejb *my.test.EchoBean*.
> I don't do any configuration for the jndi in deployment descriptor and
> deployment plan.
>
> Then using
> *...@ejb(name="my/test/Echo")
> private Echo echo;
> *can find the ejb and run successfully.*
> *
> But why using
> *Context ctx = new InitialContext();
> Echo echo = (Echo)ctx.lookup("java:comp/env/my/test/Echo"); *
> there is:
>
> *javax.naming.NotContextException: my/test/Echo
>
> *Who can help me?*
> *
>
> Geronimo version 2.2
> --
> Best Regards,
> Rodger.
>