Professional Apache Geronimo (Wrox Professional Guides)

This openejb-jar.xml deployment plan is used to deploy a collection of business-tier EJBs in an EJB JAR file. Table A-4 shows the location of this deployment plan and the associated XML schema.

Table A-4: Location and Name of XML Schema for Business-Tier EJB JAR Deployment Plan

Open table as spreadsheet

Expected location of deployment plan, if included in the archive

In the META-INF subdirectory of the JAR file

Location of XML schema (XSD)

Source code distribution, schema directory

Name of XML schema

openejb-jar-2.1.xsd

Reference Namespaces

The namespaces to use in this file are the attributes of the top-level <openejb-jar> element:

<openejb-jar xmlns=" http://www.openejb.org/xml/ns/openejb-jar-2.1" xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1" xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1" xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0"> ...

Top-Level Elements

Table A-5 contains descriptions of top-level elements in the openejb-jar.xml Geronimo-specific deployment plan.

Table A-5: Top-Level Elements of openejb-jar.xml

Open table as spreadsheet

Element

Description

<sys:environment>

Specifies the module ID and dependencies in this element via <moduleId> and <dependencies> element. You can also use module class-loading control elements such as <hidden-classes> to specify classes that are hidden from parent class loaders; <non- overridable-classes> to specify classes that are only loaded from parent class loaders; or <inverse- classloading> to specify that standard class loader delegation should be reversed. Inheritance of environment by module can be suppressed using <suppress-default-environment>.

<naming:cmp-connection-factory>

Specifies a database pool to be used by Container Managed Persistence (CMP).

<ejb-ql-compiler-factory>

Specifies by name a Java class that can compile EJB QL (Query Language) to SQL statements for execution on CMP EJBs.

<db-syntax-factory>

Specifies by name a Java class that can map to the SQL syntax of a specific database. Used in CMP to adapt to different vendor’s RDBMS products.

<enforce-foreign-key-constraints>

Determines if the container will attempt to enforce foreign key constraints during database operations. This should be specified only when the RDBMS used support foreign key integrity constraints.

<enterprise-beans>

Specifies the resources referenced by <session> and <entity> EJBs. Used mainly for J2EE 1.3 compatibility and reference resources (such as JMS destinations) that are not available with 1.3 descriptors.

<relationships>

Specifies relationships between EJBs (one-to-one, one-to-many, many-to-many) and Container Managed Relationship (CMR) fields.

<naming:message-destination>

References a message-destination (such as JMS queues), which is used within the deployed WAR file.

<security:security>

Configures the security role mappings that will be used when deploying the module. Maps roles specified in the plan to roles or principals in the security realm. See Chapter 16 for more information on the use of this element.

<sys:gbean>

Specifies additional GBeans that are configured and deployed with this module.

Категории