users@glassfish.java.net

Re: Disambiguating two EJBs in an .ear file

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Fri, 21 Jun 2013 13:22:36 -0700

Are you using <ejb-local-ref> or <ejb-ref>? The latter is for remote.

-marina

On 6/21/13 12:20 PM, Laird Nelson wrote:
> One further question in this area.
>
> While happily screwing things up, I ran across this error (to be
> clear: the error is my fault):
>
> Caused by:
> com.sun.enterprise.container.common.spi.util.InjectionException:
> Exception attempting to inject *Remote* ejb-ref
> name=foo.XBean/y,*Remote 3.x interface
> =foo.Y*,ejb-link=YBean,lookup=,mappedName=,jndi-name=,refType=Session
> into class foo.XBean: Lookup failed for 'java:comp/env/foo.XBean/y' in
> SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory,
> java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
> java.naming.factory.url.pkgs=com.sun.enterprise.naming}
>
> Note all the "remote" stuff. This is despite the fact that none of
> the interfaces in my application are @Remote. Why is that?
>
> Best,
> Laird
>
> --
> http://about.me/lairdnelson