[jboss-cvs] JBossAS SVN: r105327 - in projects/metadata/ear/trunk: src/main/java/org/jboss/metadata/ear/spec and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri May 28 04:10:59 EDT 2010


Author: alex.loubyansky at jboss.com
Date: 2010-05-28 04:10:58 -0400 (Fri, 28 May 2010)
New Revision: 105327

Added:
   projects/metadata/ear/trunk/src/main/java/org/jboss/metadata/ear/spec/Ear60MetaData.java
   projects/metadata/ear/trunk/src/main/java/org/jboss/metadata/ear/spec/Ear6xMetaData.java
   projects/metadata/ear/trunk/src/main/java/org/jboss/metadata/ear/spec/EarEnvironmentRefsGroupMetaData.java
   projects/metadata/ear/trunk/src/main/resources/schema/application_6.xsd
   projects/metadata/ear/trunk/src/test/java/org/jboss/test/metadata/ear/Ear6xEverythingUnitTestCase.java
   projects/metadata/ear/trunk/src/test/resources/org/jboss/test/metadata/ear/Ear6xEverything_testEverything.xml
Modified:
   projects/metadata/ear/trunk/pom.xml
   projects/metadata/ear/trunk/src/main/java/org/jboss/metadata/ear/spec/EarMetaData.java
   projects/metadata/ear/trunk/src/test/resources/schema2class.properties
Log:
JBMETA-285

Modified: projects/metadata/ear/trunk/pom.xml
===================================================================
--- projects/metadata/ear/trunk/pom.xml	2010-05-28 06:25:57 UTC (rev 105326)
+++ projects/metadata/ear/trunk/pom.xml	2010-05-28 08:10:58 UTC (rev 105327)
@@ -3,7 +3,7 @@
   <parent>
     <groupId>org.jboss</groupId>
     <artifactId>jboss-parent</artifactId>
-    <version>4.0.CR1</version>
+    <version>5</version>
   </parent>
   <groupId>org.jboss.metadata</groupId>
   <artifactId>jboss-metadata-ear</artifactId>
@@ -120,6 +120,13 @@
       <scope>test</scope>
     </dependency>
 
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-log4j</artifactId>
+      <version>2.2.0.CR1</version>
+      <scope>test</scope>
+    </dependency>
+
   </dependencies>
 
 </project>

Added: projects/metadata/ear/trunk/src/main/java/org/jboss/metadata/ear/spec/Ear60MetaData.java
===================================================================
--- projects/metadata/ear/trunk/src/main/java/org/jboss/metadata/ear/spec/Ear60MetaData.java	                        (rev 0)
+++ projects/metadata/ear/trunk/src/main/java/org/jboss/metadata/ear/spec/Ear60MetaData.java	2010-05-28 08:10:58 UTC (rev 105327)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.metadata.ear.spec;
+
+import javax.xml.bind.annotation.XmlNs;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.metadata.javaee.spec.JavaEEMetaDataConstants;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision: 76701 $
+ */
+ at XmlRootElement(name="application", namespace=JavaEEMetaDataConstants.JAVAEE_NS)
+ at JBossXmlSchema(
+      xmlns={@XmlNs(namespaceURI = JavaEEMetaDataConstants.JAVAEE_NS, prefix = "jee")},
+      ignoreUnresolvedFieldOrClass=false,
+      namespace=JavaEEMetaDataConstants.JAVAEE_NS,
+      elementFormDefault=XmlNsForm.QUALIFIED,
+      normalizeSpace=true)
+ at XmlType(name="applicationType",
+      namespace=JavaEEMetaDataConstants.JAVAEE_NS,
+      propOrder={"applicationName", "descriptionGroup", "initializeInOrder", "modules", "securityRoles", "libraryDirectory",
+      "earEnvironmentRefsGroup"})
+public class Ear60MetaData extends Ear6xMetaData
+{
+   private static final long serialVersionUID = 1;
+
+}

Added: projects/metadata/ear/trunk/src/main/java/org/jboss/metadata/ear/spec/Ear6xMetaData.java
===================================================================
--- projects/metadata/ear/trunk/src/main/java/org/jboss/metadata/ear/spec/Ear6xMetaData.java	                        (rev 0)
+++ projects/metadata/ear/trunk/src/main/java/org/jboss/metadata/ear/spec/Ear6xMetaData.java	2010-05-28 08:10:58 UTC (rev 105327)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.metadata.ear.spec;
+
+/**
+ * javaee 6.x ear metadata
+ * 
+ * @author alex at jboss.org
+ * @version $Revision: 65904 $
+ */
+public class Ear6xMetaData extends Ear5xMetaData
+{
+   private static final long serialVersionUID = 1;
+
+   private String applicationName;
+   private boolean initializeInOrder;
+   private EarEnvironmentRefsGroupMetaData earEnv;
+   
+   @Override
+   public boolean isEE6()
+   {
+      return true;
+   }
+   
+   public String getApplicationName()
+   {
+      return applicationName;
+   }
+
+   public void setApplicationName(String applicationName)
+   {
+      this.applicationName = applicationName;
+   }
+
+   /**
+    * If initialize-in-order is true, modules must be initialized
+    * in the order they're listed in this deployment descriptor,
+    * with the exception of application client modules, which can
+    * be initialized in any order.
+    * If initialize-in-order is not set or set to false, the order
+    * of initialization is unspecified and may be product-dependent.
+    */
+   public boolean getInitializeInOrder()
+   {
+      return initializeInOrder;
+   }
+
+   public void setInitializeInOrder(boolean initializeInOrder)
+   {
+      this.initializeInOrder = initializeInOrder;
+   }
+
+   /**
+    * Get the jndiEnvironmentRefsGroup.
+    * 
+    * @return the jndiEnvironmentRefsGroup.
+    */
+   public EarEnvironmentRefsGroupMetaData getEarEnvironmentRefsGroup()
+   {
+      return earEnv;
+   }
+   
+   // just for XML binding, to expose the type of the model group
+   public void setEarEnvironmentRefsGroup(EarEnvironmentRefsGroupMetaData env)
+   {
+      this.earEnv = env;
+   }
+}

Added: projects/metadata/ear/trunk/src/main/java/org/jboss/metadata/ear/spec/EarEnvironmentRefsGroupMetaData.java
===================================================================
--- projects/metadata/ear/trunk/src/main/java/org/jboss/metadata/ear/spec/EarEnvironmentRefsGroupMetaData.java	                        (rev 0)
+++ projects/metadata/ear/trunk/src/main/java/org/jboss/metadata/ear/spec/EarEnvironmentRefsGroupMetaData.java	2010-05-28 08:10:58 UTC (rev 105327)
@@ -0,0 +1,37 @@
+package org.jboss.metadata.ear.spec;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.spec.EnvironmentRefsGroupMetaData;
+import org.jboss.metadata.javaee.spec.MessageDestinationsMetaData;
+import org.jboss.xb.annotations.JBossXmlModelGroup;
+
+/**
+ * A EarEnvironmentRefsGroupMetaData.
+ * 
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+ at JBossXmlModelGroup(name="earJndiEnvironmentRefsGroup",
+      propOrder={"environmentEntries", "ejbReferences", "ejbLocalReferences",
+      "serviceReferences", "resourceReferences", "resourceEnvironmentReferences",
+      "messageDestinationReferences", "persistenceContextRefs", "persistenceUnitRefs",
+      "messageDestinations", "dataSources"})
+public class EarEnvironmentRefsGroupMetaData extends EnvironmentRefsGroupMetaData
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 8714123546582134095L;
+
+   private MessageDestinationsMetaData messageDestinations;
+   
+   @XmlElement(name="message-destination")
+   public MessageDestinationsMetaData getMessageDestinations()
+   {
+      return messageDestinations;
+   }
+   
+   public void setMessageDestinations(MessageDestinationsMetaData messageDestinations)
+   {
+      this.messageDestinations = messageDestinations;
+   }
+}

Modified: projects/metadata/ear/trunk/src/main/java/org/jboss/metadata/ear/spec/EarMetaData.java
===================================================================
--- projects/metadata/ear/trunk/src/main/java/org/jboss/metadata/ear/spec/EarMetaData.java	2010-05-28 06:25:57 UTC (rev 105326)
+++ projects/metadata/ear/trunk/src/main/java/org/jboss/metadata/ear/spec/EarMetaData.java	2010-05-28 08:10:58 UTC (rev 105327)
@@ -85,6 +85,15 @@
    }
 
    /**
+    * Is this a javaee 6 version application
+    * @return true if this is a javaee 6 version application
+    */
+   public boolean isEE6()
+   {
+      return false;
+   }
+
+   /**
     * Is this a javaee 5 version application
     * @return true if this is a javaee 5 version application
     */
@@ -133,7 +142,6 @@
       this.version = version;
    }
 
-
    /**
     * Get the application module information
     * @return the list of application modules

Added: projects/metadata/ear/trunk/src/main/resources/schema/application_6.xsd
===================================================================
--- projects/metadata/ear/trunk/src/main/resources/schema/application_6.xsd	                        (rev 0)
+++ projects/metadata/ear/trunk/src/main/resources/schema/application_6.xsd	2010-05-28 08:10:58 UTC (rev 105327)
@@ -0,0 +1,394 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
+            targetNamespace="http://java.sun.com/xml/ns/javaee"
+            xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+            elementFormDefault="qualified"
+            attributeFormDefault="unqualified"
+            version="6">
+  <xsd:annotation>
+    <xsd:documentation>
+
+      DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+      
+      Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved.
+      
+      The contents of this file are subject to the terms of either the
+      GNU General Public License Version 2 only ("GPL") or the Common
+      Development and Distribution License("CDDL") (collectively, the
+      "License").  You may not use this file except in compliance with
+      the License. You can obtain a copy of the License at
+      https://glassfish.dev.java.net/public/CDDL+GPL.html or
+      glassfish/bootstrap/legal/LICENSE.txt.  See the License for the
+      specific language governing permissions and limitations under the
+      License.
+      
+      When distributing the software, include this License Header
+      Notice in each file and include the License file at
+      glassfish/bootstrap/legal/LICENSE.txt.  Sun designates this
+      particular file as subject to the "Classpath" exception as
+      provided by Sun in the GPL Version 2 section of the License file
+      that accompanied this code.  If applicable, add the following
+      below the License Header, with the fields enclosed by brackets []
+      replaced by your own identifying information:
+      "Portions Copyrighted [year] [name of copyright owner]"
+      
+      Contributor(s):
+      
+      If you wish your version of this file to be governed by only the
+      CDDL or only the GPL Version 2, indicate your decision by adding
+      "[Contributor] elects to include this software in this
+      distribution under the [CDDL or GPL Version 2] license."  If you
+      don't indicate a single choice of license, a recipient has the
+      option to distribute your version of this file under either the
+      CDDL, the GPL Version 2 or to extend the choice of license to its
+      licensees as provided above.  However, if you add GPL Version 2
+      code and therefore, elected the GPL Version 2 license, then the
+      option applies only if the new code is made subject to such
+      option by the copyright holder.
+      
+    </xsd:documentation>
+  </xsd:annotation>
+
+  <xsd:annotation>
+    <xsd:documentation>
+      <![CDATA[[
+      This is the XML Schema for the application 6 deployment
+      descriptor.  The deployment descriptor must be named
+      "META-INF/application.xml" in the application's ear file.
+      All application deployment descriptors must indicate
+      the application schema by using the Java EE namespace:
+      
+      http://java.sun.com/xml/ns/javaee
+      
+      and indicate the version of the schema by
+      using the version element as shown below:
+      
+      <application xmlns="http://java.sun.com/xml/ns/javaee"
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
+      	http://java.sun.com/xml/ns/javaee/application_6.xsd"
+      version="6">
+      ...
+      </application>
+      
+      The instance documents may indicate the published version of
+      the schema using the xsi:schemaLocation attribute for Java EE
+      namespace with the following location:
+      
+      http://java.sun.com/xml/ns/javaee/application_6.xsd
+      
+      ]]>
+    </xsd:documentation>
+  </xsd:annotation>
+
+  <xsd:annotation>
+    <xsd:documentation>
+
+      The following conventions apply to all Java EE
+      deployment descriptor elements unless indicated otherwise.
+      
+      - In elements that specify a pathname to a file within the
+      same JAR file, relative filenames (i.e., those not
+      starting with "/") are considered relative to the root of
+      the JAR file's namespace.  Absolute filenames (i.e., those
+      starting with "/") also specify names in the root of the
+      JAR file's namespace.  In general, relative names are
+      preferred.  The exception is .war files where absolute
+      names are preferred for consistency with the Servlet API.
+      
+    </xsd:documentation>
+  </xsd:annotation>
+
+  <xsd:include schemaLocation="javaee_6.xsd"/>
+
+
+<!-- **************************************************** -->
+
+  <xsd:element name="application"
+               type="javaee:applicationType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+        The application element is the root element of a Java EE
+        application deployment descriptor.
+        
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:unique name="context-root-uniqueness">
+      <xsd:annotation>
+        <xsd:documentation>
+
+          The context-root element content must be unique
+          in the ear. 
+          
+        </xsd:documentation>
+      </xsd:annotation>
+      <xsd:selector xpath="javaee:module/javaee:web"/>
+      <xsd:field xpath="javaee:context-root"/>
+    </xsd:unique>
+    <xsd:unique name="security-role-uniqueness">
+      <xsd:annotation>
+        <xsd:documentation>
+
+          The security-role-name element content
+          must be unique in the ear.  
+          
+        </xsd:documentation>
+      </xsd:annotation>
+      <xsd:selector xpath="javaee:security-role"/>
+      <xsd:field xpath="javaee:role-name"/>
+    </xsd:unique>
+  </xsd:element>
+
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="applicationType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+        The applicationType defines the structure of the
+        application. 
+        
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:sequence>
+      <xsd:element name="application-name"
+                   type="javaee:string"
+                   minOccurs="0"/>
+      <xsd:group ref="javaee:descriptionGroup"/>
+      <xsd:element name="initialize-in-order"
+                   type="javaee:generic-booleanType"
+                   minOccurs="0"
+                   maxOccurs="1">
+        <xsd:annotation>
+          <xsd:documentation>
+
+            If initialize-in-order is true, modules must be initialized
+            in the order they're listed in this deployment descriptor,
+            with the exception of application client modules, which can
+            be initialized in any order.
+            If initialize-in-order is not set or set to false, the order
+            of initialization is unspecified and may be product-dependent.
+            
+          </xsd:documentation>
+        </xsd:annotation>
+      </xsd:element>
+      <xsd:element name="module"
+                   type="javaee:moduleType"
+                   maxOccurs="unbounded">
+        <xsd:annotation>
+          <xsd:documentation>
+
+            The application deployment descriptor must have one
+            module element for each Java EE module in the
+            application package. A module element is defined 
+            by moduleType definition. 
+            
+          </xsd:documentation>
+        </xsd:annotation>
+      </xsd:element>
+      <xsd:element name="security-role"
+                   type="javaee:security-roleType"
+                   minOccurs="0"
+                   maxOccurs="unbounded"/>
+      <xsd:element name="library-directory"
+                   type="javaee:pathType"
+                   minOccurs="0"
+                   maxOccurs="1">
+        <xsd:annotation>
+          <xsd:documentation>
+
+            The library-directory element specifies the pathname
+            of a directory within the application package, relative
+            to the top level of the application package.  All files
+            named "*.jar" in this directory must be made available
+            in the class path of all components included in this
+            application package.  If this element isn't specified,
+            the directory named "lib" is searched.  An empty element
+            may be used to disable searching.
+            
+          </xsd:documentation>
+        </xsd:annotation>
+      </xsd:element>
+      <xsd:element name="env-entry"
+                   type="javaee:env-entryType"
+                   minOccurs="0"
+                   maxOccurs="unbounded"/>
+      <xsd:element name="ejb-ref"
+                   type="javaee:ejb-refType"
+                   minOccurs="0"
+                   maxOccurs="unbounded"/>
+      <xsd:element name="ejb-local-ref"
+                   type="javaee:ejb-local-refType"
+                   minOccurs="0"
+                   maxOccurs="unbounded"/>
+      <xsd:group ref="javaee:service-refGroup"/>
+      <xsd:element name="resource-ref"
+                   type="javaee:resource-refType"
+                   minOccurs="0"
+                   maxOccurs="unbounded"/>
+      <xsd:element name="resource-env-ref"
+                   type="javaee:resource-env-refType"
+                   minOccurs="0"
+                   maxOccurs="unbounded"/>
+      <xsd:element name="message-destination-ref"
+                   type="javaee:message-destination-refType"
+                   minOccurs="0"
+                   maxOccurs="unbounded"/>
+      <xsd:element name="persistence-context-ref"
+                   type="javaee:persistence-context-refType"
+                   minOccurs="0"
+                   maxOccurs="unbounded"/>
+      <xsd:element name="persistence-unit-ref"
+                   type="javaee:persistence-unit-refType"
+                   minOccurs="0"
+                   maxOccurs="unbounded"/>
+      <xsd:element name="message-destination"
+                   type="javaee:message-destinationType"
+                   minOccurs="0"
+                   maxOccurs="unbounded"/>
+      <xsd:element name="data-source"
+                   type="javaee:data-sourceType"
+                   minOccurs="0"
+                   maxOccurs="unbounded"/>
+    </xsd:sequence>
+    <xsd:attribute name="version"
+                   type="javaee:dewey-versionType"
+                   fixed="6"
+                   use="required">
+      <xsd:annotation>
+        <xsd:documentation>
+
+          The required value for the version is 6.
+          
+        </xsd:documentation>
+      </xsd:annotation>
+    </xsd:attribute>
+    <xsd:attribute name="id"
+                   type="xsd:ID"/>
+  </xsd:complexType>
+
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="moduleType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+        The moduleType defines a single Java EE module and contains a
+        connector, ejb, java, or web element, which indicates the
+        module type and contains a path to the module file, and an
+        optional alt-dd element, which specifies an optional URI to
+        the post-assembly version of the deployment descriptor.
+        
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:sequence>
+      <xsd:choice>
+        <xsd:element name="connector"
+                     type="javaee:pathType">
+          <xsd:annotation>
+            <xsd:documentation>
+
+              The connector element specifies the URI of a
+              resource adapter archive file, relative to the
+              top level of the application package.
+              
+            </xsd:documentation>
+          </xsd:annotation>
+        </xsd:element>
+        <xsd:element name="ejb"
+                     type="javaee:pathType">
+          <xsd:annotation>
+            <xsd:documentation>
+
+              The ejb element specifies the URI of an ejb-jar,
+              relative to the top level of the application
+              package.
+              
+            </xsd:documentation>
+          </xsd:annotation>
+        </xsd:element>
+        <xsd:element name="java"
+                     type="javaee:pathType">
+          <xsd:annotation>
+            <xsd:documentation>
+
+              The java element specifies the URI of a java
+              application client module, relative to the top
+              level of the application package.
+              
+            </xsd:documentation>
+          </xsd:annotation>
+        </xsd:element>
+        <xsd:element name="web"
+                     type="javaee:webType"/>
+      </xsd:choice>
+      <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>
+    </xsd:sequence>
+    <xsd:attribute name="id"
+                   type="xsd:ID"/>
+  </xsd:complexType>
+
+
+<!-- **************************************************** -->
+
+  <xsd:complexType name="webType">
+    <xsd:annotation>
+      <xsd:documentation>
+
+        The webType defines the web-uri and context-root of
+        a web application module.
+        
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:sequence>
+      <xsd:element name="web-uri"
+                   type="javaee:pathType">
+        <xsd:annotation>
+          <xsd:documentation>
+
+            The web-uri element specifies the URI of a web
+            application file, relative to the top level of the
+            application package.
+            
+          </xsd:documentation>
+        </xsd:annotation>
+      </xsd:element>
+      <xsd:element name="context-root"
+                   type="javaee:string">
+        <xsd:annotation>
+          <xsd:documentation>
+
+            The context-root element specifies the context root
+            of a web application.
+            
+          </xsd:documentation>
+        </xsd:annotation>
+      </xsd:element>
+    </xsd:sequence>
+    <xsd:attribute name="id"
+                   type="xsd:ID"/>
+  </xsd:complexType>
+
+</xsd:schema>

Added: projects/metadata/ear/trunk/src/test/java/org/jboss/test/metadata/ear/Ear6xEverythingUnitTestCase.java
===================================================================
--- projects/metadata/ear/trunk/src/test/java/org/jboss/test/metadata/ear/Ear6xEverythingUnitTestCase.java	                        (rev 0)
+++ projects/metadata/ear/trunk/src/test/java/org/jboss/test/metadata/ear/Ear6xEverythingUnitTestCase.java	2010-05-28 08:10:58 UTC (rev 105327)
@@ -0,0 +1,510 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.metadata.ear;
+
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.persistence.PersistenceContextType;
+
+import junit.framework.Test;
+
+import org.jboss.annotation.javaee.Description;
+import org.jboss.annotation.javaee.Descriptions;
+import org.jboss.annotation.javaee.DisplayName;
+import org.jboss.annotation.javaee.DisplayNames;
+import org.jboss.annotation.javaee.Icon;
+import org.jboss.annotation.javaee.Icons;
+import org.jboss.metadata.ear.spec.ConnectorModuleMetaData;
+import org.jboss.metadata.ear.spec.Ear60MetaData;
+import org.jboss.metadata.ear.spec.Ear6xMetaData;
+import org.jboss.metadata.ear.spec.EarEnvironmentRefsGroupMetaData;
+import org.jboss.metadata.ear.spec.EjbModuleMetaData;
+import org.jboss.metadata.ear.spec.JavaModuleMetaData;
+import org.jboss.metadata.ear.spec.ModuleMetaData;
+import org.jboss.metadata.ear.spec.ModulesMetaData;
+import org.jboss.metadata.ear.spec.WebModuleMetaData;
+import org.jboss.metadata.javaee.spec.DataSourceMetaData;
+import org.jboss.metadata.javaee.spec.DataSourcesMetaData;
+import org.jboss.metadata.javaee.spec.DescriptionGroupMetaData;
+import org.jboss.metadata.javaee.spec.DescriptionImpl;
+import org.jboss.metadata.javaee.spec.DisplayNameImpl;
+import org.jboss.metadata.javaee.spec.EJBLocalReferenceMetaData;
+import org.jboss.metadata.javaee.spec.EJBLocalReferencesMetaData;
+import org.jboss.metadata.javaee.spec.EJBReferenceMetaData;
+import org.jboss.metadata.javaee.spec.EJBReferenceType;
+import org.jboss.metadata.javaee.spec.EJBReferencesMetaData;
+import org.jboss.metadata.javaee.spec.EnvironmentEntriesMetaData;
+import org.jboss.metadata.javaee.spec.EnvironmentEntryMetaData;
+import org.jboss.metadata.javaee.spec.IconImpl;
+import org.jboss.metadata.javaee.spec.IsolationLevelType;
+import org.jboss.metadata.javaee.spec.MessageDestinationMetaData;
+import org.jboss.metadata.javaee.spec.MessageDestinationReferenceMetaData;
+import org.jboss.metadata.javaee.spec.MessageDestinationReferencesMetaData;
+import org.jboss.metadata.javaee.spec.MessageDestinationUsageType;
+import org.jboss.metadata.javaee.spec.MessageDestinationsMetaData;
+import org.jboss.metadata.javaee.spec.PersistenceContextReferenceMetaData;
+import org.jboss.metadata.javaee.spec.PersistenceContextReferencesMetaData;
+import org.jboss.metadata.javaee.spec.PersistenceUnitReferenceMetaData;
+import org.jboss.metadata.javaee.spec.PersistenceUnitReferencesMetaData;
+import org.jboss.metadata.javaee.spec.PropertiesMetaData;
+import org.jboss.metadata.javaee.spec.PropertyMetaData;
+import org.jboss.metadata.javaee.spec.ResourceAuthorityType;
+import org.jboss.metadata.javaee.spec.ResourceEnvironmentReferenceMetaData;
+import org.jboss.metadata.javaee.spec.ResourceEnvironmentReferencesMetaData;
+import org.jboss.metadata.javaee.spec.ResourceInjectionTargetMetaData;
+import org.jboss.metadata.javaee.spec.ResourceReferenceMetaData;
+import org.jboss.metadata.javaee.spec.ResourceReferencesMetaData;
+import org.jboss.metadata.javaee.spec.ResourceSharingScopeType;
+import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
+import org.jboss.metadata.javaee.spec.SecurityRoleMetaData;
+import org.jboss.metadata.javaee.spec.ServiceReferenceMetaData;
+import org.jboss.metadata.javaee.spec.ServiceReferencesMetaData;
+import org.jboss.test.metadata.javaee.AbstractJavaEEMetaDataTest;
+
+/**
+ * Ear6x tests
+ * 
+ * @author alex at jboss.org
+ * @version $Revision: 88255 $
+ */
+public class Ear6xEverythingUnitTestCase extends AbstractJavaEEMetaDataTest
+{
+   public static Test suite()
+   {
+      return suite(Ear6xEverythingUnitTestCase.class);
+   }
+   
+   public Ear6xEverythingUnitTestCase(String name)
+   {
+      super(name);
+   }
+   
+   protected Ear6xMetaData unmarshal() throws Exception
+   {
+      return unmarshal(Ear60MetaData.class);
+   }
+
+   public void testEverything() throws Exception
+   {
+      //enableTrace("org.jboss.xb");
+      Ear6xMetaData result = unmarshal();
+      assertEquals("application-test-everything", result.getId());
+      assertEquals("6", result.getVersion());
+      assertEquals("Application name", result.getApplicationName());
+      assertDescriptions(result);
+      assertDisplayName(result);
+      assertIcon(result);
+      assertSecurityRoles(result);
+      assertLibraryDirectory(result);
+      assertModules(result);
+      assertTrue(result.getInitializeInOrder());
+      
+      EarEnvironmentRefsGroupMetaData earEnv = result.getEarEnvironmentRefsGroup();
+      assertNotNull(earEnv);
+
+      String prefix = "session1";
+
+      EnvironmentEntriesMetaData entries = earEnv.getEnvironmentEntries();
+      assertNotNull(entries);
+      assertEquals(2, entries.size());
+      int i = 1;
+      for(EnvironmentEntryMetaData entry : entries)
+      {
+         assertNotNull(entry);
+         String entryPrefix = prefix + "EnvEntry" + i;
+         assertEquals(entryPrefix + "-id", entry.getId());
+         assertDescriptions(entryPrefix, entry.getDescriptions());
+         assertEquals(entryPrefix + "Name", entry.getEnvEntryName());
+         assertEquals("java.lang.String", entry.getType());
+         assertEquals(entryPrefix + "Value", entry.getValue());
+         assertEquals(entryPrefix + "MappedName", entry.getMappedName());
+         assertInjectionTargets(entryPrefix, entry.getInjectionTargets());
+         ++i;
+      }
+      
+      EJBReferencesMetaData ejbRefs = earEnv.getEjbReferences();
+      assertNotNull(ejbRefs);
+      assertEquals(2, ejbRefs.size());
+      i = 1;
+      for(EJBReferenceMetaData ejbRef : ejbRefs)
+      {
+         assertNotNull(ejbRef);
+         String ejbRefPrefix = prefix + "EjbRef" + i;
+         assertEquals(ejbRefPrefix + "-id", ejbRef.getId());
+         assertDescriptions(ejbRefPrefix, ejbRef.getDescriptions());
+         assertInjectionTargets(ejbRefPrefix, ejbRef.getInjectionTargets());
+         assertEquals(ejbRefPrefix + "Name", ejbRef.getEjbRefName());
+         EJBReferenceType type = i % 2 == 0 ? EJBReferenceType.Entity : EJBReferenceType.Session;
+         assertEquals(type, ejbRef.getEjbRefType());
+         assertEquals(ejbRefPrefix + "Home", ejbRef.getHome());
+         assertEquals(ejbRefPrefix + "Remote", ejbRef.getRemote());
+         assertEquals(ejbRefPrefix + "EjbLink", ejbRef.getLink());
+         assertEquals(ejbRefPrefix + "MappedName", ejbRef.getMappedName());
+         ++i;
+      }
+
+      EJBLocalReferencesMetaData ejbLocalRefs = earEnv.getEjbLocalReferences();
+      assertNotNull(ejbLocalRefs);
+      assertEquals(2, ejbLocalRefs.size());
+      i = 1;
+      for(EJBLocalReferenceMetaData ejbRef : ejbLocalRefs)
+      {
+         assertNotNull(ejbRef);
+         String ejbRefPrefix = prefix + "EjbLocalRef" + i;
+         assertEquals(ejbRefPrefix + "-id", ejbRef.getId());
+         assertDescriptions(ejbRefPrefix, ejbRef.getDescriptions());
+         assertInjectionTargets(ejbRefPrefix, ejbRef.getInjectionTargets());
+         assertEquals(ejbRefPrefix + "Name", ejbRef.getEjbRefName());
+         EJBReferenceType type = i % 2 == 0 ? EJBReferenceType.Entity : EJBReferenceType.Session;
+         assertEquals(type, ejbRef.getEjbRefType());
+         assertEquals(ejbRefPrefix + "LocalHome", ejbRef.getLocalHome());
+         assertEquals(ejbRefPrefix + "Local", ejbRef.getLocal());
+         assertEquals(ejbRefPrefix + "EjbLink", ejbRef.getLink());
+         assertEquals(ejbRefPrefix + "MappedName", ejbRef.getMappedName());
+         ++i;
+      }
+
+      ServiceReferencesMetaData serviceRefs = earEnv.getServiceReferences();
+      assertNotNull(serviceRefs);
+      assertEquals(2, serviceRefs.size());
+      i = 1;
+      for(ServiceReferenceMetaData sr : serviceRefs)
+      {
+         assertNotNull(sr);
+         String srPrefix = prefix + "ServiceRef" + i;
+         assertEquals(srPrefix + "-id", sr.getId());
+         assertDescriptions(srPrefix, sr.getDescriptionGroup().getDescriptions());
+         assertEquals(srPrefix + "Name", sr.getServiceRefName());
+         assertEquals(srPrefix + "Iface", sr.getServiceInterface());
+         ++i;
+      }
+
+      ResourceReferencesMetaData resourceRefs = earEnv.getResourceReferences();
+      assertNotNull(resourceRefs);
+      assertEquals(2, resourceRefs.size());
+      i = 1;
+      for(ResourceReferenceMetaData rr : resourceRefs)
+      {
+         assertNotNull(rr);
+         String rrPrefix = prefix + "ResourceRef" + i;
+         assertEquals(rrPrefix + "-id", rr.getId());
+         assertDescriptions(rrPrefix, rr.getDescriptions());
+         assertEquals(rrPrefix + "Name", rr.getResourceRefName());
+         assertEquals(rrPrefix + "Type", rr.getType());
+         ResourceAuthorityType type = i % 2 == 0 ? ResourceAuthorityType.Container : ResourceAuthorityType.Application;
+         assertEquals(type, rr.getResAuth());
+         ResourceSharingScopeType sharing = i % 2 == 0 ? ResourceSharingScopeType.Unshareable : ResourceSharingScopeType.Shareable;
+         assertEquals(sharing, rr.getResSharingScope());
+         assertEquals(rrPrefix + "MappedName", rr.getMappedName());
+         ++i;
+      }
+      
+      ResourceEnvironmentReferencesMetaData reRefs = earEnv.getResourceEnvironmentReferences();
+      assertNotNull(reRefs);
+      assertEquals(2, reRefs.size());
+      i = 1;
+      for(ResourceEnvironmentReferenceMetaData rer : reRefs)
+      {
+         assertNotNull(rer);
+         String rerPrefix = prefix + "ResourceEnvRef" + i;
+         assertEquals(rerPrefix + "-id", rer.getId());
+         assertDescriptions(rerPrefix, rer.getDescriptions());
+         assertInjectionTargets(rerPrefix, rer.getInjectionTargets());
+         assertEquals(rerPrefix + "Name", rer.getResourceEnvRefName());
+         assertEquals(rerPrefix + "Type", rer.getType());
+         assertEquals(rerPrefix + "MappedName", rer.getMappedName());
+         ++i;
+      }
+      
+      MessageDestinationReferencesMetaData mdRefs = earEnv.getMessageDestinationReferences();
+      assertNotNull(mdRefs);
+      assertEquals(2, mdRefs.size());
+      i = 1;
+      for(MessageDestinationReferenceMetaData mdr : mdRefs)
+      {
+         assertNotNull(mdr);
+         String mdrPrefix = prefix + "MessageDestinationRef" + i;
+         assertEquals(mdrPrefix + "-id", mdr.getId());
+         assertDescriptions(mdrPrefix, mdr.getDescriptions());
+         assertInjectionTargets(mdrPrefix, mdr.getInjectionTargets());
+         assertEquals(mdrPrefix + "Name", mdr.getMessageDestinationRefName());
+         assertEquals(mdrPrefix + "Type", mdr.getType());
+         MessageDestinationUsageType type = i % 2 == 0 ? MessageDestinationUsageType.Produces : MessageDestinationUsageType.Consumes;
+         assertEquals(type, mdr.getMessageDestinationUsage());
+         assertEquals(mdrPrefix + "Link", mdr.getLink());
+         ++i;
+      }
+      
+      PersistenceContextReferencesMetaData pcRefs = earEnv.getPersistenceContextRefs();
+      assertNotNull(pcRefs);
+      assertEquals(2, pcRefs.size());
+      i = 1;
+      for(PersistenceContextReferenceMetaData pcr : pcRefs)
+      {
+         assertNotNull(pcr);
+         String pcrPrefix = prefix + "PersistenceContextRef" + i;
+         assertEquals(pcrPrefix + "-id", pcr.getId());
+         assertDescriptions(pcrPrefix , pcr.getDescriptions());
+         assertInjectionTargets(pcrPrefix, pcr.getInjectionTargets());
+         assertEquals(pcrPrefix + "Name", pcr.getPersistenceContextRefName());
+         assertEquals(pcrPrefix + "Unit", pcr.getPersistenceUnitName());
+         PersistenceContextType type = i % 2 == 0 ? PersistenceContextType.EXTENDED : PersistenceContextType.TRANSACTION;
+         assertEquals(type, pcr.getPersistenceContextType());
+         assertEquals(pcrPrefix + "MappedName", pcr.getMappedName());
+         PropertiesMetaData props = pcr.getProperties();
+         assertProperties(pcrPrefix, props);
+         ++i;
+      }
+      
+      PersistenceUnitReferencesMetaData puRefs = earEnv.getPersistenceUnitRefs();
+      assertNotNull(puRefs);
+      assertEquals(2, puRefs.size());
+      i = 1;
+      for(PersistenceUnitReferenceMetaData pur : puRefs)
+      {
+         assertNotNull(pur);
+         String purPrefix = prefix + "PersistenceUnitRef" + i;
+         assertEquals(purPrefix + "-id", pur.getId());
+         assertDescriptions(purPrefix, pur.getDescriptions());
+         assertInjectionTargets(purPrefix, pur.getInjectionTargets());
+         assertEquals(purPrefix + "Name", pur.getPersistenceUnitRefName());
+         assertEquals(purPrefix + "Unit", pur.getPersistenceUnitName());
+         assertEquals(purPrefix + "MappedName", pur.getMappedName());
+         ++i;
+      }
+      
+      MessageDestinationsMetaData mds = earEnv.getMessageDestinations();
+      assertNotNull(mds);
+      assertEquals(2, mds.size());
+      i = 1;
+      for(MessageDestinationMetaData md : mds)
+      {
+         assertNotNull(md);
+         String mdPrefix = "messageDestination" + i;
+         assertEquals(mdPrefix + "-id", md.getId());
+         assertDescriptions(mdPrefix, md.getDescriptionGroup().getDescriptions());
+         assertEquals(mdPrefix + "Name", md.getMessageDestinationName());
+         assertEquals(mdPrefix + "MappedName", md.getMappedName());
+         assertEquals(mdPrefix + "LookupName", md.getLookupName());
+         ++i;
+      }
+      
+      DataSourcesMetaData dataSources = earEnv.getDataSources();
+      assertNotNull(dataSources);
+      assertEquals(2, dataSources.size());
+      i = 1;
+      for(DataSourceMetaData ds : dataSources)
+      {
+         assertNotNull(ds);
+         String dsPrefix = "dataSource" + i;
+         assertDescriptions(dsPrefix, ds.getDescriptions());
+         assertEquals(dsPrefix + "Name", ds.getName());
+         assertEquals(dsPrefix + "ClassName", ds.getClassName());
+         assertEquals(dsPrefix + "ServerName", ds.getServerName());
+         assertEquals(i, ds.getPortNumber());
+         assertEquals(dsPrefix + "DatabaseName", ds.getDatabaseName());
+         assertEquals("jdbc:" + dsPrefix + ":url", ds.getUrl());
+         assertEquals(dsPrefix + "User", ds.getUser());
+         assertEquals(dsPrefix + "Password", ds.getPassword());
+         assertProperties(dsPrefix, ds.getProperties());
+         assertEquals(i, ds.getLoginTimeout());
+         assertEquals(i % 2 == 0, ds.isTransactional());
+         assertEquals(i % 2 == 0 ? IsolationLevelType.TRANSACTION_READ_COMMITTED : IsolationLevelType.TRANSACTION_READ_UNCOMMITTED, ds.getIsolationLevel());
+         assertEquals(i, ds.getInitialPoolSize());
+         assertEquals(i, ds.getMaxPoolSize());
+         assertEquals(i, ds.getMinPoolSize());
+         assertEquals(i, ds.getMaxIdleTime());
+         assertEquals(i, ds.getMaxStatements());
+         ++i;
+      }
+   }
+
+   private void assertProperties(String prefix, PropertiesMetaData props)
+   {
+      assertNotNull(props);
+      int pi = 1;
+      for(PropertyMetaData prop : props)
+      {
+         assertNotNull(prop);
+         String propPrefix = prefix + "Property" + pi;
+         assertEquals(propPrefix + "-id", prop.getId());
+         assertEquals(propPrefix + "Name", prop.getName());
+         assertEquals(propPrefix + "Value", prop.getValue());
+         ++pi;
+      }
+   }
+
+   private void assertInjectionTargets(String prefix, Set<ResourceInjectionTargetMetaData> actual)
+   {
+      assertNotNull(actual);
+      assertEquals(2, actual.size());
+      Set<ResourceInjectionTargetMetaData> expectedIts = new HashSet<ResourceInjectionTargetMetaData>(2);
+      ResourceInjectionTargetMetaData it = new ResourceInjectionTargetMetaData();
+      it.setInjectionTargetClass(prefix + "Injection" + 1 + "Class");
+      it.setInjectionTargetName(prefix + "Injection" + 1 + "Name");
+      expectedIts.add(it);
+      it = new ResourceInjectionTargetMetaData();
+      it.setInjectionTargetClass(prefix + "Injection" + 2 + "Class");
+      it.setInjectionTargetName(prefix + "Injection" + 2 + "Name");
+      expectedIts.add(it);
+      assertEquals(expectedIts, actual);
+   }
+
+   private void assertDescriptions(String descrPrefix, Descriptions desc)
+   {
+      assertNotNull(desc);
+      Description[] descriptions = desc.value();
+      assertNotNull(descriptions);
+      assertEquals(3, descriptions.length);
+      for(int di = 0; di < descriptions.length; ++di)
+      {
+         Description d = descriptions[di];
+         assertNotNull(d);
+         assertEquals(d.language() + "-" + descrPrefix + "-desc", d.value());
+      }
+   }
+
+   protected void assertDescriptions(Ear6xMetaData ear)
+      throws Exception
+   {
+      DescriptionGroupMetaData group = ear.getDescriptionGroup();
+      assertNotNull(group);
+      Descriptions descriptions = group.getDescriptions();
+      assertNotNull(descriptions);
+      
+      DescriptionImpl den = new DescriptionImpl();
+      den.setDescription("en-ear-desc");
+      DescriptionImpl dfr = new DescriptionImpl();
+      dfr.setLanguage("fr");
+      dfr.setDescription("fr-ear-des");
+      DescriptionImpl dde = new DescriptionImpl();
+      dde.setLanguage("de");
+      dde.setDescription("de-ear-des");
+      Description[] expected = {den, dfr, dde};
+      assertEquals(expected, descriptions.value());
+   }
+   
+   protected void assertDisplayName(Ear6xMetaData ear)
+      throws Exception
+   {
+      DescriptionGroupMetaData group = ear.getDescriptionGroup();
+      assertNotNull(group);
+      DisplayNames displayNames = group.getDisplayNames();
+      assertNotNull(displayNames);
+      
+      DisplayNameImpl en = new DisplayNameImpl();
+      en.setDisplayName("en-ear-disp");
+      DisplayNameImpl fr = new DisplayNameImpl();
+      fr.setDisplayName("fr-ear-disp");
+      fr.setLanguage("fr");
+      DisplayNameImpl de = new DisplayNameImpl();
+      de.setDisplayName("de-ear-disp");
+      de.setLanguage("de");
+
+      DisplayName[] expected = {en, fr, de};
+      assertEquals(expected, displayNames.value());
+   }
+   
+   protected void assertIcon(Ear6xMetaData ear)
+      throws Exception
+   {
+      DescriptionGroupMetaData group = ear.getDescriptionGroup();
+      assertNotNull(group);
+      Icons icons = group.getIcons();
+      assertNotNull(icons);
+      
+      IconImpl en = new IconImpl();
+      en.setId("en-ear-icon-id");
+      en.setSmallIcon("en-ear-small-icon");
+      en.setLargeIcon("en-ear-large-icon");
+      IconImpl fr = new IconImpl();
+      fr.setLanguage("fr");
+      fr.setId("fr-ear-icon-id");
+      fr.setSmallIcon("fr-ear-small-icon");
+      fr.setLargeIcon("fr-ear-large-icon");
+      IconImpl de = new IconImpl();
+      de.setLanguage("de");
+      de.setId("de-ear-icon-id");
+      de.setSmallIcon("de-ear-small-icon");
+      de.setLargeIcon("de-ear-large-icon");
+      
+      Icon[] expected = {en, fr, de};
+      assertEquals(expected, icons.value());
+   }
+
+   protected void assertSecurityRoles(Ear6xMetaData ear)
+   {
+      SecurityRolesMetaData roles = ear.getSecurityRoles();
+      assertEquals("There are 2 roles", 2, roles.size());
+      SecurityRoleMetaData role0 = roles.get("role0");
+      assertEquals("security-role0", role0.getId());
+      assertEquals("role0", role0.getName());
+      assertEquals("The 0 security role", role0.getDescriptions().value()[0].value());
+      SecurityRoleMetaData role1 = roles.get("role1");
+      assertEquals("security-role1", role1.getId());
+      assertEquals("role1", role1.getName());
+      assertEquals("The 1 security role", role1.getDescriptions().value()[0].value());
+   }
+   protected void assertLibraryDirectory(Ear6xMetaData ear)
+   {
+      assertEquals("lib0", ear.getLibraryDirectory());
+   }
+   protected void assertModules(Ear6xMetaData ear)
+   {
+      ModulesMetaData modules = ear.getModules();
+      assertEquals(6, modules.size());
+      ModuleMetaData connector = modules.get(0);
+      assertEquals("connector0", connector.getId());
+      assertEquals("META-INF/alt-ra.xml", connector.getAlternativeDD());
+      ConnectorModuleMetaData connectorMD = (ConnectorModuleMetaData) connector.getValue();
+      assertEquals("rar0.rar", connectorMD.getConnector());
+      ModuleMetaData java = modules.get(1);
+      assertEquals("java0", java.getId());
+      assertEquals("META-INF/alt-application-client.xml", java.getAlternativeDD());
+      JavaModuleMetaData javaMD = (JavaModuleMetaData)java.getValue();
+      assertEquals("client0.jar", javaMD.getClientJar());
+      ModuleMetaData ejb0 = modules.get(2);
+      assertEquals("ejb0", ejb0.getId());
+      assertEquals("META-INF/alt-ejb-jar.xml", ejb0.getAlternativeDD());
+      EjbModuleMetaData ejb0MD = (EjbModuleMetaData)ejb0.getValue();
+      assertEquals("ejb-jar0.jar", ejb0MD.getEjbJar());
+      ModuleMetaData ejb1 = modules.get(3);
+      assertEquals("ejb1", ejb1.getId());
+      assertEquals("META-INF/alt-ejb-jar.xml", ejb1.getAlternativeDD());
+      EjbModuleMetaData ejb1MD = (EjbModuleMetaData)ejb1.getValue();
+      assertEquals("ejb-jar1.jar", ejb1MD.getEjbJar());
+      ModuleMetaData web0 = modules.get(4);
+      assertEquals("web0", web0.getId());
+      assertEquals("WEB-INF/alt-web.xml", web0.getAlternativeDD());
+      WebModuleMetaData web0MD = (WebModuleMetaData) web0.getValue();
+      assertEquals("/web0", web0MD.getContextRoot());
+      assertEquals("web-app0.war", web0MD.getWebURI());
+      ModuleMetaData web1 = modules.get(5);
+      assertEquals("web1", web1.getId());
+      assertEquals("WEB-INF/alt-web.xml", web1.getAlternativeDD());
+      WebModuleMetaData web1MD = (WebModuleMetaData) web1.getValue();
+      assertEquals("/web1", web1MD.getContextRoot());
+      assertEquals("web-app1.war", web1MD.getWebURI());
+   }
+}

Added: projects/metadata/ear/trunk/src/test/resources/org/jboss/test/metadata/ear/Ear6xEverything_testEverything.xml
===================================================================
--- projects/metadata/ear/trunk/src/test/resources/org/jboss/test/metadata/ear/Ear6xEverything_testEverything.xml	                        (rev 0)
+++ projects/metadata/ear/trunk/src/test/resources/org/jboss/test/metadata/ear/Ear6xEverything_testEverything.xml	2010-05-28 08:10:58 UTC (rev 105327)
@@ -0,0 +1,491 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application xmlns="http://java.sun.com/xml/ns/javaee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+    http://java.sun.com/xml/ns/javaee/application_6.xsd"
+    version="6" id="application-test-everything">
+
+    <application-name>Application name</application-name>
+
+    <description>en-ear-desc</description>
+    <description xml:lang="fr">fr-ear-desc</description>
+    <description xml:lang="de">de-ear-desc</description>
+    <display-name>en-ear-disp</display-name>
+    <display-name xml:lang="fr">fr-ear-disp</display-name>
+    <display-name xml:lang="de">de-ear-disp</display-name>
+    <icon id="en-ear-icon-id">
+        <small-icon>en-ear-small-icon</small-icon>
+        <large-icon>en-ear-large-icon</large-icon>
+    </icon>
+    <icon xml:lang="fr" id="fr-ear-icon-id">
+        <small-icon>fr-ear-small-icon</small-icon>
+        <large-icon>fr-ear-large-icon</large-icon>
+    </icon>
+    <icon xml:lang="de" id="de-ear-icon-id">
+        <small-icon>de-ear-small-icon</small-icon>
+        <large-icon>de-ear-large-icon</large-icon>
+    </icon>
+
+    <initialize-in-order>true</initialize-in-order>
+
+    <module id="connector0">
+        <connector>rar0.rar</connector>
+        <alt-dd>META-INF/alt-ra.xml</alt-dd>
+    </module>
+    <module id="java0">
+        <java>client0.jar</java>
+        <alt-dd>META-INF/alt-application-client.xml</alt-dd>
+    </module>
+    <module id="ejb0">
+        <ejb>ejb-jar0.jar</ejb>
+        <alt-dd>META-INF/alt-ejb-jar.xml</alt-dd>
+    </module>
+    <module id="ejb1">
+        <ejb>ejb-jar1.jar</ejb>
+        <alt-dd>META-INF/alt-ejb-jar.xml</alt-dd>
+    </module>
+    <module id="web0">
+        <web>
+            <web-uri>web-app0.war</web-uri>
+            <context-root>/web0</context-root>
+        </web>
+        <alt-dd>WEB-INF/alt-web.xml</alt-dd>
+    </module>
+    <module id="web1">
+        <web>
+            <web-uri>web-app1.war</web-uri>
+            <context-root>/web1</context-root>
+        </web>
+        <alt-dd>WEB-INF/alt-web.xml</alt-dd>
+    </module>
+    <security-role id="security-role0">
+        <description>The 0 security role</description>
+        <role-name>role0</role-name>
+    </security-role>
+    <security-role id="security-role1">
+        <description>The 1 security role</description>
+        <role-name>role1</role-name>
+    </security-role>
+    <library-directory>lib0</library-directory>
+
+         <env-entry id="session1EnvEntry1-id">
+            <description>en-session1EnvEntry1-desc</description>
+            <description xml:lang="fr">fr-session1EnvEntry1-desc</description>
+            <description xml:lang="de">de-session1EnvEntry1-desc</description>
+            <env-entry-name>session1EnvEntry1Name</env-entry-name>
+            <env-entry-type>java.lang.String</env-entry-type>
+            <env-entry-value>session1EnvEntry1Value</env-entry-value>
+            <mapped-name>session1EnvEntry1MappedName</mapped-name>
+            <injection-target>
+               <injection-target-class>session1EnvEntry1Injection1Class</injection-target-class>
+               <injection-target-name>session1EnvEntry1Injection1Name</injection-target-name>
+            </injection-target>
+            <injection-target>
+               <injection-target-class>session1EnvEntry1Injection2Class</injection-target-class>
+               <injection-target-name>session1EnvEntry1Injection2Name</injection-target-name>
+            </injection-target>
+         </env-entry>
+         <env-entry id="session1EnvEntry2-id">
+            <description>en-session1EnvEntry2-desc</description>
+            <description xml:lang="fr">fr-session1EnvEntry2-desc</description>
+            <description xml:lang="de">de-session1EnvEntry2-desc</description>
+            <env-entry-name>session1EnvEntry2Name</env-entry-name>
+            <env-entry-type>java.lang.String</env-entry-type>
+            <env-entry-value>session1EnvEntry2Value</env-entry-value>
+            <mapped-name>session1EnvEntry2MappedName</mapped-name>
+            <injection-target>
+               <injection-target-class>session1EnvEntry2Injection1Class</injection-target-class>
+               <injection-target-name>session1EnvEntry2Injection1Name</injection-target-name>
+            </injection-target>
+            <injection-target>
+               <injection-target-class>session1EnvEntry2Injection2Class</injection-target-class>
+               <injection-target-name>session1EnvEntry2Injection2Name</injection-target-name>
+            </injection-target>
+         </env-entry>
+         <ejb-ref id="session1EjbRef1-id">
+            <description>en-session1EjbRef1-desc</description>
+            <description xml:lang="fr">fr-session1EjbRef1-desc</description>
+            <description xml:lang="de">de-session1EjbRef1-desc</description>
+            <ejb-ref-name>session1EjbRef1Name</ejb-ref-name>
+            <ejb-ref-type>Session</ejb-ref-type>
+            <home>session1EjbRef1Home</home>
+            <remote>session1EjbRef1Remote</remote>
+            <ejb-link>session1EjbRef1EjbLink</ejb-link>
+            <mapped-name>session1EjbRef1MappedName</mapped-name>
+            <injection-target>
+               <injection-target-class>session1EjbRef1Injection1Class</injection-target-class>
+               <injection-target-name>session1EjbRef1Injection1Name</injection-target-name>
+            </injection-target>
+            <injection-target>
+               <injection-target-class>session1EjbRef1Injection2Class</injection-target-class>
+               <injection-target-name>session1EjbRef1Injection2Name</injection-target-name>
+            </injection-target>
+         </ejb-ref>
+         <ejb-ref id="session1EjbRef2-id">
+            <description>en-session1EjbRef2-desc</description>
+            <description xml:lang="fr">fr-session1EjbRef2-desc</description>
+            <description xml:lang="de">de-session1EjbRef2-desc</description>
+            <ejb-ref-name>session1EjbRef2Name</ejb-ref-name>
+            <ejb-ref-type>Entity</ejb-ref-type>
+            <home>session1EjbRef2Home</home>
+            <remote>session1EjbRef2Remote</remote>
+            <ejb-link>session1EjbRef2EjbLink</ejb-link>
+            <mapped-name>session1EjbRef2MappedName</mapped-name>
+            <injection-target>
+               <injection-target-class>session1EjbRef2Injection1Class</injection-target-class>
+               <injection-target-name>session1EjbRef2Injection1Name</injection-target-name>
+            </injection-target>
+            <injection-target>
+               <injection-target-class>session1EjbRef2Injection2Class</injection-target-class>
+               <injection-target-name>session1EjbRef2Injection2Name</injection-target-name>
+            </injection-target>
+         </ejb-ref>
+         <ejb-local-ref id="session1EjbLocalRef1-id">
+            <description>en-session1EjbLocalRef1-desc</description>
+            <description xml:lang="fr">fr-session1EjbLocalRef1-desc</description>
+            <description xml:lang="de">de-session1EjbLocalRef1-desc</description>
+            <ejb-ref-name>session1EjbLocalRef1Name</ejb-ref-name>
+            <ejb-ref-type>Session</ejb-ref-type>
+            <local-home>session1EjbLocalRef1LocalHome</local-home>
+            <local>session1EjbLocalRef1Local</local>
+            <ejb-link>session1EjbLocalRef1EjbLink</ejb-link>
+            <mapped-name>session1EjbLocalRef1MappedName</mapped-name>
+            <injection-target>
+               <injection-target-class>session1EjbLocalRef1Injection1Class</injection-target-class>
+               <injection-target-name>session1EjbLocalRef1Injection1Name</injection-target-name>
+            </injection-target>
+            <injection-target>
+               <injection-target-class>session1EjbLocalRef1Injection2Class</injection-target-class>
+               <injection-target-name>session1EjbLocalRef1Injection2Name</injection-target-name>
+            </injection-target>
+         </ejb-local-ref>
+         <ejb-local-ref id="session1EjbLocalRef2-id">
+            <description>en-session1EjbLocalRef2-desc</description>
+            <description xml:lang="fr">fr-session1EjbLocalRef2-desc</description>
+            <description xml:lang="de">de-session1EjbLocalRef2-desc</description>
+            <ejb-ref-name>session1EjbLocalRef2Name</ejb-ref-name>
+            <ejb-ref-type>Entity</ejb-ref-type>
+            <local-home>session1EjbLocalRef2LocalHome</local-home>
+            <local>session1EjbLocalRef2Local</local>
+            <ejb-link>session1EjbLocalRef2EjbLink</ejb-link>
+            <mapped-name>session1EjbLocalRef2MappedName</mapped-name>
+            <injection-target>
+               <injection-target-class>session1EjbLocalRef2Injection1Class</injection-target-class>
+               <injection-target-name>session1EjbLocalRef2Injection1Name</injection-target-name>
+            </injection-target>
+            <injection-target>
+               <injection-target-class>session1EjbLocalRef2Injection2Class</injection-target-class>
+               <injection-target-name>session1EjbLocalRef2Injection2Name</injection-target-name>
+            </injection-target>
+         </ejb-local-ref>
+         
+         <!-- service ref -->
+         <!-- TODO: full service-ref contents -->
+         <service-ref id="session1ServiceRef1-id">
+            <description>en-session1ServiceRef1-desc</description>
+            <description xml:lang="fr">fr-session1ServiceRef1-desc</description>
+            <description xml:lang="de">de-session1ServiceRef1-desc</description>
+            <service-ref-name>session1ServiceRef1Name</service-ref-name>
+            <service-interface>session1ServiceRef1Iface</service-interface>
+         </service-ref>
+         <service-ref id="session1ServiceRef2-id">
+            <description>en-session1ServiceRef2-desc</description>
+            <description xml:lang="fr">fr-session1ServiceRef2-desc</description>
+            <description xml:lang="de">de-session1ServiceRef2-desc</description>
+            <service-ref-name>session1ServiceRef2Name</service-ref-name>
+            <service-interface>session1ServiceRef2Iface</service-interface>
+         </service-ref>
+
+         <resource-ref id="session1ResourceRef1-id">
+            <description>en-session1ResourceRef1-desc</description>
+            <description xml:lang="fr">fr-session1ResourceRef1-desc</description>
+            <description xml:lang="de">de-session1ResourceRef1-desc</description>
+            <res-ref-name>session1ResourceRef1Name</res-ref-name>
+            <res-type>session1ResourceRef1Type</res-type>
+            <res-auth>Application</res-auth>
+            <res-sharing-scope>Shareable</res-sharing-scope>
+            <mapped-name>session1ResourceRef1MappedName</mapped-name>
+            <injection-target>
+               <injection-target-class>session1ResourceRef1Injection1Class</injection-target-class>
+               <injection-target-name>session1ResourceRef1Injection1Name</injection-target-name>
+            </injection-target>
+            <injection-target>
+               <injection-target-class>session1ResourceRef1Injection2Class</injection-target-class>
+               <injection-target-name>session1ResourceRef1Injection2Name</injection-target-name>
+            </injection-target>
+         </resource-ref>
+         <resource-ref id="session1ResourceRef2-id">
+            <description>en-session1ResourceRef2-desc</description>
+            <description xml:lang="fr">fr-session1ResourceRef2-desc</description>
+            <description xml:lang="de">de-session1ResourceRef2-desc</description>
+            <res-ref-name>session1ResourceRef2Name</res-ref-name>
+            <res-type>session1ResourceRef2Type</res-type>
+            <res-auth>Container</res-auth>
+            <res-sharing-scope>Unshareable</res-sharing-scope>
+            <mapped-name>session1ResourceRef2MappedName</mapped-name>
+            <injection-target>
+               <injection-target-class>session1ResourceRef2Injection1Class</injection-target-class>
+               <injection-target-name>session1ResourceRef2Injection1Name</injection-target-name>
+            </injection-target>
+            <injection-target>
+               <injection-target-class>session1ResourceRef2Injection2Class</injection-target-class>
+               <injection-target-name>session1ResourceRef2Injection2Name</injection-target-name>
+            </injection-target>
+         </resource-ref>
+         <resource-env-ref id="session1ResourceEnvRef1-id">
+            <description>en-session1ResourceEnvRef1-desc</description>
+            <description xml:lang="fr">fr-session1ResourceEnvRef1-desc</description>
+            <description xml:lang="de">de-session1ResourceEnvRef1-desc</description>
+            <resource-env-ref-name>session1ResourceEnvRef1Name</resource-env-ref-name>
+            <resource-env-ref-type>session1ResourceEnvRef1Type</resource-env-ref-type>
+            <mapped-name>session1ResourceEnvRef1MappedName</mapped-name>
+            <injection-target>
+               <injection-target-class>session1ResourceEnvRef1Injection1Class</injection-target-class>
+               <injection-target-name>session1ResourceEnvRef1Injection1Name</injection-target-name>
+            </injection-target>
+            <injection-target>
+               <injection-target-class>session1ResourceEnvRef1Injection2Class</injection-target-class>
+               <injection-target-name>session1ResourceEnvRef1Injection2Name</injection-target-name>
+            </injection-target>
+         </resource-env-ref>
+         <resource-env-ref id="session1ResourceEnvRef2-id">
+            <description>en-session1ResourceEnvRef2-desc</description>
+            <description xml:lang="fr">fr-session1ResourceEnvRef2-desc</description>
+            <description xml:lang="de">de-session1ResourceEnvRef2-desc</description>
+            <resource-env-ref-name>session1ResourceEnvRef2Name</resource-env-ref-name>
+            <resource-env-ref-type>session1ResourceEnvRef2Type</resource-env-ref-type>
+            <mapped-name>session1ResourceEnvRef2MappedName</mapped-name>
+            <injection-target>
+               <injection-target-class>session1ResourceEnvRef2Injection1Class</injection-target-class>
+               <injection-target-name>session1ResourceEnvRef2Injection1Name</injection-target-name>
+            </injection-target>
+            <injection-target>
+               <injection-target-class>session1ResourceEnvRef2Injection2Class</injection-target-class>
+               <injection-target-name>session1ResourceEnvRef2Injection2Name</injection-target-name>
+            </injection-target>
+         </resource-env-ref>
+         <message-destination-ref id="session1MessageDestinationRef1-id">
+            <description>en-session1MessageDestinationRef1-desc</description>
+            <description xml:lang="fr">fr-session1MessageDestinationRef1-desc</description>
+            <description xml:lang="de">de-session1MessageDestinationRef1-desc</description>
+            <message-destination-ref-name>session1MessageDestinationRef1Name</message-destination-ref-name>
+            <message-destination-type>session1MessageDestinationRef1Type</message-destination-type>
+            <message-destination-usage>Consumes</message-destination-usage>
+            <message-destination-link>session1MessageDestinationRef1Link</message-destination-link>
+            <mapped-name>session1MessageDestinationRef1MappedName</mapped-name>
+            <injection-target>
+               <injection-target-class>session1MessageDestinationRef1Injection1Class</injection-target-class>
+               <injection-target-name>session1MessageDestinationRef1Injection1Name</injection-target-name>
+            </injection-target>
+            <injection-target>
+               <injection-target-class>session1MessageDestinationRef1Injection2Class</injection-target-class>
+               <injection-target-name>session1MessageDestinationRef1Injection2Name</injection-target-name>
+            </injection-target>
+         </message-destination-ref>
+         <message-destination-ref id="session1MessageDestinationRef2-id">
+            <description>en-session1MessageDestinationRef2-desc</description>
+            <description xml:lang="fr">fr-session1MessageDestinationRef2-desc</description>
+            <description xml:lang="de">de-session1MessageDestinationRef2-desc</description>
+            <message-destination-ref-name>session1MessageDestinationRef2Name</message-destination-ref-name>
+            <message-destination-type>session1MessageDestinationRef2Type</message-destination-type>
+            <message-destination-usage>Produces</message-destination-usage>
+            <message-destination-link>session1MessageDestinationRef2Link</message-destination-link>
+            <mapped-name>session1MessageDestinationRef2MappedName</mapped-name>
+            <injection-target>
+               <injection-target-class>session1MessageDestinationRef2Injection1Class</injection-target-class>
+               <injection-target-name>session1MessageDestinationRef2Injection1Name</injection-target-name>
+            </injection-target>
+            <injection-target>
+               <injection-target-class>session1MessageDestinationRef2Injection2Class</injection-target-class>
+               <injection-target-name>session1MessageDestinationRef2Injection2Name</injection-target-name>
+            </injection-target>
+         </message-destination-ref>
+         <persistence-context-ref id="session1PersistenceContextRef1-id">
+            <description>en-session1PersistenceContextRef1-desc</description>
+            <description xml:lang="fr">fr-session1PersistenceContextRef1-desc</description>
+            <description xml:lang="de">de-session1PersistenceContextRef1-desc</description>
+            <persistence-context-ref-name>session1PersistenceContextRef1Name</persistence-context-ref-name>
+            <persistence-unit-name>session1PersistenceContextRef1Unit</persistence-unit-name>
+            <persistence-context-type>Transaction</persistence-context-type>
+            <persistence-property id="session1PersistenceContextRef1Property1-id">
+               <name>session1PersistenceContextRef1Property1Name</name>
+               <value>session1PersistenceContextRef1Property1Value</value>
+            </persistence-property>
+            <persistence-property id="session1PersistenceContextRef1Property2-id">
+               <name>session1PersistenceContextRef1Property2Name</name>
+               <value>session1PersistenceContextRef1Property2Value</value>
+            </persistence-property>
+            <mapped-name>session1PersistenceContextRef1MappedName</mapped-name>
+            <injection-target>
+               <injection-target-class>session1PersistenceContextRef1Injection1Class</injection-target-class>
+               <injection-target-name>session1PersistenceContextRef1Injection1Name</injection-target-name>
+            </injection-target>
+            <injection-target>
+               <injection-target-class>session1PersistenceContextRef1Injection2Class</injection-target-class>
+               <injection-target-name>session1PersistenceContextRef1Injection2Name</injection-target-name>
+            </injection-target>
+         </persistence-context-ref>
+         <persistence-context-ref id="session1PersistenceContextRef2-id">
+            <description>en-session1PersistenceContextRef2-desc</description>
+            <description xml:lang="fr">fr-session1PersistenceContextRef2-desc</description>
+            <description xml:lang="de">de-session1PersistenceContextRef2-desc</description>
+            <persistence-context-ref-name>session1PersistenceContextRef2Name</persistence-context-ref-name>
+            <persistence-unit-name>session1PersistenceContextRef2Unit</persistence-unit-name>
+            <persistence-context-type>Extended</persistence-context-type>
+            <persistence-property id="session1PersistenceContextRef2Property1-id">
+               <name>session1PersistenceContextRef2Property1Name</name>
+               <value>session1PersistenceContextRef2Property1Value</value>
+            </persistence-property>
+            <persistence-property id="session1PersistenceContextRef2Property2-id">
+               <name>session1PersistenceContextRef2Property2Name</name>
+               <value>session1PersistenceContextRef2Property2Value</value>
+            </persistence-property>
+            <mapped-name>session1PersistenceContextRef2MappedName</mapped-name>
+            <injection-target>
+               <injection-target-class>session1PersistenceContextRef2Injection1Class</injection-target-class>
+               <injection-target-name>session1PersistenceContextRef2Injection1Name</injection-target-name>
+            </injection-target>
+            <injection-target>
+               <injection-target-class>session1PersistenceContextRef2Injection2Class</injection-target-class>
+               <injection-target-name>session1PersistenceContextRef2Injection2Name</injection-target-name>
+            </injection-target>
+         </persistence-context-ref>
+         <persistence-unit-ref id="session1PersistenceUnitRef1-id">
+            <description>en-session1PersistenceUnitRef1-desc</description>
+            <description xml:lang="fr">fr-session1PersistenceUnitRef1-desc</description>
+            <description xml:lang="de">de-session1PersistenceUnitRef1-desc</description>
+            <persistence-unit-ref-name>session1PersistenceUnitRef1Name</persistence-unit-ref-name>
+            <persistence-unit-name>session1PersistenceUnitRef1Unit</persistence-unit-name>
+            <mapped-name>session1PersistenceUnitRef1MappedName</mapped-name>
+            <injection-target>
+               <injection-target-class>session1PersistenceUnitRef1Injection1Class</injection-target-class>
+               <injection-target-name>session1PersistenceUnitRef1Injection1Name</injection-target-name>
+            </injection-target>
+            <injection-target>
+               <injection-target-class>session1PersistenceUnitRef1Injection2Class</injection-target-class>
+               <injection-target-name>session1PersistenceUnitRef1Injection2Name</injection-target-name>
+            </injection-target>
+         </persistence-unit-ref>
+         <persistence-unit-ref id="session1PersistenceUnitRef2-id">
+            <description>en-session1PersistenceUnitRef2-desc</description>
+            <description xml:lang="fr">fr-session1PersistenceUnitRef2-desc</description>
+            <description xml:lang="de">de-session1PersistenceUnitRef2-desc</description>
+            <persistence-unit-ref-name>session1PersistenceUnitRef2Name</persistence-unit-ref-name>
+            <persistence-unit-name>session1PersistenceUnitRef2Unit</persistence-unit-name>
+            <mapped-name>session1PersistenceUnitRef2MappedName</mapped-name>
+            <injection-target>
+               <injection-target-class>session1PersistenceUnitRef2Injection1Class</injection-target-class>
+               <injection-target-name>session1PersistenceUnitRef2Injection1Name</injection-target-name>
+            </injection-target>
+            <injection-target>
+               <injection-target-class>session1PersistenceUnitRef2Injection2Class</injection-target-class>
+               <injection-target-name>session1PersistenceUnitRef2Injection2Name</injection-target-name>
+            </injection-target>
+         </persistence-unit-ref>
+
+      <message-destination id="messageDestination1-id">
+         <description>en-messageDestination1-desc</description>
+         <description xml:lang="fr">fr-messageDestination1-desc</description>
+         <description xml:lang="de">de-messageDestination1-desc</description>
+         <display-name>en-messageDestination1-disp</display-name>
+         <display-name xml:lang="fr">fr-messageDestination1-disp</display-name>
+         <display-name xml:lang="de">de-messageDestination1-disp</display-name>
+         <icon id="en-messageDestination1-icon-id">
+            <small-icon>en-messageDestination1-small-icon</small-icon>
+            <large-icon>en-messageDestination1-large-icon</large-icon>
+         </icon>
+         <icon xml:lang="fr" id="fr-messageDestination1-icon-id">
+            <small-icon>fr-messageDestination1-small-icon</small-icon>
+            <large-icon>fr-messageDestination1-large-icon</large-icon>
+         </icon>
+         <icon xml:lang="de" id="de-messageDestination1-icon-id">
+            <small-icon>de-messageDestination1-small-icon</small-icon>
+            <large-icon>de-messageDestination1-large-icon</large-icon>
+         </icon>
+         <message-destination-name>messageDestination1Name</message-destination-name>
+         <mapped-name>messageDestination1MappedName</mapped-name>
+         <lookup-name>messageDestination1LookupName</lookup-name>
+      </message-destination>
+      <message-destination id="messageDestination2-id">
+         <description>en-messageDestination2-desc</description>
+         <description xml:lang="fr">fr-messageDestination2-desc</description>
+         <description xml:lang="de">de-messageDestination2-desc</description>
+         <display-name>en-messageDestination2-disp</display-name>
+         <display-name xml:lang="fr">fr-messageDestination2-disp</display-name>
+         <display-name xml:lang="de">de-messageDestination2-disp</display-name>
+         <icon id="en-messageDestination2-icon-id">
+            <small-icon>en-messageDestination2-small-icon</small-icon>
+            <large-icon>en-messageDestination2-large-icon</large-icon>
+         </icon>
+         <icon xml:lang="fr" id="fr-messageDestination2-icon-id">
+            <small-icon>fr-messageDestination2-small-icon</small-icon>
+            <large-icon>fr-messageDestination2-large-icon</large-icon>
+         </icon>
+         <icon xml:lang="de" id="de-messageDestination2-icon-id">
+            <small-icon>de-messageDestination2-small-icon</small-icon>
+            <large-icon>de-messageDestination2-large-icon</large-icon>
+         </icon>
+         <message-destination-name>messageDestination2Name</message-destination-name>
+         <mapped-name>messageDestination2MappedName</mapped-name>
+         <lookup-name>messageDestination2LookupName</lookup-name>
+      </message-destination>
+
+      <data-source>
+         <description>en-dataSource1-desc</description>
+         <description xml:lang="fr">fr-dataSource1-desc</description>
+         <description xml:lang="de">de-dataSource1-desc</description>
+         <name>dataSource1Name</name>
+         <class-name>dataSource1ClassName</class-name>
+         <server-name>dataSource1ServerName</server-name>
+         <port-number>1</port-number>
+         <database-name>dataSource1DatabaseName</database-name>
+         <url>jdbc:dataSource1:url</url>
+         <user>dataSource1User</user>
+         <password>dataSource1Password</password>
+         <property id="dataSource1Property1-id">
+            <name>dataSource1Property1Name</name>
+            <value>dataSource1Property1Value</value>
+         </property>
+         <property id="dataSource1Property2-id">
+            <name>dataSource1Property2Name</name>
+            <value>dataSource1Property2Value</value>
+         </property>
+         <login-timeout>1</login-timeout>
+         <transactional>false</transactional>
+         <isolation-level>TRANSACTION_READ_UNCOMMITTED</isolation-level>
+         <initial-pool-size>1</initial-pool-size>
+         <max-pool-size>1</max-pool-size>
+         <min-pool-size>1</min-pool-size>
+         <max-idle-time>1</max-idle-time>
+         <max-statements>1</max-statements>
+      </data-source>
+      <data-source>
+         <description>en-dataSource2-desc</description>
+         <description xml:lang="fr">fr-dataSource2-desc</description>
+         <description xml:lang="de">de-dataSource2-desc</description>
+         <name>dataSource2Name</name>
+         <class-name>dataSource2ClassName</class-name>
+         <server-name>dataSource2ServerName</server-name>
+         <port-number>2</port-number>
+         <database-name>dataSource2DatabaseName</database-name>
+         <url>jdbc:dataSource2:url</url>
+         <user>dataSource2User</user>
+         <password>dataSource2Password</password>
+         <property id="dataSource2Property1-id">
+            <name>dataSource2Property1Name</name>
+            <value>dataSource2Property1Value</value>
+         </property>
+         <property id="dataSource2Property2-id">
+            <name>dataSource2Property2Name</name>
+            <value>dataSource2Property2Value</value>
+         </property>
+         <login-timeout>2</login-timeout>
+         <transactional>true</transactional>
+         <isolation-level>TRANSACTION_READ_COMMITTED</isolation-level>
+         <initial-pool-size>2</initial-pool-size>
+         <max-pool-size>2</max-pool-size>
+         <min-pool-size>2</min-pool-size>
+         <max-idle-time>2</max-idle-time>
+         <max-statements>2</max-statements>
+      </data-source>
+</application>

Modified: projects/metadata/ear/trunk/src/test/resources/schema2class.properties
===================================================================
--- projects/metadata/ear/trunk/src/test/resources/schema2class.properties	2010-05-28 06:25:57 UTC (rev 105326)
+++ projects/metadata/ear/trunk/src/test/resources/schema2class.properties	2010-05-28 08:10:58 UTC (rev 105327)
@@ -4,6 +4,7 @@
 application_1_3.dtd org.jboss.metadata.ear.spec.Ear13DTDMetaData
 application_1_4.xsd org.jboss.metadata.ear.spec.Ear14MetaData
 application_5.xsd org.jboss.metadata.ear.spec.Ear50MetaData
+application_6.xsd org.jboss.metadata.ear.spec.Ear60MetaData
 jboss-app_3_2.dtd org.jboss.metadata.ear.jboss.JBoss50DTDAppMetaData
 jboss-app_4_0.dtd org.jboss.metadata.ear.jboss.JBoss50DTDAppMetaData
 jboss-app_4_2.dtd org.jboss.metadata.ear.jboss.JBoss50DTDAppMetaData




More information about the jboss-cvs-commits mailing list