users@glassfish.java.net

Re: GF not generating stubs on demand for EJB 3.0, ok for EJB 2.x

From: <glassfish_at_javadesktop.org>
Date: Wed, 19 May 2010 13:06:16 PDT

Thank you very much!

Strange enough the EJB spec does not say a word about initial contexts looking up global JNDI names as argument. Am i wrong?

It expects all lookups to be done to java:comp/env where the application server puts the ejb object references when processing the declared xml ejb references ejb-ref, ejb-local-ref and their corresponding ejb-ref elements in server-specific descriptors (sun-ejb-jar.xml for example, or sun-web.xml), these last indicating the global indi named like:

<sun-ejb-jar>
....
<ejb-ref>
<ejb-ref-name>fooRefName</ejb-ref-name>
<jndi-name>corbaname::IP:PORT#GLOBAL_JNDI_NAME</jndi-name>
</ejb-ref>
..
</sun-ejb-jar>

.

I did'nt find a line with direct lookups like
- context.lookup("corbaname::IP:PORT#GLOBAL_JNDI_NAME")
- or context.lookup("GLOBAL_JNDI_NAME")
[Message sent by forum member 'vladbalan']

http://forums.java.net/jive/thread.jspa?messageID=470547