What is the difference between name, beanName and mappedName attributes for annotation @EJB in EJB3.0?
I found this on net at following link -
http://www.tutorialspoint.com/ejb/ejb_annotations.htm
name - Used to specify name which will be used to locate the referenced bean in environment. beanName - Used to provide name of the referenced bean. mappedName - Used to specify the JNDI name of the referenced bean. How do the name in name and beanName attribute differ ?
The @EJB declares an EJB reference from your component to a target EJB. The name is the key of the reference in your component environment. There are several ways to specify the target EJB:
beanName (or <ejb-link> in XML) can be used to specify the target EJB if the EJB is located in the same application as your componentmappedName is a non-portable, vendor-specific string (even though it's part of the standard!) that somehow identifies the target.lookup is a portable way to specify a JNDI string of the target.@EJB will target an EJB in the same application that implements the target type if there is only one.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With