Using @EJB to inject local ejb ref to a managed component class within the
same application works, because the appserver can locate the EJB implementing
that local business interface. If there are more than one EJB implementing
that local business interface, you still need to specify additional
attributes for @EJB, e.g., beanName="xxx".
For lookup from unmanaged object, you can either lookup by the portable
global jndi names (EJB 3.1 or later), or if the client code is part of the
EAR, or WAR, declare a <ejb-local-ref>, and then map the ejb-local-ref to its
target EJB in glassfish-specific descriptors.
--
[Message sent by forum member 'cf126330']
View Post: http://forums.java.net/node/837497