...
Geronimo requires that every EAR file has a standard META-INF/application.xml deployment descriptor. This may be configured for J2EE 1.2, J2EE 1.3, or J2EE 1.4, and should follow the appropriate XML format and following is the application.xml for the above application.
Code Block |
---|
| xml |
---|
borderStyle | solid |
---|
title | application.xml |
---|
borderStyle | solid |
---|
| xml |
---|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<application>
<display-name>HelloWorldEar</display-name>
<module>
<web>
<web-uri>helloworld.war</web-uri>
<context-root>/hello</context-root>
</web>
</module>
</application>
|
This deployment plan define the war module in <web><web-uri>helloworld.war<web-uri> and the root context of it.The geronimo-application.xml is the geronimo specific plan for above application.
Code Block |
---|
| xml | borderStyle | solid |
---|
title | geronimo-application.xml |
---|
borderStyle | solid |
---|
| xml |
---|
|
<application application-name="HelloWorldEar"
xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1">
<sys:environment>
<sys:moduleId>
<sys:groupId>default</sys:groupId>
<sys:artifactId>HelloWorldEar_HelloWorldEar</sys:artifactId>
<sys:version>1-default</sys:version>
<sys:type>car</sys:type>
</sys:moduleId>
<sys:dependencies/>
<sys:hidden-classes/>
<sys:non-overridable-classes/>
</sys:environment>
</application>
|
...
This sample has been taken from the user guide, Sample application.http://cwiki.apache.org/GMOxDOC11/jms-and-mdb-sample-application.html.This is a sample deployment plan for A context root for web application module with a ejb application.
Code Block |
---|
| xml | borderStyle | solid |
---|
title | geronimo-application.xml |
---|
borderStyle | solid |
---|
| xml |
---|
|
<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
<dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
<dep:moduleId>
<dep:groupId>samples</dep:groupId>
<dep:artifactId>Order</dep:artifactId>
<dep:version>1.0</dep:version>
<dep:type>car</dep:type>
</dep:moduleId>
<dep:dependencies/>
<dep:hidden-classes/>
<dep:non-overridable-classes/>
</dep:environment>
</application>
|
In this case, the EJB deployment plan is stored inside the EAR and it is compressed with Order.jar inside META-INF/openejb.xml and ejb-jar.xml . The Web application deployment plan is actually right there inside the EAR deployment plan,compressed with Orderweb.war/WEB-INF/web.xml and geronimo-web.xml.Also the EAR deployment plans both are directly stored right in side the Order.ear/META-INF/application.xml and geronimo-application.xml
Code Block |
---|
| xml | borderStyle | solid |
---|
title | application.xml |
---|
borderStyle | solid |
---|
| xml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<application
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"
version="1.4">
<module>
<ejb>OrderEjb.jar</ejb>
</module>
<module>
<web>
<web-uri>OrderWeb.war</web-uri>
<context-root>/Order</context-root>
</web>
</module>
</application>
|
...
Therefore addition to configuring modules listed in application.xml, the Geronimo plan can add references to new modules, either in the EAR or located in the Geronimo repository.
Code Block |
---|
| xml | borderStyle | solid |
---|
title | geronimo-application.xml |
---|
borderStyle | solid |
---|
| xml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
<dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
<dep:moduleId>
<dep:groupId>default</dep:groupId>
<dep:artifactId>Bank</dep:artifactId>
<dep:version>1.0</dep:version>
<dep:type>car</dep:type>
</dep:moduleId>
<dep:dependencies/>
<dep:hidden-classes/>
<dep:non-overridable-classes/>
</dep:environment>
<module>
<connector>tranql-connector-1.2.rar</connector>
<alt-dd>BankPool.xml</alt-dd>
</module>
</application>
|
Code Block |
---|
| xml | borderStyle | solid |
---|
title | application.xml |
---|
borderStyle | solid |
---|
| xml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<application
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"
version="1.4">
<module>
<ejb>BankEJB.jar</ejb>
</module>
<module>
<web>
<web-uri>BankWeb.war</web-uri>
<context-root>/Bank</context-root>
</web>
</module>
<module>
<connector>tranql-connector-1.2.rar</connector>
</module>
</application>
|
...