Versions Compared

Key

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

...

The Geronimo-specific deployment plan for a Web application, which is usually packaged as a WAR file, is called "geronimo-web.xml". The geronimo-web.xml deployment plan is used to in conjunction with the web.xml JAVA EE deplopyment plan to deploy web applications consisting of Java Servlet Pages (JSP) and servlets to the Geronimo application server, and optionally can be used to configure the Geronimo web server (i.e., Tomcat or Jetty) where the Web application is going to be deployed. The geronimo-web.xml deployment plan is an optional file, but is typically used when deploying a WAR file. It is used to specify the application security roles, ejb EJB names, database resources, JMS resources, etc. declared in web.xml to corresponding entities deployed in the server. In addition to that, if there are any web container specific configurations, such as Tomcat or Jetty specific, depending on the application needs, all these settings are configured as well here. If the web application depends on any third party libraries or other services running in the server, all these dependencies are declared in the plan. Some web applications require class loading requirements different from the default class loading behavior. The geronimo-web.xml allows application deployer to configure this as well. There are many more configurations that could be done through geronimo-web.xml depending on the requirements of web application.

...

  1. Embedded in a WAR file. In this case, the geronimo-web.xml file must be placed in the /WEB-INF directory of the WAR, which is the same place where the web.xml file must be located.

  2. Maintained separately from the WAR file. : In this case, the path to the file must be provided to the appropriate Geronimo deployer (e.g., command-line or console) when the WAR file is deployed. Note that in this case, the filename may be named something other than geronimo-web.xml but must adhere to the same schema. Also note that this will not work if the EJB JAR file is to be embedded in an enterprise application EAR file (see below).

  3. Embedded in an enterprise application EAR file: In one case, the highroot-level element <web-app> of the geronimo-web-2.0.1.xsd schema can be embedded outside the WAR file in the EAR file's geronimo-application.xml file.

  4. Embedded in an enterprise application EAR file: In another case, the actual geronimo-web.xml file can be placed in the /META-INF directory of the EAR, which is the same location as the application.xml file.

...

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

...

The <sys:environment> XML element uses the Geronimo System namespace, which is used to specify the common elements for common libraries and module-scoped services, and is described at here:

. The <sys:environment> element contains the following elements:

...

The <context-root> XML element uses the Geronimo default namespace for a geronimo-web.xml file that is described at here:

. This element can be used to provide the web context path of the deployed web application, which appears in the URL used to address the application on a Geronimo server.

...

The <work-dir> XML element uses the Geronimo default namespace for a geronimo-web.xml file that is described at here:

. This element can be used to provide the work directory that will be used by this web application. For Jetty this will be relative to jetty home which is var/jetty by default, and for Tomcat this will be relative to catalina.home.

...

The <naming:web-container> XML element uses the Geronimo Naming namespace, which is used to identify the common elements for
resolving EJB references, resource references, and Web services references, and is described at here:

. It is used to specify a reference to a web-container specific GBean either via a pattern or via a link to a GBean. An example geronimo-web.xml file is shown below using the <naming:web-container> elements:

...

The <container-config> XML element uses the Geronimo default namespace for a geronimo-web.xml file that is described at here:

. This element is used for the configuration of elements specific to the underlying Geronimo web container (i.e., Jetty or
Tomcat). An example geronimo-web.xml file is shown below using the <container-config> elements for the Tomcat web container:

...

The <naming:abstract-naming-entry> XML element uses the Geronimo Naming namespace, which is used to identify the common elements
for resolving EJB references, resource references, and Web services references, and is described at here:

It is an abstract element used as a generic element for multiple reference types.

...

The <naming:ejb-ref> XML element uses the Geronimo Naming namespace, which is used to identify the common elements for resolving
EJB references, resource references, and Web services references, and is described at here:

. It is used to map EJB references to EJB's in other
applications using remote home and remote interface. The application which contains the EJB being referenced should either be in same EAR or should be included in dependency list of this application. Also note as the EJB's referenced are in a different JVM all the Client interfaces should also be included in current application.

...

The <naming:ejb-local-ref> XML element uses the Geronimo Naming namespace, which is used to identify the common elements for
resolving EJB references, resource references, and Web services references, and is described at here:

. It is used to map EJB references to EJB's in other applications using local home and local interface. The application which contains the EJB being referenced should either be in same EAR or should be included in dependency list of this application. Also note as the EJB's referenced are in a different JVM all the Client interfaces should also be included in current application.

...

The <naming:service-ref> XML element uses the Geronimo Naming namespace, which is used to identify the common elements for
resolving EJB references, resource references, and Web services references, and is described at here:

. It is used to map service references to service's in
other applications. The application which contains the EJB being referenced should either be in same EAR or should be included in dependency list of this application.

...

The <naming:resource-ref> XML element uses the Geronimo Naming namespace, which is used to identify the common elements for
resolving EJB references, resource references, and Web services references, and is described at here:

. It is used to map resource references to resources's like JDBC resources, JMS resources, etc. configured outside the current application.

...

The <naming:resource-env-ref> XML element uses the Geronimo Naming namespace, which is used to identify the common elements for
resolving EJB references, resource references, and Web services references, and is described at here:

. It is used to map resource references to administrative objects deployed as a part of connectors.

...

The <naming:message-destination> XML element uses the Geronimo Naming namespace, which is used to identify the common elements
for resolving EJB references, resource references, and Web services references, and is described at here:

. It is used to configure a JMS queue or topic which acts like a destination for the messages delivered.

...

The <security-realm-name> XML element uses the Geronimo default namespace for a geronimo-web.xml file that is described at here:

It is used to specify the name of the security realm that will be used for user authentication.

...

The <app:security> XML element uses the Geronimo Applicaiton namespace described at here: http://geronimo.apache.org/schemas-2.1/docs/geronimo-application-2.0.xsd.html.

It is used to maps roles specified in the WAR file to roles or principals in the security realm that will be used when deploying the module.

...

The <sys:service> XML element uses the Geronimo System namespace described at here:

...


  • It is an empty generic element to be extended by GBean and other module types.

<ee:persistence>

The <ee:persistence> XML element uses the Java EE Persistence namespace described at here:

. Apache Geronimo uses OpenJPA for providing Java Persistence API to Java EE applications deployed in the server.

...