Versions Compared

Key

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

...

The <abstract-naming-entry> element is an abstract element used as a generic element for referencing these reference types:

  • <gbean-ref>

    The <gbean-ref> element is used to map GBean references to GBeans configured outside the current module

  • <persistenceunit-ref>

    The <persistenceunit-ref> element is used to map persistence unit references to persistence units configured outside the current module

  • <persistencecontext-ref>

    The <persistencecontext-ref> element is used to map persistence context references to persistence contexts configured outside the current module

An example geronimo-web.xml file is shown below using the <abstract-naming-entry> element to reference a persistence unit:

Code Block
xml
xml
borderStylesolid
title<container-config> Example

<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"
         xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2"
         xmlns:naming="http://geronimo.apache.org/schemas-2.1/docs/geronimo-naming-1.2">

    <sys:environment>
        <sys:moduleId>
            <sys:groupId>default</sys:groupId>
            <sys:artifactId>geronimo-web-6</sys:artifactId>
            <sys:version>1.0</sys:version>
            <sys:type>car</sys:type>
        </sys:moduleId>
    </sys:environment> 

    <naming:abstract-naming-entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="naming:persistence-unit-refType">

        <naming:persistence-unit-ref-name>messagedrivenbean-persistenceunitref-unitrefname</naming:persistence-unit-ref-name>
        <naming:persistence-unit-name>messagedrivenbean-persistenceunitref-unitname</naming:persistence-unit-name>

    </naming:abstract-naming-entry>


</web-app>

<naming:ejb-ref>

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 here:

...