Java Reference
In-Depth Information
Appendix A. Deployment descriptor reference
In this appendix we'll summarize the tags of the EJB 3 descriptor. The appendix is designed
to be a quick reference you can consult when you plan to use a descriptor in your Enterprise
application. Each descriptor is defined by an XML schema, and we describe the elements of
the schema.
As we've explained throughout the topic, you have a choice of using annotations, XML
descriptors, or both to configure your Enterprise application. We've mainly used annotations
throughout this topic, so here we also list what annotation is overridden by the descriptor
when applicable.
This appendix provides a reference to ejb-jar.xml, which is the descriptor for session and
message-driven beans. Although this topic has a brief introduction to JPA, this appendix will
not describe the persistence.xml in any more detail. We invite you to explore more about
JPA on your own.
The schema for EJB 3.2 is referenced at http://xmlns.jcp.org/xml/ns/javaee/ejb-jar_3_2.xsd .
This is the schema file we'll be discussing in this appendix. But the ejb-jar_3_2.xsd schema
file references other schemas as part of its definition. All the schema files for EE 7 are
available for download from Oracle at http://www.oracle.com/webfolder/technetwork/jsc/
xml/ns/javaee/index.html#7 .
A.1. ejb-jar.xml
ejb-jar.xml is the optional deployment descriptor that's packaged in an EJB module. ejb-
jar.xml has two primary elements: enterprise-beans is used to define beans, re-
sources, and services used by the beans, and assembly-descriptor is used to declare
security roles, method permissions, declarative transaction settings, and interceptors. In this
section we provide references only to the elements relevant to EJB 3, and we don't discuss
any elements in the schema that are for the sole purpose of backward compatibility with
EJB 2. You can refer to the schema for ejb-jar.xml at http://xmlns.jcp.org/xml/ns/javaee/ejb-
jar_3_2.xsd .
Search WWH ::




Custom Search