by, 01-01-2012 at 03:40 PM (767 Views)
A deployment descriptor consists of a XML based text file along with “.xml” extension which describes deployment settings of a component. J2EE application along with modules consists of their deployment descriptor. Attention shall be paid to those elements that have been marked as bold in deployment descriptor files samples, given below.
Application.xml: is considered as a standard deployment descriptor of J2EE, which has structural information as following: WEB war modules, EJB jar modules, and <security-role> etc. Also, as EJB jar modules have been packaged as jars, similarly dependency libraries for example, log4j.jar or commonUtil.jar have been packaged. The application .xml descriptor distinguishes among 2 jar files which specify EJB jar module explicitly.
ejb-jar.xml: is considered to be a standard deployment descriptor, for an EJB module.XML Code: This is XML of deployment descriptor for a J2EE application<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd"> <application id="Application_ID"> <display-name>MyApps</display-name> <module id="EjbModule_1"> <ejb>MyAppsEJB.jar</ejb> </module> <module id="WebModule_1"> <web> <web-uri>MyAppsWeb.war</web-uri> <context-root>myAppsWeb</context-root> </web> </module> <security-role id="SecurityRole_1"> <description>Management position</description> <role-name>managger</role-name> </security-role> </application>
web.xml: is considered to be a standard deployment descriptor, for a WEB module.