J2EE deployment descriptors

 
 
Every J2EE application module must include an XML based deployment descriptor that provide configuration information for the asset as well as defining relationships to other components.

There are two types of deployments descriptors:
  • vendor neutral deployment descriptors (a.k.a deployment descriptors)
  • vendor specific deployment descriptor (a.k.a deployment plans)
Deployment descriptors are necessary but are not always sufficient to deploy an asset on your server.
Deployment plans provides additional information to map declared resources names, ejb names, security roles, JMS roles (if any) to actual resources in the server. The deployment plans also contain specific server settings and configurations.







J2EE deployment descriptors XML DTDs and XML Schemas



Information

The deployment descriptors and deployment plans XML files must comply with a specific format.

In J2EE specifications up through version 1.3, these deployment descriptors were based on XML DTDs.
Starting with J2EE 1.4, these deployment descriptors are based on XML Schemas.

More information about XML Schemas for Java EE Deployment Descriptors, see:
http://java.sun.com/xml/ns/javaee/

The deployment plan XML DTDs and XML Schemas are not described in this quick guide.


Java EE 5 Schema Resources

J2EE Module Type Deployment Descriptor FileSchema resources
Enterprise Application Archive (EAR) META-INF/application.xml

Examples:
application_1.xml
application_2.xml
application_3.xml
application_5.xsd
Web Application Archive (WAR) WEB-INF/web.xml

Examples:
web_1.xml
web_2.xml
web_3.xml
web-app_2_5.xsd
Jar containing Enterprise Java Beans (JAR) META-INF/ejb-jar.xml

Examples:
ejb-jar_1.xml
ejb-jar_2.xml
ejb-jar_3.xml
ejb-jar_3_0.xsd
J2EE Connector Resources Adapter Archive (RAR) META-INF/ra.xml

Examples:
ra_1.xml
ra_2.xml
ra_3.xml
connector_1_5.xsd
Enterprise Application Client Archive (JAR) META-INF/application-client.xml

Examples:
application-client_1.xml
application-client_2.xml
application-client_3.xml
application-client_5.xsd


J2EE 1.4 XML Schemas

J2EE Module Type Deployment Descriptor FileSchema resources
Enterprise Application Archive (EAR) META-INF/application.xml application_1_4.xsd
Web Application Archive (WAR) WEB-INF/web.xml web-app_2_4.xsd
Jar containing Enterprise Java Beans (JAR) META-INF/ejb-jar.xml ejb-jar_2_1.xsd
J2EE Connector Resources Adapter Archive (RAR) META-INF/ra.xml connector_1_5.xsd
Enterprise Application Client Archive (JAR) META-INF/application-client.xml application-client_1_4.xsd


J2EE 1.3 DTDs

J2EE Module Type Deployment Descriptor FileSchema resources
Enterprise Application Archive (EAR) META-INF/application.xml application_1_3.dtd
Web Application Archive (WAR) WEB-INF/web.xml web-app_2_3.dtd
Jar containing Enterprise Java Beans (JAR) META-INF/ejb-jar.xml ejb-jar_2_0.dtd
J2EE Connector Resources Adapter Archive (RAR) META-INF/ra.xml connector_1_0.dtd
Enterprise Application Client Archive (JAR) META-INF/application-client.xml application-client_1_3.dtd


J2EE 1.2 DTDs

J2EE Module Type Deployment Descriptor FileSchema resources
Enterprise Application Archive (EAR) META-INF/application.xml application_1_2.dtd
Web Application Archive (WAR) WEB-INF/web.xml web-app_2_2.dtd
Jar containing Enterprise Java Beans (JAR) META-INF/ejb-jar.xml ejb-jar_1_1.dtd
J2EE Connector Resources Adapter Archive (RAR) - -
Enterprise Application Client Archive (JAR) META-INF/application-client.xml application-client_1_2.dtd