Home

 

Deployment descriptors

In J2EE 1.4 and earlier, information describing a J2EE application and how to deploy it into a J2EE container was stored in XML files called deployment descriptors. An EAR file normally contained multiple deployment descriptors, depending on the modules it contains. Figure | -1 shows a schematic overview of a J2EE EAR file. The various deployment descriptors are designated with DD after their name.

Figure 26-1 J2EE EAR file structure

The deployment descriptor of the EAR file itself is stored in the META-INF directory in the root of the enterprise application and is called application.xml. It contains information about the modules making up the application.

The deployment descriptors, the modules they describe, and their folders are:

web.xml for Web modules stored in WEB-INF

ejb-jar.xml for EJB modules stored in META-INF

ra.xml for resource adapter modules stored in META-INF

application-client.xml for Application Client modules stored in META-INF

These files describe the contents of a module and allow the Java EE container to configure servlet mappings, JNDI names, and so forth.

Classpath information specify which other modules and utility JARs are needed for a particular module to run. This information is stored in the manifest.mf file, which is also in the META-INF (or WEB-INF) directory of the modules.

ibm.com/redbooks