Hi,
some
additional information is provided here:
Hartmut
Heya. Your guidance on the mailing list has been
most useful. I've got a slight problem though.
I've managed to follow and connect using fully
qualified RemoteInterface names...
but upon trying the JNDI connection, I received
an....
javax.naming.NamingException: java:comp/env
namespace is only available from within a J2EE component.
I've tried various namespaces, but they failed to
find the corresponding bean. What's wrong ?
---
// Connect to Orion 1) Use the fully
qualified RemoteInterface name for the lookup 2) Use the JNDI
Name If you use this option, you will have to modify
your application-client.xml file to read:
<application-client>
<ejb-ref>
<ejb-ref-name>ejb/FooHome</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.foo.FooHome</home>
<remote>com.foo.Foo</remote>
</ejb-ref>
</application-client>
public void
doSomethingWithJNDI(InitialContext ctx)
throws NamingException
{ FooHome home =
(FooHome) PortableRemoteObject.narrow(ctx.lookup("java:comp/env/ejb/FooHome"), FooHome.class);
Foo foo =
home.create();
foo.doSomething();
}
|