Annotation-based programming tags are used within your EJBs as providers of metadata that is then used to generate other application artifacts as required. You add these tags to your code in the same way that you add Javadoc comments.
* Bean implementation class for Session Bean: MyBean
This phrase represents the source code comment explaining the function or purpose of this class.
* @
The "@" sign indicates that what follows is an annotation that needs to be processed.
* @ejb.bean * name="myBean" * type="Stateless" * jndi-name="ejb/ejbs/MyBeanHome" * local-jndi-name="ejb/ejbs/MyBeanHome" * view-type="both" * transaction-type="Container" *
This code contains the annotations that will be used to generate additional artifacts. In this case, the annotation specifies that it is of the ejb.bean type, which defines data relating to Enterprise Java™ Beans. The tag also specifies values for the parameters name, type, jndi-name, local-jndi-name, view-type, and transaction-type.
Related Reference