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