O'Reilly logo

Enterprise JavaBeans, Third Edition by Richard Monson-Haefel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Descriptor’s Body

The body of any XML document begins and ends with the tag for the document’s root element, which is defined by the DTD. For a deployment descriptor, the root element is named <ejb-jar>, and looks like this:

<ejb-jar>
... other elements ...
</ejb-jar>

All other elements must be nested within the <ejb-jar> element. You can place the following kinds of elements within <ejb-jar>:

<description> (optional)

The <description> element can be used to provide a description of the deployment descriptor. This element can be used in many contexts within a deployment descriptor: to describe the descriptor as a whole, to describe particular beans, to describe particular security roles, etc. The Cabin EJB deployment descriptor doesn’t use a <description> element for the deployment descriptor as a whole, but it does provide a description for the Cabin EJB itself.

<display-name> (optional)

The <display-name> element is used by tools (such as a deployment wizard) that are working with the deployment descriptor. It provides a convenient visual label for the entire JAR file and individual bean components.

<small-icon> and <large-icon> (optional)

These elements point to files within the JAR file that provide icons a deployment wizard or some other tool can use to represent the JAR file. Icons must be image files in either the JPEG or GIF format. Small icons must be 16 x 16 pixels; large icons must be 32 x 32 pixels. These icon elements are also used in the <entity>, <session>, and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required