Wednesday, March 10, 2010

.ear files deployment descriptor

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

I have a HelloWorld.ear that contains one HelloWorldEJB module, which is a EJB project and HelloWorldWeb module which is a web module. The HelloWorldWeb module calls methods of HelloWorldEJB


<?xml version="1.0" encoding="UTF-8"?>
<application id="Application_ID" version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
 <display-name>
 HelloWorld</display-name>
 <module id="EjbModule_1251662896937">
  <ejb>HelloWorldEJB.jar</ejb>
 </module>
 <module id="WebModule_1251663065906">
  <web>
   <web-uri>HelloWorldWeb.war</web-uri>
   <context-root>HelloWorldWeb</context-root>
  </web>
 </module>
</application>


In addition to the standard J2EE deployment descriptors, EAR files produced by the Application Server Toolkit can also include additional WebSphere-specific information used when deploying applications to WebSphere environments. This supplemental information is stored in files called ibm-xxx-xxx-xxx.xmi, also in the META-INF directory.

WebSphere Application Server V6.0 and V6.1 can also store deployment-related information (such as data sources, class loader settings, and so on) as part of an Enhanced EAR file. This information is stored in an ibmconfig subdirectory of the EAR file’s META-INF directory.

No comments:

Post a Comment