+

Search Tips   |   Advanced Search

EJB 3.0 metadata annotations


Annotations enable you to write metadata for Enterprise Java Beans (EJB) inside the source code. Use them instead of extensible markup language (XML) deployment descriptor files. Annotations can also be used with descriptor files.

If we installed the Feature Pack for EJB 3.0, the default was to scan annotations during the installation of an EJB 3.0 module. For WAS, V7.0, the default is not to scan pre-Java EE 5 modules during the application install or at server startup

To preserve backward compatibility with both the Feature Pack for EJB 3.0 and the Feature Pack for Web Services, we have a choice whether or not to scan legacy Web modules for additional metadata. A server level switch is defined for each feature pack scan behavior. If the default is not appropriate, the switch must be set on each server and admin server that requires a change in the default. The switches are server custom properties com.ibm.websphere.webservices.UseWSFEP61ScanPolicy={true|false} and com.ibm.websphere.ejb.UseEJB61FEPScanPolicy={true|false}. To define these properties in the admin console click Application servers > server name > Process definition > Java Virtual Machine > Custom properties .

WAS ND v7.0 also provides default values for most of the EJB annotations it uses. In many cases, omitting an annotation implies to use the default value.

For the most part, annotations are found in the javax.ejb and javax.persistence packages.



Subtopics


EJB 3.0 interceptors

 

Related concepts


Enterprise beans

 

Related tasks


Develop enterprise beans

 

Related


Enterprise bean development best practices