Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

An enterprise application archive (EAR) can consist of many sub modules. The sub modules can be web modules (WAR), ejb modules (JAR), resource adapter modules (RAR) or application client modules (jar). excerpt INLINE

When an EAR consist of many sub modules, the deployment plans for all the sub modules can be provided in a single file named geronimo-application.xml.

...

...

There are 3 places a deployment plan (partial) can be associated with an ear, and they are used in this order:

1. external plan to be specified at deployment time
2. ear level geronimo-application.xml
3. module level geronimo|openejb-*.xml

So, anything in an external plan takes precedence over bits in (2) or (3) configuring the same module. Anything in (2) takes precedence over a module level plan. If a module level plan is missing from (1) its looked for in (2),then (3); if missing from (1) and (2), then its looked for in the module (3).

There is no attempt to merge plans from these different locations: e.g. if there's something in (1) for a module, any other plans are ignored.

...

An enterprise application archive (EAR) should provide its deployment descriptor in the application.xml file. The application.xml lists all the sub modules in the EAR file along with the descriptions. In addition to the standard deployment descriptor, the EAR 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. geronimo-application.xml 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. The geronimo-application.xml is the super set of all other deployment plans.

...

The deployment descriptor of the OrderEJB.jar is as follows.

...

...

The default namespace of the above XML document is http://java.sun.com/xml/ns/javaee. The XML elements that do not have a namespace prefix belong to the default namespace.

In the RetrieveOrderInfoBean, the following code is used to look up the Datasource object and obtain a database connection.

...

...

The deployment descriptor of the OrderWEB.war is as follows.

...

...

The default namespace of the above XML document is http://java.sun.com/xml/ns/javaee. The XML elements that do not have a namespace prefix belong to the default namespace.

In the RetrieveOrder servlet, the following code is used to look up the ejb to retrieve the order details.

...

The deployment descriptor of the Order.ear is as follows.

...

...

The default namespace of the above XML document is http://java.sun.com/xml/ns/javaee. The XML elements that do not have a namespace prefix belong to the default namespace.

The deployment plan of the Order.ear is as follows.

...

...

The default namespace of the above XML document is http://geronimo.apache.org/xml/ns/j2ee/application-2.0. The XML elements that do not have a namespace prefix belong to the default namespace.

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.

...

Also, observe that, in the geronimo-application.xml, along with moduleId configuration for the EAR itself, there is a moduleId configuration for each web and ejb modules. If the above EAR file deployed on the server and the configurations are listed, the following output would be displayed on the console.

#000000solid No Format

bgColor#000000
borderStylesolid
C:\Geronimo-2.1\bin>deploy.bat --user system --password manager list-modules Using GERONIMO_BASE: C:\Geronimo-2.1 Using GERONIMO_HOME: C:\Geronimo-2.1 Using GERONIMO_TMPDIR: var\temp Using JRE_HOME: C:\sun\jre Found 92 modules + Order/OrderEAR/5.0/car `-> OrderWEB.war `-> OrderEJB.jar + console.dbpool/OrderDS/1.0/rar

The moduleId Order/OrderEAR/5.0/car is the configuration for the Order.ear. The ejb module declares a dependency on the console.dbpool/OrderDS/1.0/rar configuration in <sys:dependencies> section. This is the moduleId of the database pool that connects to the DB2 database where the order details are stored.