Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The root XML element in the geronimo-application-2.0.xsd schema is the <application> element. The top-level XML elements of the <application> root element are described in the sections below. The deployment plan should always use the Web application namespace, and it typically requires elements from Geronimo System and Geronimo Security namespaces. Additionally, it has a required an attribute to identify its configuration name and an optional attribute to select a parent configuration. A typical deployment for geronimo-application.xml can be presented as follows:

...

This element is used to define a single Java EE module and contains a connector, ejb, java, or web element, which indicates the module type. The <module> element also contains an optional <alt-dd> element that specifies an optional URI to the post-assembly version of the deployment descriptor file for a particular Java EE module. If <alt-dd> is not specified, the deployer must read the deployment descriptor from the default location and file name required by the respective component specification.

<ext-module>

The <ext-module> uses the Geronimo default namespace for a geronimo-application.xml file that is described here:

one of the following elements to identify the module:

  • <connector> holds the location of a Java EE Connector module. Must match the same element in application.xml.
    //
    //
  • <ejb> holds the location of an EJB module. Must match the same element in application.xml.
    //
    //
  • <java> holds the location of a client application module. Must match the same element in application.xml.
    //
    //
  • <web> holds the location of a web application module. Must match <web-uri> in application.xml.

The <module> element also contains an optional <alt-dd> element that specifies an optional URI to the post-assembly version of the deployment descriptor file for a particular Java EE module. If <alt-dd> is not specified, the deployer must read the deployment descriptor from the default location and file name required by the respective component specification.

Code Block
xml
xml
borderStylesolid
title<module> example

<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="MDBSampleEAR">

  <module>
    <ejb>example-ejb.jar</ejb>
    <alt-dd>dds/my-ejb-geronimo-plan.xml</alt-dd>
  </module>
  <module>
    <web>
      <web-uri>example-web.war</web-uri>
      <context-root>example</context-root>
    </web>
  </module>

</application>

Then the Geronimo deployment plan could include separate deployment plans for both modules like this:

Code Block
xml
xml
borderStylesolid
title<module> example

<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="MDBSampleEAR">

  <module>
    <ejb>example-ejb.jar</ejb>
    <alt-dd>dds/my-ejb-jar.xml</alt-dd>
  </module>
  <module>
    <web>
      <web-uri>example-web.war</web-uri>
      <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.0"
               xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0">
        <naming:resource-ref>
          <naming:ref-name>jms/AConnectionFactory</naming:ref-name>
          <naming:resource-link>MyConnectionFactory</naming:resource-link>
        </naming:resource-ref>
      </web-app>
    </web>
  </module>

</application>

In this case, the EJB deployment plan is stored inside the EAR (in a directory called dds/ that also holds a replacement for ejb-jar.xml for that module). The Web application deployment plan is right there inside the EAR deployment plan, in its entirety.

<ext-module>

The <ext-module> uses the Geronimo default namespace for a geronimo-application.xml file that is described here:

This element can be used to define a single external Jave EE module that is being deployed or redeployed and contains one of the following elements to identify the module:

  • <connector> holds the location of a Java EE Connector module. Must match the same element in application.xml.
    //
    //
  • <ejb> holds the location of an EJB module. Must match the same element in application.xml.
    //
    //
  • <java> holds the location of a client application module. Must match the same element in application.xml.
    //
    //
  • <web> holds the location of a web application module. Must match <web-uri> in application.xml.

This element can be used to define a single external Jave EE module that is being deployed or redeployed. The <ext-module> element also contains either an <internal-path> or an <external-path>. <internal-path> indicates that the module is packed packaged in the EAR and the path specified is relative to the enterprise application package main directory. <external-path> indicates that the module is not part of the enterprise application and must be located by matching the supplied pattern in a Geronimo repository.

...