Thursday, March 27, 2008

Why you need deployment descriptors

Deployment descriptors relate installation and configuration information about applications to the application servers. They can also be used to convey information about the application to other people involved in the development process.

If you want to create an application that can be deployed without the headache of manually configuring its components, then packaging it as a WAR, JAR, or EAR file is the best approach. Each of these files requires a deployment descriptor.

Overlapping elements

The following bulleted lists are meant to show the overlap of deployment descriptor elements.

Common elements in all descriptors (web.xml, application.xml, and ejb- jar.xml):

  • Icons
  • Description
  • Display name

Elements in only web.xml and ejb-jar.xml deployment descriptors:

  • Naming environment entries
  • EJB references
  • Connection factory references
  • Security elements

Elements in application.xml deployment descriptor only:

  • Module descriptions
  • Security roles

Elements in web.xml deployment descriptor only:

  • Servlet definitions
  • Servlet mappings
  • Error pages
  • Form-based authentication configuration

Elements in ejb-jar.xml deployment descriptor only:

  • Transaction elements
  • Persistence elements

No comments:

Post a Comment