Manage Learn to apply best practices and optimize your operations.

EJB deployment descriptor top-level elements

A discussion of the top-level elements necessary for deploying EJB in your enterprise.

EJB deployment descriptor top-level elements
Paul Perrone

This tip, excerpted from InformIT, offers a discussion of the top-level elements necessary for deploying EJB in your enterprise.

Paul Perrone is the author of Building Java Enterprise Systems with J2EE.

Java 2 platform, Enterprise Edition (J2EE) enterprise applications are made up of one or more individual J2EE modules. J2EE modules have deployment descriptors specific to the module type, and J2EE enterprise applications also have their own deployment descriptor format.

J2EE EJB application module deployment descriptors are defined in XML files named ejb-jar.xml. Here I describe elements of the EJB deployment descriptor as they become relevant to the topic at hand. I thus carve out pieces of the XML EJB module and describe them as the elements they define become relevant. If you are new to XML and XML DTDs, I encourage you to review the basics of XML and DTD structure now. At the very least, I will provide examples of what XML files that adhere to the DTD schema specifications should look like.

The top-level elements of an EJB deployment descriptor, shown in the listing, are elements used to define EJB application metadata, EJB structure, assembly information, and the archive filename for any EJB client files. EJB application module deployment descriptors defined according to such a format must also include a standard DOCTYPE definition referencing the standard DTD. The basic top-level structure of an EJB deployment descriptor thus follows the sample form in the Listing.

EJB DTD Top-Level Elements

<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//
[ic:ccc]DTD Enterprise JavaBeans 1.1//EN" 
[ic:ccc] "">

 <description> This is my EJB Application </description>
 <display-name> Application Service </display-name>
 <small-icon> beeshirtsSmall.jpg </small-icon>
 <large-icon> beeshirtsLarge.jpg </large-icon>
  <session> ... </session>
  <session> ... </session>
  <entity> ... </entity>
  <entity> ... </entity>
 <ejb-client-jar> beeshirtsClient.jar </ejb-client-jar>

To read the article from which this tip was excerpted, click over to InformIT. You have to register there, but the registration is free.

This was last published in November 2001

Dig Deeper on Microservices pattern, platforms and frameworks



Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.