4-6 Programming Enterprise JavaBeans, Version 3.0, for Oracle WebLogic Server
validation checks across the modules. See Building Modules and Applications Using wlappc in Developing Applications for Oracle WebLogic Server.
■
wlcompile Ant task—Invokes the javac compiler to compile your applications Java components in a split development directory structure. See Compiling
Applications Using wlcompile in Developing Applications for Oracle WebLogic Server.
■
javac —The javac compiler provided with the Sun Java J2SE SDK provides java compilation capabilities. See
http:java.sun.comdocs .
4.7 Optionally Create and Edit Deployment Descriptors
A very important aspect of the new EJB 3.0 programming model is the introduction of metadata annotations. Annotations simplify the EJB development process by allowing
a developer to specify within the Java class itself how the bean behaves in the container, requests for dependency injection, and so on. Annotations are an alternative
to deployment descriptors that were required by older versions 2.X and earlier of EJB.
However, EJB 3.0 still fully supports the use of deployment descriptors, even though the standard Java Platform, Enterprise Edition Java EE Version 5 ones are not
required. For example, you may prefer to use the old 2.X programming model, or might want to allow further customizing of the EJB at a later development or
deployment stage; in these cases you can create the standard deployment descriptors in addition to, or instead of, the metadata annotations.
Deployment descriptor elements always override their annotation counterparts. For example, if you specify the javax.ejb.TransactionManagementBEAN
annotation in your bean class, but then create an ejb-jar.xml deployment descriptor for the EJB and set the transaction-type element to container,
then the deployment descriptor value takes precedence and the EJB uses container-managed transaction demarcation.
The 2.X version of Programming WebLogic Enterprise JavaBeans for Oracle WebLogic Server provides detailed information about creating and editing EJB deployment descriptors,
both the Java EE standard and WebLogic-specific ones. In particular, see the following sections:
■
EJB Deployment Descriptors Overview Information
■
Edit Deployment Descriptors
■
Deployment Descriptor Schema and Document Type Definitions Reference
■
weblogic-ejb-jar.xml Deployment Descriptor Reference
■
weblogic-cmp-jar.xml Deployment Descriptor Reference
Note: This version of EJB 3.0 also supports all 2.X WebLogic-specific
EJB features. However, the features that are configured in the weblogic-ejb-jar.xml or weblogic-cmp-rdbms-jar.xml
deployment descriptor files must continue to be configured that way for this release of EJB 3.0 because currently they do not have any
annotation equivalent.
Iterative Development of Enterprise JavaBeans 3.0 4-7
4.8 Packaging EJBs