Hello
i'm running GF 2 appclient script with an application client module packaged in an EAR. The EAR also contains an EJB, call it A, implementing a remote interface I and having a global jndi-name specified, not the default which would be the package prefixed name of I.
The app client module has an @EJB reference to I, and there is also a deployed EJB in another EAR, call it B. Both A and B implement the same remote interface and the @EJB in the application client module does not use any jndi-name or mapped-name. Also B has no jndi-name or mapped name so it uses the default jndi name (package prefixed name of I).
So B should be the one called.
I don't understand why, whether the ear containing EJB A is deployed or not, it is the EJB A or EJB B that get called.
appclient script should not do a "by interface" search and thus find A, it is not an EJB container. It should only find B by the default global jndi name which is the name of the common remote interface of A and B.
Why does appclient cosider EJBs besides it? Is this specified?
As you see which EJB gets called is impredictable.
This is discussed in this post :
http://forums.java.net/jive/thread.jspa?messageID=470938
[Message sent by forum member 'vladbalan']
http://forums.java.net/jive/thread.jspa?messageID=472170