1<?xml version="1.0" encoding="UTF-8"?>
2<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
3            targetNamespace="http://java.sun.com/xml/ns/javaee"
4            xmlns:javaee="http://java.sun.com/xml/ns/javaee"
5            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
6            elementFormDefault="qualified"
7            attributeFormDefault="unqualified"
8            version="6">
9  <xsd:annotation>
10    <xsd:documentation>
11
12      DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
13
14      Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved.
15
16      The contents of this file are subject to the terms of either the
17      GNU General Public License Version 2 only ("GPL") or the Common
18      Development and Distribution License("CDDL") (collectively, the
19      "License").  You may not use this file except in compliance with
20      the License. You can obtain a copy of the License at
21      https://glassfish.dev.java.net/public/CDDL+GPL.html or
22      glassfish/bootstrap/legal/LICENSE.txt.  See the License for the
23      specific language governing permissions and limitations under the
24      License.
25
26      When distributing the software, include this License Header
27      Notice in each file and include the License file at
28      glassfish/bootstrap/legal/LICENSE.txt.  Sun designates this
29      particular file as subject to the "Classpath" exception as
30      provided by Sun in the GPL Version 2 section of the License file
31      that accompanied this code.  If applicable, add the following
32      below the License Header, with the fields enclosed by brackets []
33      replaced by your own identifying information:
34      "Portions Copyrighted [year] [name of copyright owner]"
35
36      Contributor(s):
37
38      If you wish your version of this file to be governed by only the
39      CDDL or only the GPL Version 2, indicate your decision by adding
40      "[Contributor] elects to include this software in this
41      distribution under the [CDDL or GPL Version 2] license."  If you
42      don't indicate a single choice of license, a recipient has the
43      option to distribute your version of this file under either the
44      CDDL, the GPL Version 2 or to extend the choice of license to its
45      licensees as provided above.  However, if you add GPL Version 2
46      code and therefore, elected the GPL Version 2 license, then the
47      option applies only if the new code is made subject to such
48      option by the copyright holder.
49
50    </xsd:documentation>
51  </xsd:annotation>
52
53  <xsd:annotation>
54    <xsd:documentation>
55      <![CDATA[[
56      This is the XML Schema for the application 6 deployment
57      descriptor.  The deployment descriptor must be named
58      "META-INF/application.xml" in the application's ear file.
59      All application deployment descriptors must indicate
60      the application schema by using the Java EE namespace:
61
62      http://java.sun.com/xml/ns/javaee
63
64      and indicate the version of the schema by
65      using the version element as shown below:
66
67      <application xmlns="http://java.sun.com/xml/ns/javaee"
68      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
69      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
70      	http://java.sun.com/xml/ns/javaee/application_6.xsd"
71      version="6">
72      ...
73      </application>
74
75      The instance documents may indicate the published version of
76      the schema using the xsi:schemaLocation attribute for Java EE
77      namespace with the following location:
78
79      http://java.sun.com/xml/ns/javaee/application_6.xsd
80
81      ]]>
82    </xsd:documentation>
83  </xsd:annotation>
84
85  <xsd:annotation>
86    <xsd:documentation>
87
88      The following conventions apply to all Java EE
89      deployment descriptor elements unless indicated otherwise.
90
91      - In elements that specify a pathname to a file within the
92      same JAR file, relative filenames (i.e., those not
93      starting with "/") are considered relative to the root of
94      the JAR file's namespace.  Absolute filenames (i.e., those
95      starting with "/") also specify names in the root of the
96      JAR file's namespace.  In general, relative names are
97      preferred.  The exception is .war files where absolute
98      names are preferred for consistency with the Servlet API.
99
100    </xsd:documentation>
101  </xsd:annotation>
102
103  <xsd:include schemaLocation="javaee_6.xsd"/>
104
105
106<!-- **************************************************** -->
107
108  <xsd:element name="application"
109               type="javaee:applicationType">
110    <xsd:annotation>
111      <xsd:documentation>
112
113        The application element is the root element of a Java EE
114        application deployment descriptor.
115
116      </xsd:documentation>
117    </xsd:annotation>
118    <xsd:unique name="context-root-uniqueness">
119      <xsd:annotation>
120        <xsd:documentation>
121
122          The context-root element content must be unique
123          in the ear.
124
125        </xsd:documentation>
126      </xsd:annotation>
127      <xsd:selector xpath="javaee:module/javaee:web"/>
128      <xsd:field xpath="javaee:context-root"/>
129    </xsd:unique>
130    <xsd:unique name="security-role-uniqueness">
131      <xsd:annotation>
132        <xsd:documentation>
133
134          The security-role-name element content
135          must be unique in the ear.
136
137        </xsd:documentation>
138      </xsd:annotation>
139      <xsd:selector xpath="javaee:security-role"/>
140      <xsd:field xpath="javaee:role-name"/>
141    </xsd:unique>
142  </xsd:element>
143
144
145<!-- **************************************************** -->
146
147  <xsd:complexType name="applicationType">
148    <xsd:annotation>
149      <xsd:documentation>
150
151        The applicationType defines the structure of the
152        application.
153
154      </xsd:documentation>
155    </xsd:annotation>
156    <xsd:sequence>
157      <xsd:element name="application-name"
158                   type="javaee:string"
159                   minOccurs="0"/>
160      <xsd:group ref="javaee:descriptionGroup"/>
161      <xsd:element name="initialize-in-order"
162                   type="javaee:generic-booleanType"
163                   minOccurs="0"
164                   maxOccurs="1">
165        <xsd:annotation>
166          <xsd:documentation>
167
168            If initialize-in-order is true, modules must be initialized
169            in the order they're listed in this deployment descriptor,
170            with the exception of application client modules, which can
171            be initialized in any order.
172            If initialize-in-order is not set or set to false, the order
173            of initialization is unspecified and may be product-dependent.
174
175          </xsd:documentation>
176        </xsd:annotation>
177      </xsd:element>
178      <xsd:element name="module"
179                   type="javaee:moduleType"
180                   maxOccurs="unbounded">
181        <xsd:annotation>
182          <xsd:documentation>
183
184            The application deployment descriptor must have one
185            module element for each Java EE module in the
186            application package. A module element is defined
187            by moduleType definition.
188
189          </xsd:documentation>
190        </xsd:annotation>
191      </xsd:element>
192      <xsd:element name="security-role"
193                   type="javaee:security-roleType"
194                   minOccurs="0"
195                   maxOccurs="unbounded"/>
196      <xsd:element name="library-directory"
197                   type="javaee:pathType"
198                   minOccurs="0"
199                   maxOccurs="1">
200        <xsd:annotation>
201          <xsd:documentation>
202
203            The library-directory element specifies the pathname
204            of a directory within the application package, relative
205            to the top level of the application package.  All files
206            named "*.jar" in this directory must be made available
207            in the class path of all components included in this
208            application package.  If this element isn't specified,
209            the directory named "lib" is searched.  An empty element
210            may be used to disable searching.
211
212          </xsd:documentation>
213        </xsd:annotation>
214      </xsd:element>
215      <xsd:element name="env-entry"
216                   type="javaee:env-entryType"
217                   minOccurs="0"
218                   maxOccurs="unbounded"/>
219      <xsd:element name="ejb-ref"
220                   type="javaee:ejb-refType"
221                   minOccurs="0"
222                   maxOccurs="unbounded"/>
223      <xsd:element name="ejb-local-ref"
224                   type="javaee:ejb-local-refType"
225                   minOccurs="0"
226                   maxOccurs="unbounded"/>
227      <xsd:group ref="javaee:service-refGroup"/>
228      <xsd:element name="resource-ref"
229                   type="javaee:resource-refType"
230                   minOccurs="0"
231                   maxOccurs="unbounded"/>
232      <xsd:element name="resource-env-ref"
233                   type="javaee:resource-env-refType"
234                   minOccurs="0"
235                   maxOccurs="unbounded"/>
236      <xsd:element name="message-destination-ref"
237                   type="javaee:message-destination-refType"
238                   minOccurs="0"
239                   maxOccurs="unbounded"/>
240      <xsd:element name="persistence-context-ref"
241                   type="javaee:persistence-context-refType"
242                   minOccurs="0"
243                   maxOccurs="unbounded"/>
244      <xsd:element name="persistence-unit-ref"
245                   type="javaee:persistence-unit-refType"
246                   minOccurs="0"
247                   maxOccurs="unbounded"/>
248      <xsd:element name="message-destination"
249                   type="javaee:message-destinationType"
250                   minOccurs="0"
251                   maxOccurs="unbounded"/>
252      <xsd:element name="data-source"
253                   type="javaee:data-sourceType"
254                   minOccurs="0"
255                   maxOccurs="unbounded"/>
256    </xsd:sequence>
257    <xsd:attribute name="version"
258                   type="javaee:dewey-versionType"
259                   fixed="6"
260                   use="required">
261      <xsd:annotation>
262        <xsd:documentation>
263
264          The required value for the version is 6.
265
266        </xsd:documentation>
267      </xsd:annotation>
268    </xsd:attribute>
269    <xsd:attribute name="id"
270                   type="xsd:ID"/>
271  </xsd:complexType>
272
273
274<!-- **************************************************** -->
275
276  <xsd:complexType name="moduleType">
277    <xsd:annotation>
278      <xsd:documentation>
279
280        The moduleType defines a single Java EE module and contains a
281        connector, ejb, java, or web element, which indicates the
282        module type and contains a path to the module file, and an
283        optional alt-dd element, which specifies an optional URI to
284        the post-assembly version of the deployment descriptor.
285
286      </xsd:documentation>
287    </xsd:annotation>
288    <xsd:sequence>
289      <xsd:choice>
290        <xsd:element name="connector"
291                     type="javaee:pathType">
292          <xsd:annotation>
293            <xsd:documentation>
294
295              The connector element specifies the URI of a
296              resource adapter archive file, relative to the
297              top level of the application package.
298
299            </xsd:documentation>
300          </xsd:annotation>
301        </xsd:element>
302        <xsd:element name="ejb"
303                     type="javaee:pathType">
304          <xsd:annotation>
305            <xsd:documentation>
306
307              The ejb element specifies the URI of an ejb-jar,
308              relative to the top level of the application
309              package.
310
311            </xsd:documentation>
312          </xsd:annotation>
313        </xsd:element>
314        <xsd:element name="java"
315                     type="javaee:pathType">
316          <xsd:annotation>
317            <xsd:documentation>
318
319              The java element specifies the URI of a java
320              application client module, relative to the top
321              level of the application package.
322
323            </xsd:documentation>
324          </xsd:annotation>
325        </xsd:element>
326        <xsd:element name="web"
327                     type="javaee:webType"/>
328      </xsd:choice>
329      <xsd:element name="alt-dd"
330                   type="javaee:pathType"
331                   minOccurs="0">
332        <xsd:annotation>
333          <xsd:documentation>
334
335            The alt-dd element specifies an optional URI to the
336            post-assembly version of the deployment descriptor
337            file for a particular Java EE module.  The URI must
338            specify the full pathname of the deployment
339            descriptor file relative to the application's root
340            directory. If alt-dd is not specified, the deployer
341            must read the deployment descriptor from the default
342            location and file name required by the respective
343            component specification.
344
345          </xsd:documentation>
346        </xsd:annotation>
347      </xsd:element>
348    </xsd:sequence>
349    <xsd:attribute name="id"
350                   type="xsd:ID"/>
351  </xsd:complexType>
352
353
354<!-- **************************************************** -->
355
356  <xsd:complexType name="webType">
357    <xsd:annotation>
358      <xsd:documentation>
359
360        The webType defines the web-uri and context-root of
361        a web application module.
362
363      </xsd:documentation>
364    </xsd:annotation>
365    <xsd:sequence>
366      <xsd:element name="web-uri"
367                   type="javaee:pathType">
368        <xsd:annotation>
369          <xsd:documentation>
370
371            The web-uri element specifies the URI of a web
372            application file, relative to the top level of the
373            application package.
374
375          </xsd:documentation>
376        </xsd:annotation>
377      </xsd:element>
378      <xsd:element name="context-root"
379                   type="javaee:string">
380        <xsd:annotation>
381          <xsd:documentation>
382
383            The context-root element specifies the context root
384            of a web application.
385
386          </xsd:documentation>
387        </xsd:annotation>
388      </xsd:element>
389    </xsd:sequence>
390    <xsd:attribute name="id"
391                   type="xsd:ID"/>
392  </xsd:complexType>
393
394</xsd:schema>
395