EJB Annotations: Difference between revisions
Jump to navigation
Jump to search
Line 8: | Line 8: | ||
=@javax.ejb.EJB= | =@javax.ejb.EJB= | ||
<pre> | |||
@EJB | |||
private MyBusinessInterface myEjb; | |||
</pre> | |||
==mappedName()== | |||
The annotation has a "mappedName()" attribute. The specification designates it as vendor specific metadata. JBoss uses this metadata to specify the global JNDI name of the EJB. If mappedName() is specified, all other attributes (name, description, beanName, beanInterface, lookup) are ignored and this global JNDI name is used for binding. | |||
=@javax.annotation.Resource= | =@javax.annotation.Resource= |
Revision as of 13:48, 24 March 2017
Internal
Overview
If an XML deployment descriptor containing the same semantics exists, the XML content overrides the annotation.
@javax.ejb.EJB
@EJB private MyBusinessInterface myEjb;
mappedName()
The annotation has a "mappedName()" attribute. The specification designates it as vendor specific metadata. JBoss uses this metadata to specify the global JNDI name of the EJB. If mappedName() is specified, all other attributes (name, description, beanName, beanInterface, lookup) are ignored and this global JNDI name is used for binding.