...
An enterprise application archive (ear)
should provide its deployment descriptor in application.xml. The application.xml
lists all the sub modules in the ear
file along with the descriptions. Along with the deployment descriptor, deployer should also provide geronimo specific deployment plan in geronimo-application.xml. Along with the description of each of the sub modules of the ear
file, this file also provides mappings for JEE resources that each of the sub modules refers in their deployment descriptor. The geronimo-application.xml
is divided into several sections where in each section, the deployment plan for a sub module is provided. The deployment plan borrows XML elements from all other schemas. It is the highest level plan that provides deployment plan for all sub modules; hence it can contain XML elements from every other geronimo XML schema used by geronimo application deployer. At first glance of this file, one can conclude that it embeds geronimo-web.xml, openejb-jar.xml, geronimo-ra.xml and geronimo-application-client.xml in a single XML fileThe geronimo-application.xml
is the super set of all other deployment plans.
For example, following is the structure of an ear
that has a web module and an ejb module.
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<?xml version="1.0" encoding="UTF-8"?> <application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2" application-name="Order"> <sys:environment> <sys:moduleId> <sys:groupId>Order</sys:groupId> <sys:artifactId>OrderEAR</sys:artifactId> <sys:version>5.0</sys:version> <sys:type>car</sys:type> </sys:moduleId> </sys:environment> <module> <web>OrderWEB.war</web> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1" > <sys:environment> <sys:moduleId> <sys:groupId>Order</sys:groupId> <sys:artifactId>OrderWEB</sys:artifactId> <sys:version>2.5</sys:version> <sys:type>war</sys:type> </sys:moduleId> </sys:environment> <context-root>/OrderDemo</context-root> </web-app> </module> <module> <ejb>OrderEJB.jar</ejb> <openejb-jar xmlns="http://openejb.apache.org/xml/ns/openejb-jar-2.2" xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2"> <sys:environment> <sys:moduleId> <sys:groupId>Order</sys:groupId> <sys:artifactId>OrderEJB</sys:artifactId> <sys:version>3.0</sys:version> <sys:type>jar</sys:type> </sys:moduleId> <sys:dependencies> <sys:dependency> <sys:groupId>console.dbpool</sys:groupId> <sys:artifactId>OrderDS</sys:artifactId> <sys:version>1.0</sys:version> <sys:type>rar</sys:type> </sys:dependency> </sys:dependencies> </sys:environment> <enterprise-beans> <session> <ejb-name>RetrieveOrderInfoBean</ejb-name> <naming:resource-ref> <naming:ref-name> jdbc/DB2DataSource </naming:ref-name> <naming:resource-link> OrderDS </naming:resource-link> </naming:resource-ref> </session> </enterprise-beans> </openejb-jar> </module> </application> |
Please observe Observe how the JEE 5 resource names and ejb names in ejb-jar.xml
and web.xml
are mapped to actual resources deployed in the server through geronimo-application.xml
.
...