Deployment plans has been edited by Kevan Miller (Feb 22, 2008).

(View changes)

Content:

Every module that you install in Geronimo, whether it is a service, application, resource, etc., can be configured via a deployment plan. These deployment plans are XML files based on XML Schemas containing the configuration details for a specific application module or component. The Java EE 5 specification defines standard deployment descriptors such as web.xml, application.xml, etc. In some cases, the deployment descriptor is all that is required to install a module into a Geronimo server. However, in many cases, server-specific configuration is required when modules are installed. This server-specific configuration is accomplished by using Geronimo deployment plans.

The Java EE 5 specification also let's you use Annotations where you add resource references, dependencies, etc. directly in the code. Geronimo provides a Deployment plan wizard that automatically generates the necessary deployment plans based on the standard deployment descriptors and annotations.

This document is organized in the following sections:

XML Schemas


Apache Geronimo v2.1 XML Schemas

Java EE Deployment Plans

Module Type Geronimo Schema Preferred Java EE Schema
General (Tomcat or Jetty) Web Application (WAR) http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1 web-app_2_5.xsd
Tomcat-Only Web Application (WAR) http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1 web-app_2_5.xsd
Jetty-Only Web Application (WAR) http://geronimo.apache.org/xml/ns/j2ee/web/jetty-2.0.2 web-app_2_5.xsd
EJB (JAR) http://www.openejb.org/xml/ns/openejb-jar-2.1 ejb-jar_3_0.xsd
J2EE Connector (RAR) http://geronimo.apache.org/xml/ns/j2ee/connector-1.2 connector_1_5.xsd
Application Client (JAR) http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0 application-client_5.xsd
Application (EAR) http://geronimo.apache.org/xml/ns/j2ee/application-2.0 application_5.xsd

Common Elements & Configuration

Module Type Geronimo Schema Description
Server Plans & Common Elements http://geronimo.apache.org/xml/ns/deployment-1.2 Used to deploy new services in Geronimo in a standalone plan, and also contains common elements used by many other plans.
Geronimo Plugin Descriptor http://geronimo.apache.org/xml/ns/plugins-1.3 Metadata on a Geronimo plugin or a list of available Geronimo plugins.
Security Mapping http://geronimo.apache.org/xml/ns/security-2.0 Common security elements used by other plans.
Security Realms http://geronimo.apache.org/xml/ns/loginconfig-2.0 Abbreviated syntax for configuring security realm and login module GBeans. You can either manually configure multiple GBeans or declare a single GBean for the realm using this to configure all the login modules.
Naming http://geronimo.apache.org/xml/ns/naming-1.2 Common elements for references to other components (EJBs, database pools, JMS resources, J2EE Connectors, Web Services, etc.)
Primary Key Generator http://www.openejb.org/xml/ns/pkgen-2.0 Abbreviated syntax for configuring primary key generators for CMP entity beans. Avoids manually configuring and wiring up PK generator GBeans.
CORBA CSS Configuration http://openejb.apache.org/xml/ns/corba-css-config-2.1 Abbreviated syntax for configuring security for clients accessing remote EJBs via CORBA.
CORBA TSS Configuration http://openejb.apache.org/xml/ns/corba-tss-config-2.1 Abbreviated syntax for configuring security for EJBs exposed via CORBA.
config.xml http://geronimo.apache.org/xml/ns/attributes-1.2 The format of the var/config/config.xml file.
Tomcat Web App Configuration http://geronimo.apache.org/xml/ns/web/tomcat/config-1.0 If you use the generic (geronimo-web-2.0.xsd) web application configuration, you can use these elements in the container-config element to configure Tomcat-specific behavior.
Jetty Web App Configuration http://geronimo.apache.org/xml/ns/web/jetty/config-1.0.1 If you use the generic (geronimo-web-2.0.xsd) web application configuration, you can use these elements in the container-config element to configure Jetty-specific behavior.

Java EE Deployment Plans

Module Type Geronimo Schema Preferred Java EE Schema
General (Tomcat or Jetty) Web Application (WAR) http://geronimo.apache.org/xml/ns/j2ee/web-2.0 web-app_2_5.xsd
Tomcat-Only Web Application (WAR) http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0 web-app_2_5.xsd
Jetty-Only Web Application (WAR) http://geronimo.apache.org/xml/ns/j2ee/web/jetty-2.0 web-app_2_5.xsd
EJB (JAR) http://www.openejb.org/xml/ns/openejb-jar-2.1 ejb-jar_3_0.xsd
J2EE Connector (RAR) http://geronimo.apache.org/xml/ns/j2ee/connector-1.2 connector_1_5.xsd
Application Client (JAR) http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0 application-client_5.xsd
Application (EAR) http://geronimo.apache.org/xml/ns/j2ee/application-2.0 application_5.xsd

Common Elements & Configuration

Module Type Geronimo Schema Description
Server Plans & Common Elements http://geronimo.apache.org/xml/ns/deployment-1.2 Used to deploy new services in Geronimo in a standalone plan, and also contains common elements used by many other plans.
Geronimo Plugin Descriptor http://geronimo.apache.org/xml/ns/plugins-1.2 Metadata on a Geronimo plugin or a list of available Geronimo plugins.
Security Mapping http://geronimo.apache.org/xml/ns/security-2.0 Common security elements used by other plans.
Security Realms http://geronimo.apache.org/xml/ns/loginconfig-2.0 Abbreviated syntax for configuring security realm and login module GBeans. You can either manually configure multiple GBeans or declare a single GBean for the realm using this to configure all the login modules.
Naming http://geronimo.apache.org/xml/ns/naming-1.2 Common elements for references to other components (EJBs, database pools, JMS resources, J2EE Connectors, Web Services, etc.)
Primary Key Generator http://www.openejb.org/xml/ns/pkgen-2.0 Abbreviated syntax for configuring primary key generators for CMP entity beans. Avoids manually configuring and wiring up PK generator GBeans.
CORBA CSS Configuration http://openejb.apache.org/xml/ns/corba-css-config-2.1 Abbreviated syntax for configuring security for clients accessing remote EJBs via CORBA.
CORBA TSS Configuration http://openejb.apache.org/xml/ns/corba-tss-config-2.1 Abbreviated syntax for configuring security for EJBs exposed via CORBA.
config.xml http://geronimo.apache.org/xml/ns/attributes-1.2 The format of the var/config/config.xml file.
Tomcat Web App Configuration http://geronimo.apache.org/xml/ns/web/tomcat/config-1.0 If you use the generic (geronimo-web-2.0.xsd) web application configuration, you can use these elements in the container-config element to configure Tomcat-specific behavior.
Jetty Web App Configuration http://geronimo.apache.org/xml/ns/web/jetty/config-1.0 If you use the generic (geronimo-web-2.0.xsd) web application configuration, you can use these elements in the container-config element to configure Jetty-specific behavior.

Configurations

The examples provided in this section are independent of any application. Most of these configurations can be generated and deployed through the Geronimo Administration Console as well.

Connection pools

For the most part, deployment plans for database connection pool will be very similar from each other. However, depending on the database the pool will be connecting to, you may need to specify some additional parameters.

Embedded Derdy DB

Embedded Derdy DB connection pool deployment plan
<?xml version="1.0" encoding="UTF-8"?>
<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
    <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
        <dep:moduleId>
            <dep:groupId>console.dbpool</dep:groupId>
            <dep:artifactId>TimeReportPool</dep:artifactId>
            <dep:version>1.0</dep:version>
            <dep:type>rar</dep:type>
        </dep:moduleId>
        <dep:dependencies>
            <dep:dependency>
                <dep:groupId>org.apache.geronimo.configs</dep:groupId>
                <dep:artifactId>system-database</dep:artifactId>
            </dep:dependency>
        </dep:dependencies>
    </dep:environment>
    <resourceadapter>
        <outbound-resourceadapter>
            <connection-definition>
                <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
                <connectiondefinition-instance>
                    <name>TimeReportPool</name>
                    <config-property-setting name="Driver">org.apache.derby.jdbc.EmbeddedDriver</config-property-setting>
                    <config-property-setting name="ConnectionURL">jdbc:derby:TimeReportDB</config-property-setting>
                    <connectionmanager>
                        <local-transaction/>
                        <single-pool>
                            <max-size>10</max-size>
                            <min-size>0</min-size>
                            <match-one/>
                        </single-pool>
                    </connectionmanager>
                </connectiondefinition-instance>
            </connection-definition>
        </outbound-resourceadapter>
    </resourceadapter>
</connector>

Security

Resources

Applications

Depending on the type of application you are deploying you will need a different type of deployment plan. The following table illustrates the standard JEE deployment descriptors as well as those specific to Apache Geronimo.

File Standard JEE deployment descriptors Apache Geronimo specific Deployment plan
Web Application Archive (WAR) web.xml geronimo-web.xml
Enterprise Web application archive (EAR) application.xml geronimo-application.xml
J2EE Connector resources archive (RAR) ra.xml geronimo-ra.xml
J2EE client application archive (JAR) client.xml geronimo-application-client.xml
JAR containing EJBs ejb-jar.xml openejb-jar.xml

geronimo-web.xml

geronimo-application.xml

geronimo-ra.xml

geronimo-application-client.xml

openejb-jar.xml

See openejb-jar.xml

Powered by Atlassian Confluence (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request

Unsubscribe or edit your notifications preferences