users@glassfish.java.net

Re: Question to ejb-jar.xml override

From: <glassfish_at_javadesktop.org>
Date: Tue, 24 Feb 2009 06:53:37 PST

Hi Thomas,

The Java EE application.xml has a general mechanism for overriding the .xml for a Java EE
module type (.war, ejb-jar, etc.) called alt-dd.

The idea is that you package the ejb-jar in an .ear along with the newer version of the ejb-jar.xml. Then you specify the URI of the ejb-jar.xml along with the ejb-jar in a <module> entry :

  <module>
     <ejb>myejbjar.jar</ejb>
     <alt-dd>newejbjar.xml</alt-dd>
  </module>

Here's the element description from application_5.xsd :

   <xsd:element name="alt-dd"
                   type="javaee:pathType"
                   minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>

            The alt-dd element specifies an optional URI to the
            post-assembly version of the deployment descriptor
            file for a particular Java EE module. The URI must
            specify the full pathname of the deployment
            descriptor file relative to the application's root
            directory. If alt-dd is not specified, the deployer
            must read the deployment descriptor from the default
            location and file name required by the respective
            component specification.

          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
[Message sent by forum member 'ksak' (ksak)]

http://forums.java.net/jive/thread.jspa?messageID=333558