JBoss.org Community Documentation
This section covers how JBoss implements @EJB and @Resource. Please note that XML always overrides annotations.
Rules for the @EJB annotation
@EJB ProcessPayment myEjbref;Then the following rules apply:
<ejb-link>
. If the beanName() is defined, then use the same algorithm
as @EJB with no attributes defined except use the beanName() as a key in the search. An exception to this rule is if you use
the ejb-link '#' syntax. The '#' syntax allows you to put a relative path to a jar in the EAR where the EJB you are
referencing lives. See spec for more details
For XML the same rules apply as annotations