13.2. The Resource Adapter Geronimo Deployment Plan

The Geronimo deployment plan for a resource adapter is an XML document. It is defined by the geronimo-connector_1_5.xsd schema, which can be found in the schema/ subdirectory of the main Geronimo installation directory. The deployment plan for a resource adapter may be:

The deployment plan should always use the Geronimo Connector namespace. It has required attributes to identify its connector spec version and configuration name, and an optional attribute to select a parent configuration. A typical resource adapter deployment plan looks like this:

META-INF/geronimo-ra.xml

<?xml version="1.0" encoding="UTF-8"?>
<connector
    xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0"
    xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
    configId="MyConfigName"
    parentId="ParentConfigName"
    suppressDefaultParentId="false"
    inverseClassloading="false">
  ...
</connector>

The attributes here are:

xmlns

The main namespace for the deployment plan, which should always be http://geronimo.apache.org/xml/ns/j2ee/connector-1.0

xmlns:sys

A secondary namespace, used to identify the common elements for common libraries and module-scoped services. If there are any of those present in the deployment plan, this attribute should be present, and should be set to http://geronimo.apache.org/xml/ns/deployment-1.0

configId

A unique name identifying this module. If deployed as a standalone RAR, this name can be passed on the server command line to activate this resource adapter when the server starts.

parentId

Identifies the parent configuration for this resource adapter (the value specified here should match the configId for that module). If deployed as a standalone RAR, this can be used to make the resource adapter depend on another standalone module (or it should otherwise be omitted or set to the usual parent for J2EE modules, geronimo/j2ee-server/1.0/car). If deployed as part of an EAR this is usually not necessary, as EAR configuration will be the parent of this module.

suppressDefaultParentId

Normally, when a resource adapter is deployed, the deployer assumes that the connector will run within the application server, and makes it depend on certain server-side classes. If the connector should run on the client side as part of a J2EE application client, that behavior is inappropriate because the server-side configurations should not be loaded in the client environment. So, for connectors that should run on the client side, this attribute should be set to true and the parentId attribute should be set to geronimo/client/1.0/car (or another client-side configuration). For normal server-side connectors, this attribute should be set to false or omitted.

inverseClassloading

If set to true, the class loader for the EJB JAR tries to load a class before checking whether the class is available from its parent class loader. If omitted or set to false, the normal (check parent first) class loader delegation behavior is used (for more details, see the ClassLoader API documentation).