Outside of an ear you have to lookup into
By default the bean is at local/<ejb-name>
Remote is optimized to local in the same
I still have a few questions:
1) The procedure you propose is a portable one over different EJB servers?
2) Are there necessary any extra-settings into the deployment descriptors?
3) If I have a bean whose JNDI name is "MyBean", can you give me a short example of the lookup code line?
No this is not portable.
The j2ee spec does not include a mechanism
for local references outside the application (ear)
The example code is
InitialContext ctx = new InitialContext();
MyLocalHome home = (MyLocalHome) ctx.lookup("local/MyEJBName");
I think most application servers let you redefine
the global local jndi name
e.g. in jboss.xml