This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Why is there a need for attributes like beanName() OR mappedName() when name() attribute is already available as per the EJB3.1 specification?
According to EJB O'Reily,
1. "The name() attribute refers to what the JNDI ENC name will be for the referenced EJB. This name is relative to the java:comp/env context."
2. "The beanName() is the EJB name of the EJB referenced. It is equal to either the value you specify in the @Stateless.name() or @Stateful.name()
annotation or the value you put in the <ejb-name> field in the XML deployment descriptor."
3. "The mappedName() attribute is a placeholder for a vendor-specific identifier. This identifier may be a key into the vendor’s global registry."
In addition to the above the lookup() attribute adds more to the confusion.
Can someone clarify with an example please?