[jboss-cvs] JBossAS SVN: r72760 - in projects/metadata/tags: 1.0.0.Beta10 and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Apr 27 10:41:39 EDT 2008


Author: scott.stark at jboss.org
Date: 2008-04-27 10:41:37 -0400 (Sun, 27 Apr 2008)
New Revision: 72760

Added:
   projects/metadata/tags/1.0.0.Beta10/
   projects/metadata/tags/1.0.0.Beta10/pom.xml
   projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentEntryMetaData.java
   projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java
   projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/ResourceInjectionMetaData.java
   projects/metadata/tags/1.0.0.Beta10/src/test/java/org/jboss/test/metadata/annotation/client/AnnotationClientUnitTestCase.java
   projects/metadata/tags/1.0.0.Beta10/src/test/java/org/jboss/test/metadata/annotation/client/basic/Client.java
   projects/metadata/tags/1.0.0.Beta10/src/test/resources/org/jboss/test/metadata/annotation/client/AnnotationClient_testJBossXmlMerge.xml
   projects/metadata/tags/1.0.0.Beta10/src/test/resources/org/jboss/test/metadata/annotation/client/AnnotationClient_testXmlMerge.xml
Removed:
   projects/metadata/tags/1.0.0.Beta10/pom.xml
   projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentEntryMetaData.java
   projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java
   projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/ResourceInjectionMetaData.java
   projects/metadata/tags/1.0.0.Beta10/src/test/java/org/jboss/test/metadata/annotation/client/AnnotationClientUnitTestCase.java
   projects/metadata/tags/1.0.0.Beta10/src/test/java/org/jboss/test/metadata/annotation/client/basic/Client.java
   projects/metadata/tags/1.0.0.Beta10/src/test/resources/org/jboss/test/metadata/annotation/client/AnnotationClient_testXmlMerge.xml
Log:
[maven-release-plugin]  copy for tag 1.0.0.Beta10

Copied: projects/metadata/tags/1.0.0.Beta10 (from rev 72750, projects/metadata/trunk)

Deleted: projects/metadata/tags/1.0.0.Beta10/pom.xml
===================================================================
--- projects/metadata/trunk/pom.xml	2008-04-26 15:30:20 UTC (rev 72750)
+++ projects/metadata/tags/1.0.0.Beta10/pom.xml	2008-04-27 14:41:37 UTC (rev 72760)
@@ -1,221 +0,0 @@
-<!--
-  vi:ts=2:sw=2:expandtab
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.jboss</groupId>
-    <artifactId>jboss-parent</artifactId>
-    <version>3</version>
-  </parent>
-  <groupId>org.jboss.metadata</groupId>
-  <artifactId>jboss-metadata</artifactId>
-  <packaging>jar</packaging>
-  <version>1.0.0-SNAPSHOT</version>
-  <name>JBoss Metadata</name>
-  <url>http://www.jboss.org</url>
-  <description>The common JavaEE metadata classes</description>
-  <scm>
-    <connection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/metadata/trunk/</connection>
-  </scm>
-  <licenses>
-    <license>
-      <name>lgpl</name>
-      <url>http://repository.jboss.com/licenses/lgpl.txt</url>
-    </license>
-  </licenses>
-  <organization>
-    <name>JBoss, A division of Red Hat</name>
-    <url>http://www.jboss.org</url>
-  </organization>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <version>2.3</version>
-        <configuration>
-          <printSummary>true</printSummary>
-          <disableXmlReport>false</disableXmlReport>
-          <testFailureIgnore>true</testFailureIgnore>
-          <redirectTestOutputToFile>true</redirectTestOutputToFile>
-          <includes>
-            <include>**/*TestCase.java</include>
-          </includes>
-        </configuration>
-      </plugin>      
-    </plugins>
-  </build>
-
-  <!-- 
-    Eclipse settings have been removed from parent. This needs to be
-    done via an eclipse profile.
-    http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085896#4085896 
-    -->
-  <profiles>
-    <profile>
-      <id>eclipse</id>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-eclipse-plugin</artifactId>
-            <configuration>
-              <downloadSources>true</downloadSources>
-              <buildOutputDirectory>target/eclipse-classes</buildOutputDirectory>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-    <profile>
-      <!-- This profile allows hudson to skip the jboss-deploy step -->
-      <id>jboss-deploy</id>
-      <activation>
-        <property>
-          <name>!skip.jboss-deploy</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.jboss.maven.plugins</groupId>
-            <artifactId>maven-jboss-deploy-plugin</artifactId>
-            <version>1.5</version>
-            <executions>
-              <execution>
-                <id>jboss-deploy</id>
-                <goals>
-                  <goal>jboss-deploy</goal>
-                </goals>
-                <phase>deploy</phase>
-              </execution>
-            </executions>
-            <configuration>
-              <groupId>jboss</groupId>
-              <imports>
-                <jboss.common-core>2.2.1.GA,2.2.2.GA</jboss.common-core>
-              </imports>
-              <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
-              <removeArtifactVersion>true</removeArtifactVersion>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-
-  <!-- Compile Dependencies -->
-  <dependencies>
-
-    <dependency>
-      <groupId>org.jboss.logging</groupId>
-      <artifactId>jboss-logging-spi</artifactId>
-      <version>2.0.5.GA</version>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-common-core</artifactId>
-      <version>2.2.5.GA</version>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.jboss.ejb3</groupId>
-      <artifactId>jboss-ejb3-ext-api</artifactId>
-      <version>0.3</version>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.jboss.javaee</groupId>
-      <artifactId>jboss-javaee</artifactId>
-      <version>5.0.0.Beta3Update1</version>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.jboss.javaee</groupId>
-      <artifactId>jboss-transaction-api</artifactId>
-      <version>1.0.1.Beta3Update1</version>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.jboss.ws</groupId>
-      <artifactId>jbossws-spi</artifactId>
-      <version>1.0.2.GA</version>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-jaxws</artifactId>
-      <version>2.0.1.GA</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jbossxb</artifactId>
-      <version>2.0.0.CR8</version>
-      <exclusions>
-        <exclusion>
-          <groupId>jboss</groupId>
-          <artifactId>jboss-common-logging-spi</artifactId>
-        </exclusion>        
-      </exclusions>       
-    </dependency>
-    
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-vfs</artifactId>
-      <version>2.0.0.Beta10</version>
-      <exclusions>
-        <exclusion>
-          <groupId>jboss</groupId>
-          <artifactId>jboss-common-logging-spi</artifactId>
-        </exclusion>        
-      </exclusions>      
-    </dependency>
-    
-    <dependency>
-      <groupId>org.jboss.microcontainer</groupId>
-      <artifactId>jboss-container</artifactId>
-      <version>2.0.0.Beta10</version>
-      <scope>compile</scope>
-      <exclusions>
-        <!-- avoid bringing-in xml-apis 2.7.1, shouldn't jbossxb indicate
-        it's using xml-apis 2.9.1, or should we explicitly depend on it? -->
-        <exclusion>
-          <groupId>apache-xerces</groupId>
-          <artifactId>xml-apis</artifactId>
-        </exclusion>
-        <!-- avoid bringing-in jboss:jboss-logging-spi:jar:2.0.3.GA:compile,
-        we depend on org.jboss.logging:jboss-logging-spi:jar:2.0.5.GA:compile -->
-        <exclusion>
-          <groupId>jboss</groupId>
-          <artifactId>jboss-logging-spi</artifactId>
-        </exclusion>        
-      </exclusions>
-    </dependency>
-
-    <dependency>
-      <groupId>javax.xml.bind</groupId>
-      <artifactId>jaxb-api</artifactId>
-      <version>2.1</version>    
-    </dependency>
-    
-    <!-- Test Dependencies -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <scope>test</scope>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.jboss.test</groupId>
-      <artifactId>jboss-test</artifactId>
-      <version>1.1.0.GA</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-</project>

Copied: projects/metadata/tags/1.0.0.Beta10/pom.xml (from rev 72759, projects/metadata/trunk/pom.xml)
===================================================================
--- projects/metadata/tags/1.0.0.Beta10/pom.xml	                        (rev 0)
+++ projects/metadata/tags/1.0.0.Beta10/pom.xml	2008-04-27 14:41:37 UTC (rev 72760)
@@ -0,0 +1,225 @@
+<!--
+  vi:ts=2:sw=2:expandtab
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.jboss</groupId>
+    <artifactId>jboss-parent</artifactId>
+    <version>3</version>
+  </parent>
+  <groupId>org.jboss.metadata</groupId>
+  <artifactId>jboss-metadata</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0.0.Beta10</version>
+  <name>JBoss Metadata</name>
+  <url>http://www.jboss.org</url>
+  <description>The common JavaEE metadata classes</description>
+  <scm>
+    <connection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/metadata/tags/1.0.0.Beta10</connection>
+  </scm>
+  <licenses>
+    <license>
+      <name>lgpl</name>
+      <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+    </license>
+  </licenses>
+  <organization>
+    <name>JBoss, A division of Red Hat</name>
+    <url>http://www.jboss.org</url>
+  </organization>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.3</version>
+        <configuration>
+          <printSummary>true</printSummary>
+          <disableXmlReport>false</disableXmlReport>
+          <testFailureIgnore>true</testFailureIgnore>
+          <redirectTestOutputToFile>true</redirectTestOutputToFile>
+          <includes>
+            <include>**/*TestCase.java</include>
+          </includes>
+          <!-- Not ready for releasing -->
+          <excludes>
+            <include>org/jboss/test/metadata/jpa/*TestCase.java</include>
+          </excludes>
+        </configuration>
+      </plugin>      
+    </plugins>
+  </build>
+
+  <!-- 
+    Eclipse settings have been removed from parent. This needs to be
+    done via an eclipse profile.
+    http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085896#4085896 
+    -->
+  <profiles>
+    <profile>
+      <id>eclipse</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-eclipse-plugin</artifactId>
+            <configuration>
+              <downloadSources>true</downloadSources>
+              <buildOutputDirectory>target/eclipse-classes</buildOutputDirectory>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <!-- This profile allows hudson to skip the jboss-deploy step -->
+      <id>jboss-deploy</id>
+      <activation>
+        <property>
+          <name>!skip.jboss-deploy</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.jboss.maven.plugins</groupId>
+            <artifactId>maven-jboss-deploy-plugin</artifactId>
+            <version>1.5</version>
+            <executions>
+              <execution>
+                <id>jboss-deploy</id>
+                <goals>
+                  <goal>jboss-deploy</goal>
+                </goals>
+                <phase>deploy</phase>
+              </execution>
+            </executions>
+            <configuration>
+              <groupId>jboss</groupId>
+              <imports>
+                <jboss.common-core>2.2.1.GA,2.2.2.GA</jboss.common-core>
+              </imports>
+              <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
+              <removeArtifactVersion>true</removeArtifactVersion>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
+  <!-- Compile Dependencies -->
+  <dependencies>
+
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-spi</artifactId>
+      <version>2.0.5.GA</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-common-core</artifactId>
+      <version>2.2.5.GA</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss.ejb3</groupId>
+      <artifactId>jboss-ejb3-ext-api</artifactId>
+      <version>0.3</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss.javaee</groupId>
+      <artifactId>jboss-javaee</artifactId>
+      <version>5.0.0.Beta3Update1</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss.javaee</groupId>
+      <artifactId>jboss-transaction-api</artifactId>
+      <version>1.0.1.Beta3Update1</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss.ws</groupId>
+      <artifactId>jbossws-spi</artifactId>
+      <version>1.0.2.GA</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-jaxws</artifactId>
+      <version>2.0.1.GA</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jbossxb</artifactId>
+      <version>2.0.0.CR8</version>
+      <exclusions>
+        <exclusion>
+          <groupId>jboss</groupId>
+          <artifactId>jboss-common-logging-spi</artifactId>
+        </exclusion>        
+      </exclusions>       
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-vfs</artifactId>
+      <version>2.0.0.Beta10</version>
+      <exclusions>
+        <exclusion>
+          <groupId>jboss</groupId>
+          <artifactId>jboss-common-logging-spi</artifactId>
+        </exclusion>        
+      </exclusions>      
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-container</artifactId>
+      <version>2.0.0.Beta10</version>
+      <scope>compile</scope>
+      <exclusions>
+        <!-- avoid bringing-in xml-apis 2.7.1, shouldn't jbossxb indicate
+        it's using xml-apis 2.9.1, or should we explicitly depend on it? -->
+        <exclusion>
+          <groupId>apache-xerces</groupId>
+          <artifactId>xml-apis</artifactId>
+        </exclusion>
+        <!-- avoid bringing-in jboss:jboss-logging-spi:jar:2.0.3.GA:compile,
+        we depend on org.jboss.logging:jboss-logging-spi:jar:2.0.5.GA:compile -->
+        <exclusion>
+          <groupId>jboss</groupId>
+          <artifactId>jboss-logging-spi</artifactId>
+        </exclusion>        
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.xml.bind</groupId>
+      <artifactId>jaxb-api</artifactId>
+      <version>2.1</version>    
+    </dependency>
+    
+    <!-- Test Dependencies -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss.test</groupId>
+      <artifactId>jboss-test</artifactId>
+      <version>1.1.0.GA</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+</project>

Deleted: projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentEntryMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentEntryMetaData.java	2008-04-26 15:30:20 UTC (rev 72750)
+++ projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentEntryMetaData.java	2008-04-27 14:41:37 UTC (rev 72760)
@@ -1,124 +0,0 @@
-/*
-* 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.metadata.javaee.spec;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jboss.metadata.javaee.support.ResourceInjectionMetaDataWithDescriptions;
-
-/**
- * EnvironmentEntryMetaData.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
- at XmlType(name="env-entryType")
-public class EnvironmentEntryMetaData extends ResourceInjectionMetaDataWithDescriptions
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = -4919146521508624575L;
-
-   /** The type */
-   private String type;
-   
-   /** The value */
-   private String value;
-   
-   /**
-    * Create a new EnvironmentEntryMetaData.
-    */
-   public EnvironmentEntryMetaData()
-   {
-      // For serialization
-   }
-
-   /**
-    * Get the envEntryName.
-    * 
-    * @return the envEntryName.
-    */
-   public String getEnvEntryName()
-   {
-      return getName();
-   }
-
-   /**
-    * Set the envEntryName.
-    * 
-    * @param envEntryName the envEntryName.
-    * @throws IllegalArgumentException for a null envEntryName
-    */
-   public void setEnvEntryName(String envEntryName)
-   {
-      setName(envEntryName);
-   }
-
-   /**
-    * Get the type.
-    * 
-    * @return the type.
-    */
-   public String getType()
-   {
-      return type;
-   }
-
-   /**
-    * Set the type.
-    * 
-    * @param type the type.
-    * @throws IllegalArgumentException for a null type
-    */
-   @XmlElement(name="env-entry-type")
-   public void setType(String type)
-   {
-      if (type == null)
-         throw new IllegalArgumentException("Null type");
-      this.type = type;
-   }
-
-   /**
-    * Get the value.
-    * 
-    * @return the value.
-    */
-   public String getValue()
-   {
-      return value;
-   }
-
-   /**
-    * Set the value.
-    * 
-    * @param value the value.
-    * @throws IllegalArgumentException for a null value
-    */
-   @XmlElement(name="env-entry-value")
-   //@SchemaValue(false)
-   public void setValue(String value)
-   {
-      if (value == null)
-         throw new IllegalArgumentException("Null value");
-      this.value = value;
-   }
-}

Copied: projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentEntryMetaData.java (from rev 72751, projects/metadata/trunk/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentEntryMetaData.java)
===================================================================
--- projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentEntryMetaData.java	                        (rev 0)
+++ projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentEntryMetaData.java	2008-04-27 14:41:37 UTC (rev 72760)
@@ -0,0 +1,139 @@
+/*
+* 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.metadata.javaee.spec;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.metadata.javaee.support.ResourceInjectionMetaDataWithDescriptions;
+
+/**
+ * EnvironmentEntryMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlType(name="env-entryType")
+public class EnvironmentEntryMetaData extends ResourceInjectionMetaDataWithDescriptions
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -4919146521508624575L;
+
+   /** The type */
+   private String type;
+   
+   /** The value */
+   private String value;
+   
+   /**
+    * Create a new EnvironmentEntryMetaData.
+    */
+   public EnvironmentEntryMetaData()
+   {
+      // For serialization
+   }
+
+   /**
+    * Get the envEntryName.
+    * 
+    * @return the envEntryName.
+    */
+   public String getEnvEntryName()
+   {
+      return getName();
+   }
+
+   /**
+    * Set the envEntryName.
+    * 
+    * @param envEntryName the envEntryName.
+    * @throws IllegalArgumentException for a null envEntryName
+    */
+   public void setEnvEntryName(String envEntryName)
+   {
+      setName(envEntryName);
+   }
+
+   /**
+    * Get the type.
+    * 
+    * @return the type.
+    */
+   public String getType()
+   {
+      return type;
+   }
+
+   /**
+    * Set the type.
+    * 
+    * @param type the type.
+    * @throws IllegalArgumentException for a null type
+    */
+   @XmlElement(name="env-entry-type")
+   public void setType(String type)
+   {
+      if (type == null)
+         throw new IllegalArgumentException("Null type");
+      this.type = type;
+   }
+
+   /**
+    * Get the value.
+    * 
+    * @return the value.
+    */
+   public String getValue()
+   {
+      return value;
+   }
+
+   /**
+    * Set the value.
+    * 
+    * @param value the value.
+    * @throws IllegalArgumentException for a null value
+    */
+   @XmlElement(name="env-entry-value")
+   //@SchemaValue(false)
+   public void setValue(String value)
+   {
+      if (value == null)
+         throw new IllegalArgumentException("Null value");
+      this.value = value;
+   }
+
+   public void merge(EnvironmentEntryMetaData override,
+         EnvironmentEntryMetaData original)
+   {
+      super.merge(override, original);
+      if (override != null && override.type != null)
+         setType(override.type);
+      else if (original != null && original.type != null)
+         setType(original.type);
+      if (override != null && override.value != null)
+         setValue(override.value);
+      else if (original != null && original.value != null)
+         setValue(original.value);
+   }
+
+}

Deleted: projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java	2008-04-26 15:30:20 UTC (rev 72750)
+++ projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java	2008-04-27 14:41:37 UTC (rev 72760)
@@ -1,481 +0,0 @@
-/*
-* 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.metadata.javaee.spec;
-
-import java.io.Serializable;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlTransient;
-
-import org.jboss.metadata.javaee.jboss.JBossServiceReferencesMetaData;
-import org.jboss.metadata.javaee.support.AbstractMappedMetaData;
-import org.jboss.xb.annotations.JBossXmlCollection;
-import org.jboss.xb.annotations.JBossXmlModelGroup;
-
-/**
- * References which are only available remote (for application clients).
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @author <a href="carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision$
- */
- at JBossXmlModelGroup(name="jndiEnvironmentRefsGroup",
-      propOrder={
-         "environmentEntries", 
-         "ejbReferences",
-         "serviceReferences",
-         "resourceReferences", 
-         "resourceEnvironmentReferences",
-         "messageDestinationReferences",
-         "persistenceUnitRefs",
-         "postConstructs",
-         "preDestroys"})
-public class RemoteEnvironmentRefsGroupMetaData
-   implements Serializable, RemoteEnvironment, MutableRemoteEnvironment
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = 2L;
-
-   /** The environment entries */
-   private EnvironmentEntriesMetaData environmentEntries;
-
-   /** @EJB references */
-   private AnnotatedEJBReferencesMetaData annotatedEjbReferences;
-
-   /** The ejb references */
-   private EJBReferencesMetaData ejbReferences;
-
-   /** The service references */
-   private ServiceReferencesMetaData serviceReferences;
-
-   /** The resource references */
-   private ResourceReferencesMetaData resourceReferences;
-   
-   /** The resource environment references */
-   private ResourceEnvironmentReferencesMetaData resourceEnvironmentReferences;
-   
-   /** The message destination references */
-   private MessageDestinationReferencesMetaData messageDestinationReferences;
-   
-   /** The persistence unit  reference */
-   private PersistenceUnitReferencesMetaData persistenceUnitRefs;
-
-   /** The post construct methods */
-   private LifecycleCallbacksMetaData postConstructs;
-   
-   /** The pre destroy methods */
-   private LifecycleCallbacksMetaData preDestroys;
-   
-   /**
-    * Create a new EnvironmentRefsGroupMetaData.
-    */
-   public RemoteEnvironmentRefsGroupMetaData()
-   {
-      // For serialization
-   }
-
-   private LifecycleCallbacksMetaData addAll(LifecycleCallbacksMetaData current, LifecycleCallbacksMetaData additions)
-   {
-      if(additions == null)
-         return current;
-      if(current == null)
-         current = new LifecycleCallbacksMetaData();
-      current.addAll(additions);
-      return current;
-   }
-   
-   /**
-    * Get the environmentEntries.
-    * 
-    * @return the environmentEntries.
-    */
-   public EnvironmentEntriesMetaData getEnvironmentEntries()
-   {
-      return environmentEntries;
-   }
-
-   /**
-    * Set the environmentEntries.
-    * 
-    * @param environmentEntries the environmentEntries.
-    * @throws IllegalArgumentException for a null environmentEntries
-    */
-   @XmlElement(name="env-entry")
-   public void setEnvironmentEntries(EnvironmentEntriesMetaData environmentEntries)
-   {
-      if (environmentEntries == null)
-         throw new IllegalArgumentException("Null environmentEntries");
-      this.environmentEntries = environmentEntries;
-   }
-
-   /**
-    * Get the ejbReferences.
-    * 
-    * @return the ejbReferences.
-    */
-   public EJBReferencesMetaData getEjbReferences()
-   {
-      return ejbReferences;
-   }
-
-   /**
-    * Set the ejbReferences.
-    * 
-    * @param ejbReferences the ejbReferences.
-    * @throws IllegalArgumentException for a null ejbReferences
-    */
-   @XmlElement(name="ejb-ref")
-   public void setEjbReferences(EJBReferencesMetaData ejbReferences)
-   {
-      if (ejbReferences == null)
-         throw new IllegalArgumentException("Null ejbReferences");
-      this.ejbReferences = ejbReferences;
-   }
-
-   @XmlTransient
-   public AnnotatedEJBReferencesMetaData getAnnotatedEjbReferences()
-   {
-      return annotatedEjbReferences;
-   }
-   @XmlTransient
-   public void setAnnotatedEjbReferences(AnnotatedEJBReferencesMetaData annotatedEjbReferences)
-   {
-      if (annotatedEjbReferences == null)
-         throw new IllegalArgumentException("Null annotatedEjbReferences");
-      this.annotatedEjbReferences = annotatedEjbReferences;
-   }
-
-   /**
-    * Get the serviceReferences.
-    * 
-    * @return the serviceReferences.
-    */
-   public ServiceReferencesMetaData getServiceReferences()
-   {
-      return serviceReferences;
-   }
-   
-   /**
-    * Set the serviceReferences.
-    * 
-    * @param serviceReferences the serviceReferences.
-    * @throws IllegalArgumentException for a null serviceReferences
-    */
-   @JBossXmlCollection(type=ServiceReferencesMetaData.class)
-   @XmlElement(name="service-ref", type=ServiceReferenceMetaData.class)
-   public void setServiceReferences(ServiceReferencesMetaData serviceReferences)
-   {
-      this.serviceReferences = (ServiceReferencesMetaData)serviceReferences;
-   }
-
-   /**
-    * Get the resourceReferences.
-    * 
-    * @return the resourceReferences.
-    */
-   public ResourceReferencesMetaData getResourceReferences()
-   {
-      return resourceReferences;
-   }
-
-   /**
-    * Set the resourceReferences.
-    * 
-    * @param resourceReferences the resourceReferences.
-    * @throws IllegalArgumentException for a null resourceReferences
-    */
-   @XmlElement(name="resource-ref")
-   public void setResourceReferences(ResourceReferencesMetaData resourceReferences)
-   {
-      if (resourceReferences == null)
-         throw new IllegalArgumentException("Null resourceReferences");
-      this.resourceReferences = resourceReferences;
-   }
-
-   /**
-    * Get the resourceEnvironmentReferences.
-    * 
-    * @return the resourceEnvironmentReferences.
-    */
-   public ResourceEnvironmentReferencesMetaData getResourceEnvironmentReferences()
-   {
-      return resourceEnvironmentReferences;
-   }
-
-   /**
-    * Set the resourceEnvironmentReferences.
-    * 
-    * @param resourceEnvironmentReferences the resourceEnvironmentReferences.
-    * @throws IllegalArgumentException for a null resourceEnvironmentReferences
-    */
-   @XmlElement(name="resource-env-ref")
-   public void setResourceEnvironmentReferences(ResourceEnvironmentReferencesMetaData resourceEnvironmentReferences)
-   {
-      if (resourceEnvironmentReferences == null)
-         throw new IllegalArgumentException("Null resourceEnvironmentReferences");
-      this.resourceEnvironmentReferences = resourceEnvironmentReferences;
-   }
-
-   /**
-    * Get the messageDestinationReferences.
-    * 
-    * @return the messageDestinationReferences.
-    */
-   public MessageDestinationReferencesMetaData getMessageDestinationReferences()
-   {
-      return messageDestinationReferences;
-   }
-
-   /**
-    * Set the messageDestinationReferences.
-    * 
-    * @param messageDestinationReferences the messageDestinationReferences.
-    * @throws IllegalArgumentException for a null messageDestinationReferences
-    */
-   @XmlElement(name="message-destination-ref")
-   public void setMessageDestinationReferences(MessageDestinationReferencesMetaData messageDestinationReferences)
-   {
-      if (messageDestinationReferences == null)
-         throw new IllegalArgumentException("Null messageDestinationReferences");
-      this.messageDestinationReferences = messageDestinationReferences;
-   }
-
-   /**
-    * Get the postConstructs.
-    * 
-    * @return the postConstructs.
-    */
-   public LifecycleCallbacksMetaData getPostConstructs()
-   {
-      return postConstructs;
-   }
-
-   /**
-    * Set the postConstructs.
-    * 
-    * @param postConstructs the postConstructs.
-    * @throws IllegalArgumentException for a null postConstructs
-    */
-   //@SchemaProperty(name="post-construct", noInterceptor=true)
-   @XmlElement(name="post-construct")
-   public void setPostConstructs(LifecycleCallbacksMetaData postConstructs)
-   {
-      if (postConstructs == null)
-         throw new IllegalArgumentException("Null postConstructs");
-      this.postConstructs = postConstructs;
-   }
-
-   /**
-    * Get the preDestroys.
-    * 
-    * @return the preDestroys.
-    */
-   public LifecycleCallbacksMetaData getPreDestroys()
-   {
-      return preDestroys;
-   }
-
-   /**
-    * Set the preDestroys.
-    * 
-    * @param preDestroys the preDestroys.
-    * @throws IllegalArgumentException for a null preDestroys
-    */
-   //@SchemaProperty(name="pre-destroy", noInterceptor=true)
-   @XmlElement(name="pre-destroy")
-   public void setPreDestroys(LifecycleCallbacksMetaData preDestroys)
-   {
-      if (preDestroys == null)
-         throw new IllegalArgumentException("Null preDestroys");
-      this.preDestroys = preDestroys;
-   }
-
-   /**
-    * Get the persistenceUnitRefs.
-    * 
-    * @return the persistenceUnitRefs.
-    */
-   public PersistenceUnitReferencesMetaData getPersistenceUnitRefs()
-   {
-      return persistenceUnitRefs;
-   }
-
-   /**
-    * Set the persistenceUnitRefs.
-    * 
-    * @param persistenceUnitRefs the persistenceUnitRefs.
-    * @throws IllegalArgumentException for a null persistenceUnitRefs
-    */
-   @XmlElement(name="persistence-unit-ref")
-   public void setPersistenceUnitRefs(PersistenceUnitReferencesMetaData persistenceUnitRefs)
-   {
-      if (persistenceUnitRefs == null)
-         throw new IllegalArgumentException("Null persistenceUnitRefs");
-      this.persistenceUnitRefs = persistenceUnitRefs;
-   }
-
-   public EJBReferenceMetaData getEjbReferenceByName(String name)
-   {
-      return AbstractMappedMetaData.getByName(name, getEjbReferences());
-   }
-
-   public EnvironmentEntryMetaData getEnvironmentEntryByName(String name)
-   {
-      return AbstractMappedMetaData.getByName(name, getEnvironmentEntries());
-   }
-
-   public MessageDestinationReferenceMetaData getMessageDestinationReferenceByName(String name)
-   {
-      return AbstractMappedMetaData.getByName(name, getMessageDestinationReferences());
-   }
-
-   public PersistenceUnitReferenceMetaData getPersistenceUnitReferenceByName(String name)
-   {
-      return AbstractMappedMetaData.getByName(name, getPersistenceUnitRefs());
-   }
-
-   public ResourceEnvironmentReferenceMetaData getResourceEnvironmentReferenceByName(String name)
-   {
-      return AbstractMappedMetaData.getByName(name, getResourceEnvironmentReferences());
-   }
-
-   public ResourceReferenceMetaData getResourceReferenceByName(String name)
-   {
-      return AbstractMappedMetaData.getByName(name, getResourceReferences());
-   }
-   public ServiceReferenceMetaData getServiceReferenceByName(String name)
-   {
-      ServiceReferencesMetaData srefs = this.getServiceReferences();
-      return AbstractMappedMetaData.getByName(name, srefs);
-   }
-
-   public void merge(RemoteEnvironment jbossEnv, RemoteEnvironment specEnv,
-         String overrideFile, String overridenFile, boolean mustOverride)
-   {
-      AnnotatedEJBReferencesMetaData annotatedEjbRefs = null;
-      EJBReferencesMetaData ejbRefs = null;
-      EJBReferencesMetaData jbossEjbRefs = null;
-      ServiceReferencesMetaData serviceRefs = null;
-      ServiceReferencesMetaData jbossServiceRefs = null;
-      ResourceReferencesMetaData resRefs = null;
-      ResourceReferencesMetaData jbossResRefs = null;
-      ResourceEnvironmentReferencesMetaData resEnvRefs = null;
-      ResourceEnvironmentReferencesMetaData jbossResEnvRefs = null;
-      MessageDestinationReferencesMetaData messageDestinationRefs = null;
-      MessageDestinationReferencesMetaData jbossMessageDestinationRefs = null;
-      PersistenceUnitReferencesMetaData persistenceUnitRefs = null;
-//      LifecycleCallbacksMetaData postConstructs = null;
-//      LifecycleCallbacksMetaData preDestroys = null;
-      
-      if(jbossEnv != null)
-      {
-         postConstructs = addAll(postConstructs, jbossEnv.getPostConstructs());
-         preDestroys = addAll(preDestroys, jbossEnv.getPreDestroys());
-      }
-      if(specEnv != null)
-      {
-         postConstructs = addAll(postConstructs, specEnv.getPostConstructs());
-         preDestroys = addAll(preDestroys, specEnv.getPreDestroys());
-      }
-      
-      if (specEnv != null)
-      {
-         annotatedEjbRefs = specEnv.getAnnotatedEjbReferences();
-         ejbRefs = specEnv.getEjbReferences();
-         serviceRefs = specEnv.getServiceReferences();
-         resRefs = specEnv.getResourceReferences();
-         resEnvRefs = specEnv.getResourceEnvironmentReferences();
-         messageDestinationRefs = specEnv.getMessageDestinationReferences();
-         persistenceUnitRefs = specEnv.getPersistenceUnitRefs();
-      }
-      
-      if (jbossEnv != null)
-      { 
-         jbossEjbRefs = jbossEnv.getEjbReferences();
-         jbossServiceRefs = jbossEnv.getServiceReferences();
-         jbossResRefs = jbossEnv.getResourceReferences();
-         jbossResEnvRefs = jbossEnv.getResourceEnvironmentReferences();
-         jbossMessageDestinationRefs = jbossEnv.getMessageDestinationReferences();
-      }
-      else
-      {
-         // Merge into this
-         jbossEjbRefs = getEjbReferences();
-         jbossServiceRefs = getServiceReferences();
-         jbossResRefs = getResourceReferences();
-         jbossResEnvRefs = getResourceEnvironmentReferences();
-         jbossMessageDestinationRefs = getMessageDestinationReferences();
-      }
-
-
-      EJBReferencesMetaData mergedEjbRefs = EJBReferencesMetaData.merge(jbossEjbRefs, ejbRefs, overrideFile, overridenFile, mustOverride);
-      if (mergedEjbRefs != null)
-         setEjbReferences(mergedEjbRefs);
-      
-      ServiceReferencesMetaData mergedServiceRefs = JBossServiceReferencesMetaData.merge(jbossServiceRefs, serviceRefs, overrideFile, overridenFile);
-      if (mergedServiceRefs != null)
-         setServiceReferences(mergedServiceRefs);
-
-      ResourceReferencesMetaData mergedResRefs = ResourceReferencesMetaData.merge(jbossResRefs, resRefs, overrideFile, overridenFile, mustOverride);
-      if (mergedResRefs != null)
-         setResourceReferences(mergedResRefs);
-
-      ResourceEnvironmentReferencesMetaData mergedResEnvRefs = ResourceEnvironmentReferencesMetaData.merge(jbossResEnvRefs, resEnvRefs, overrideFile, overridenFile);
-      if (mergedResEnvRefs != null)
-         setResourceEnvironmentReferences(mergedResEnvRefs);
-
-      MessageDestinationReferencesMetaData mergedMessageDestinationRefs = MessageDestinationReferencesMetaData.merge(jbossMessageDestinationRefs, messageDestinationRefs, "", "", mustOverride);
-      if (mergedMessageDestinationRefs != null)
-         setMessageDestinationReferences(mergedMessageDestinationRefs);
-      
-      if(specEnv != null)
-      {
-         EnvironmentEntriesMetaData envEntries = specEnv.getEnvironmentEntries();
-         if (envEntries != null)
-         {
-            EnvironmentEntriesMetaData thisEnv = this.getEnvironmentEntries();
-            if(thisEnv != null)
-               thisEnv.addAll(envEntries);
-            else
-               this.setEnvironmentEntries(envEntries);
-         }
-      }
-      if(jbossEnv != null)
-      {
-         EnvironmentEntriesMetaData envEntries = jbossEnv.getEnvironmentEntries();
-         if (envEntries != null)
-         {
-            EnvironmentEntriesMetaData thisEnv = this.getEnvironmentEntries();
-            if(thisEnv != null)
-               thisEnv.addAll(envEntries);
-            else
-               this.setEnvironmentEntries(envEntries);
-         }
-      }
-      
-      if (persistenceUnitRefs != null)
-         setPersistenceUnitRefs(persistenceUnitRefs);
-      
-      if(annotatedEjbRefs != null)
-         this.setAnnotatedEjbReferences(annotatedEjbRefs);
-   }
-}

Copied: projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java (from rev 72751, projects/metadata/trunk/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java)
===================================================================
--- projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java	                        (rev 0)
+++ projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java	2008-04-27 14:41:37 UTC (rev 72760)
@@ -0,0 +1,487 @@
+/*
+* 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.metadata.javaee.spec;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlTransient;
+
+import org.jboss.metadata.javaee.jboss.JBossServiceReferencesMetaData;
+import org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+import org.jboss.xb.annotations.JBossXmlCollection;
+import org.jboss.xb.annotations.JBossXmlModelGroup;
+
+/**
+ * References which are only available remote (for application clients).
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author <a href="carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision$
+ */
+ at JBossXmlModelGroup(name="jndiEnvironmentRefsGroup",
+      propOrder={
+         "environmentEntries", 
+         "ejbReferences",
+         "serviceReferences",
+         "resourceReferences", 
+         "resourceEnvironmentReferences",
+         "messageDestinationReferences",
+         "persistenceUnitRefs",
+         "postConstructs",
+         "preDestroys"})
+public class RemoteEnvironmentRefsGroupMetaData
+   implements Serializable, RemoteEnvironment, MutableRemoteEnvironment
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 2L;
+
+   /** The environment entries */
+   private EnvironmentEntriesMetaData environmentEntries;
+
+   /** @EJB references */
+   private AnnotatedEJBReferencesMetaData annotatedEjbReferences;
+
+   /** The ejb references */
+   private EJBReferencesMetaData ejbReferences;
+
+   /** The service references */
+   private ServiceReferencesMetaData serviceReferences;
+
+   /** The resource references */
+   private ResourceReferencesMetaData resourceReferences;
+   
+   /** The resource environment references */
+   private ResourceEnvironmentReferencesMetaData resourceEnvironmentReferences;
+   
+   /** The message destination references */
+   private MessageDestinationReferencesMetaData messageDestinationReferences;
+   
+   /** The persistence unit  reference */
+   private PersistenceUnitReferencesMetaData persistenceUnitRefs;
+
+   /** The post construct methods */
+   private LifecycleCallbacksMetaData postConstructs;
+   
+   /** The pre destroy methods */
+   private LifecycleCallbacksMetaData preDestroys;
+   
+   /**
+    * Create a new EnvironmentRefsGroupMetaData.
+    */
+   public RemoteEnvironmentRefsGroupMetaData()
+   {
+      // For serialization
+   }
+
+   private LifecycleCallbacksMetaData addAll(LifecycleCallbacksMetaData current, LifecycleCallbacksMetaData additions)
+   {
+      if(additions == null)
+         return current;
+      if(current == null)
+         current = new LifecycleCallbacksMetaData();
+      current.addAll(additions);
+      return current;
+   }
+   
+   /**
+    * Get the environmentEntries.
+    * 
+    * @return the environmentEntries.
+    */
+   public EnvironmentEntriesMetaData getEnvironmentEntries()
+   {
+      return environmentEntries;
+   }
+
+   /**
+    * Set the environmentEntries.
+    * 
+    * @param environmentEntries the environmentEntries.
+    * @throws IllegalArgumentException for a null environmentEntries
+    */
+   @XmlElement(name="env-entry")
+   public void setEnvironmentEntries(EnvironmentEntriesMetaData environmentEntries)
+   {
+      if (environmentEntries == null)
+         throw new IllegalArgumentException("Null environmentEntries");
+      this.environmentEntries = environmentEntries;
+   }
+
+   /**
+    * Get the ejbReferences.
+    * 
+    * @return the ejbReferences.
+    */
+   public EJBReferencesMetaData getEjbReferences()
+   {
+      return ejbReferences;
+   }
+
+   /**
+    * Set the ejbReferences.
+    * 
+    * @param ejbReferences the ejbReferences.
+    * @throws IllegalArgumentException for a null ejbReferences
+    */
+   @XmlElement(name="ejb-ref")
+   public void setEjbReferences(EJBReferencesMetaData ejbReferences)
+   {
+      if (ejbReferences == null)
+         throw new IllegalArgumentException("Null ejbReferences");
+      this.ejbReferences = ejbReferences;
+   }
+
+   @XmlTransient
+   public AnnotatedEJBReferencesMetaData getAnnotatedEjbReferences()
+   {
+      return annotatedEjbReferences;
+   }
+   @XmlTransient
+   public void setAnnotatedEjbReferences(AnnotatedEJBReferencesMetaData annotatedEjbReferences)
+   {
+      if (annotatedEjbReferences == null)
+         throw new IllegalArgumentException("Null annotatedEjbReferences");
+      this.annotatedEjbReferences = annotatedEjbReferences;
+   }
+
+   /**
+    * Get the serviceReferences.
+    * 
+    * @return the serviceReferences.
+    */
+   public ServiceReferencesMetaData getServiceReferences()
+   {
+      return serviceReferences;
+   }
+   
+   /**
+    * Set the serviceReferences.
+    * 
+    * @param serviceReferences the serviceReferences.
+    * @throws IllegalArgumentException for a null serviceReferences
+    */
+   @JBossXmlCollection(type=ServiceReferencesMetaData.class)
+   @XmlElement(name="service-ref", type=ServiceReferenceMetaData.class)
+   public void setServiceReferences(ServiceReferencesMetaData serviceReferences)
+   {
+      this.serviceReferences = (ServiceReferencesMetaData)serviceReferences;
+   }
+
+   /**
+    * Get the resourceReferences.
+    * 
+    * @return the resourceReferences.
+    */
+   public ResourceReferencesMetaData getResourceReferences()
+   {
+      return resourceReferences;
+   }
+
+   /**
+    * Set the resourceReferences.
+    * 
+    * @param resourceReferences the resourceReferences.
+    * @throws IllegalArgumentException for a null resourceReferences
+    */
+   @XmlElement(name="resource-ref")
+   public void setResourceReferences(ResourceReferencesMetaData resourceReferences)
+   {
+      if (resourceReferences == null)
+         throw new IllegalArgumentException("Null resourceReferences");
+      this.resourceReferences = resourceReferences;
+   }
+
+   /**
+    * Get the resourceEnvironmentReferences.
+    * 
+    * @return the resourceEnvironmentReferences.
+    */
+   public ResourceEnvironmentReferencesMetaData getResourceEnvironmentReferences()
+   {
+      return resourceEnvironmentReferences;
+   }
+
+   /**
+    * Set the resourceEnvironmentReferences.
+    * 
+    * @param resourceEnvironmentReferences the resourceEnvironmentReferences.
+    * @throws IllegalArgumentException for a null resourceEnvironmentReferences
+    */
+   @XmlElement(name="resource-env-ref")
+   public void setResourceEnvironmentReferences(ResourceEnvironmentReferencesMetaData resourceEnvironmentReferences)
+   {
+      if (resourceEnvironmentReferences == null)
+         throw new IllegalArgumentException("Null resourceEnvironmentReferences");
+      this.resourceEnvironmentReferences = resourceEnvironmentReferences;
+   }
+
+   /**
+    * Get the messageDestinationReferences.
+    * 
+    * @return the messageDestinationReferences.
+    */
+   public MessageDestinationReferencesMetaData getMessageDestinationReferences()
+   {
+      return messageDestinationReferences;
+   }
+
+   /**
+    * Set the messageDestinationReferences.
+    * 
+    * @param messageDestinationReferences the messageDestinationReferences.
+    * @throws IllegalArgumentException for a null messageDestinationReferences
+    */
+   @XmlElement(name="message-destination-ref")
+   public void setMessageDestinationReferences(MessageDestinationReferencesMetaData messageDestinationReferences)
+   {
+      if (messageDestinationReferences == null)
+         throw new IllegalArgumentException("Null messageDestinationReferences");
+      this.messageDestinationReferences = messageDestinationReferences;
+   }
+
+   /**
+    * Get the postConstructs.
+    * 
+    * @return the postConstructs.
+    */
+   public LifecycleCallbacksMetaData getPostConstructs()
+   {
+      return postConstructs;
+   }
+
+   /**
+    * Set the postConstructs.
+    * 
+    * @param postConstructs the postConstructs.
+    * @throws IllegalArgumentException for a null postConstructs
+    */
+   //@SchemaProperty(name="post-construct", noInterceptor=true)
+   @XmlElement(name="post-construct")
+   public void setPostConstructs(LifecycleCallbacksMetaData postConstructs)
+   {
+      if (postConstructs == null)
+         throw new IllegalArgumentException("Null postConstructs");
+      this.postConstructs = postConstructs;
+   }
+
+   /**
+    * Get the preDestroys.
+    * 
+    * @return the preDestroys.
+    */
+   public LifecycleCallbacksMetaData getPreDestroys()
+   {
+      return preDestroys;
+   }
+
+   /**
+    * Set the preDestroys.
+    * 
+    * @param preDestroys the preDestroys.
+    * @throws IllegalArgumentException for a null preDestroys
+    */
+   //@SchemaProperty(name="pre-destroy", noInterceptor=true)
+   @XmlElement(name="pre-destroy")
+   public void setPreDestroys(LifecycleCallbacksMetaData preDestroys)
+   {
+      if (preDestroys == null)
+         throw new IllegalArgumentException("Null preDestroys");
+      this.preDestroys = preDestroys;
+   }
+
+   /**
+    * Get the persistenceUnitRefs.
+    * 
+    * @return the persistenceUnitRefs.
+    */
+   public PersistenceUnitReferencesMetaData getPersistenceUnitRefs()
+   {
+      return persistenceUnitRefs;
+   }
+
+   /**
+    * Set the persistenceUnitRefs.
+    * 
+    * @param persistenceUnitRefs the persistenceUnitRefs.
+    * @throws IllegalArgumentException for a null persistenceUnitRefs
+    */
+   @XmlElement(name="persistence-unit-ref")
+   public void setPersistenceUnitRefs(PersistenceUnitReferencesMetaData persistenceUnitRefs)
+   {
+      if (persistenceUnitRefs == null)
+         throw new IllegalArgumentException("Null persistenceUnitRefs");
+      this.persistenceUnitRefs = persistenceUnitRefs;
+   }
+
+   public EJBReferenceMetaData getEjbReferenceByName(String name)
+   {
+      return AbstractMappedMetaData.getByName(name, getEjbReferences());
+   }
+
+   public EnvironmentEntryMetaData getEnvironmentEntryByName(String name)
+   {
+      return AbstractMappedMetaData.getByName(name, getEnvironmentEntries());
+   }
+
+   public MessageDestinationReferenceMetaData getMessageDestinationReferenceByName(String name)
+   {
+      return AbstractMappedMetaData.getByName(name, getMessageDestinationReferences());
+   }
+
+   public PersistenceUnitReferenceMetaData getPersistenceUnitReferenceByName(String name)
+   {
+      return AbstractMappedMetaData.getByName(name, getPersistenceUnitRefs());
+   }
+
+   public ResourceEnvironmentReferenceMetaData getResourceEnvironmentReferenceByName(String name)
+   {
+      return AbstractMappedMetaData.getByName(name, getResourceEnvironmentReferences());
+   }
+
+   public ResourceReferenceMetaData getResourceReferenceByName(String name)
+   {
+      return AbstractMappedMetaData.getByName(name, getResourceReferences());
+   }
+   public ServiceReferenceMetaData getServiceReferenceByName(String name)
+   {
+      ServiceReferencesMetaData srefs = this.getServiceReferences();
+      return AbstractMappedMetaData.getByName(name, srefs);
+   }
+
+   public void merge(RemoteEnvironment jbossEnv, RemoteEnvironment specEnv,
+         String overrideFile, String overridenFile, boolean mustOverride)
+   {
+      AnnotatedEJBReferencesMetaData annotatedEjbRefs = null;
+      EJBReferencesMetaData ejbRefs = null;
+      EJBReferencesMetaData jbossEjbRefs = null;
+      ServiceReferencesMetaData serviceRefs = null;
+      ServiceReferencesMetaData jbossServiceRefs = null;
+      ResourceReferencesMetaData resRefs = null;
+      ResourceReferencesMetaData jbossResRefs = null;
+      ResourceEnvironmentReferencesMetaData resEnvRefs = null;
+      ResourceEnvironmentReferencesMetaData jbossResEnvRefs = null;
+      MessageDestinationReferencesMetaData messageDestinationRefs = null;
+      MessageDestinationReferencesMetaData jbossMessageDestinationRefs = null;
+      PersistenceUnitReferencesMetaData persistenceUnitRefs = null;
+//      LifecycleCallbacksMetaData postConstructs = null;
+//      LifecycleCallbacksMetaData preDestroys = null;
+      
+      if(jbossEnv != null)
+      {
+         postConstructs = addAll(postConstructs, jbossEnv.getPostConstructs());
+         preDestroys = addAll(preDestroys, jbossEnv.getPreDestroys());
+      }
+      if(specEnv != null)
+      {
+         postConstructs = addAll(postConstructs, specEnv.getPostConstructs());
+         preDestroys = addAll(preDestroys, specEnv.getPreDestroys());
+      }
+      
+      if (specEnv != null)
+      {
+         annotatedEjbRefs = specEnv.getAnnotatedEjbReferences();
+         ejbRefs = specEnv.getEjbReferences();
+         serviceRefs = specEnv.getServiceReferences();
+         resRefs = specEnv.getResourceReferences();
+         resEnvRefs = specEnv.getResourceEnvironmentReferences();
+         messageDestinationRefs = specEnv.getMessageDestinationReferences();
+         persistenceUnitRefs = specEnv.getPersistenceUnitRefs();
+      }
+      
+      if (jbossEnv != null)
+      { 
+         jbossEjbRefs = jbossEnv.getEjbReferences();
+         jbossServiceRefs = jbossEnv.getServiceReferences();
+         jbossResRefs = jbossEnv.getResourceReferences();
+         jbossResEnvRefs = jbossEnv.getResourceEnvironmentReferences();
+         jbossMessageDestinationRefs = jbossEnv.getMessageDestinationReferences();
+      }
+      else
+      {
+         // Merge into this
+         jbossEjbRefs = getEjbReferences();
+         jbossServiceRefs = getServiceReferences();
+         jbossResRefs = getResourceReferences();
+         jbossResEnvRefs = getResourceEnvironmentReferences();
+         jbossMessageDestinationRefs = getMessageDestinationReferences();
+      }
+
+
+      EJBReferencesMetaData mergedEjbRefs = EJBReferencesMetaData.merge(jbossEjbRefs, ejbRefs, overrideFile, overridenFile, mustOverride);
+      if (mergedEjbRefs != null)
+         setEjbReferences(mergedEjbRefs);
+      
+      ServiceReferencesMetaData mergedServiceRefs = JBossServiceReferencesMetaData.merge(jbossServiceRefs, serviceRefs, overrideFile, overridenFile);
+      if (mergedServiceRefs != null)
+         setServiceReferences(mergedServiceRefs);
+
+      ResourceReferencesMetaData mergedResRefs = ResourceReferencesMetaData.merge(jbossResRefs, resRefs, overrideFile, overridenFile, mustOverride);
+      if (mergedResRefs != null)
+         setResourceReferences(mergedResRefs);
+
+      ResourceEnvironmentReferencesMetaData mergedResEnvRefs = ResourceEnvironmentReferencesMetaData.merge(jbossResEnvRefs, resEnvRefs, overrideFile, overridenFile);
+      if (mergedResEnvRefs != null)
+         setResourceEnvironmentReferences(mergedResEnvRefs);
+
+      MessageDestinationReferencesMetaData mergedMessageDestinationRefs = MessageDestinationReferencesMetaData.merge(jbossMessageDestinationRefs, messageDestinationRefs, "", "", mustOverride);
+      if (mergedMessageDestinationRefs != null)
+         setMessageDestinationReferences(mergedMessageDestinationRefs);
+      
+      if(specEnv != null)
+      {
+         EnvironmentEntriesMetaData envEntries = specEnv.getEnvironmentEntries();
+         if (envEntries != null)
+         {
+            EnvironmentEntriesMetaData thisEnv = this.getEnvironmentEntries();
+            if(thisEnv != null)
+               thisEnv.addAll(envEntries);
+            else
+               this.setEnvironmentEntries(envEntries);
+         }
+      }
+      if(jbossEnv != null)
+      {
+         EnvironmentEntriesMetaData envEntries = jbossEnv.getEnvironmentEntries();
+         if (envEntries != null)
+         {
+            if(environmentEntries == null)
+               environmentEntries = new EnvironmentEntriesMetaData();
+            // Merge the entries with existing entries
+            for(EnvironmentEntryMetaData entry : envEntries)
+            {
+               EnvironmentEntryMetaData thisEntry = environmentEntries.get(entry.getEnvEntryName());
+               if(thisEntry != null)
+                  thisEntry.merge(entry, null);
+               else
+                  environmentEntries.add(entry);
+            }
+         }
+      }
+      
+      if (persistenceUnitRefs != null)
+         setPersistenceUnitRefs(persistenceUnitRefs);
+      
+      if(annotatedEjbRefs != null)
+         this.setAnnotatedEjbReferences(annotatedEjbRefs);
+   }
+}

Deleted: projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/ResourceInjectionMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/javaee/spec/ResourceInjectionMetaData.java	2008-04-26 15:30:20 UTC (rev 72750)
+++ projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/ResourceInjectionMetaData.java	2008-04-27 14:41:37 UTC (rev 72760)
@@ -1,212 +0,0 @@
-/*
-* 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.metadata.javaee.spec;
-
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlTransient;
-
-import org.jboss.metadata.javaee.spec.ResourceInjectionTargetMetaData;
-import org.jboss.metadata.javaee.support.NamedMetaData;
-import org.jboss.xb.annotations.JBossXmlNsPrefix;
-
-/**
- * ResourceInjectionMetaData.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public abstract class ResourceInjectionMetaData extends NamedMetaData
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = 6333738851813890701L;
-
-   /** The mapped name */
-   private String mappedName;
-   private String resolvedJndiName;
-
-   /** The injection targets */
-   private Set<ResourceInjectionTargetMetaData> injectionTargets;
-
-   /** The ignore dependency */
-   private EmptyMetaData ignoreDependency;
-   
-   /**
-    * Create a new ResourceInjectionMetaData.
-    */
-   public ResourceInjectionMetaData()
-   {
-      // For serialization
-   }
-
-   /**
-    * Get the jndiName.
-    * 
-    * @return the jndiName.
-    */
-   public String getJndiName()
-   {
-      return getMappedName();
-   }
-
-   /**
-    * Set the jndiName.
-    * 
-    * @param jndiName the jndiName.
-    * @throws IllegalArgumentException for a null jndiName
-    */
-   //@SchemaProperty(mandatory=false)
-   @XmlElement(required=false)
-   public void setJndiName(String jndiName)
-   {
-      setMappedName(jndiName);
-   }
-   
-   /**
-    * Get the mappedName.
-    * 
-    * @return the mappedName.
-    */
-   public String getMappedName()
-   {
-      return mappedName;
-   }
-
-   /**
-    * Set the mappedName.
-    * 
-    * @param mappedName the mappedName.
-    * @throws IllegalArgumentException for a null mappedName
-    */
-   //@SchemaProperty(mandatory=false)
-   @XmlElement(required=false)
-   //@JBossXmlNsPrefix(prefix="jee", schemaTargetIfNotMapped=true)
-   public void setMappedName(String mappedName)
-   {
-      if (mappedName == null)
-         throw new IllegalArgumentException("Null mappedName");
-      this.mappedName = mappedName;
-   }
-
-   /**
-    * An unmanaged runtime jndi name for the resource. Used by deployers to
-    * propagate resolved resource location.
-    * 
-    * @return
-    */
-   public String getResolvedJndiName()
-   {
-      return resolvedJndiName;
-   }
-   @XmlTransient
-   public void setResolvedJndiName(String resolvedJndiName)
-   {
-      this.resolvedJndiName = resolvedJndiName;
-   }
-
-   /**
-    * Get the injectionTargets.
-    * 
-    * @return the injectionTargets.
-    */
-   public Set<ResourceInjectionTargetMetaData> getInjectionTargets()
-   {
-      return injectionTargets;
-   }
-
-   /**
-    * Set the injectionTargets.
-    * 
-    * @param injectionTargets the injectionTargets.
-    * @throws IllegalArgumentException for a null injectionTargets
-    */
-   //@SchemaProperty(name="injection-target", impl=NonNullLinkedHashSet.class, mandatory=false)
-   @XmlElement(name="injection-target", /*type=NonNullLinkedHashSet.class,*/ required=false)
-   //@JBossXmlNsPrefix(prefix="jee", schemaTargetIfNotMapped=true)
-   public void setInjectionTargets(Set<ResourceInjectionTargetMetaData> injectionTargets)
-   {
-      if (injectionTargets == null)
-         throw new IllegalArgumentException("Null injectionTargets");
-      this.injectionTargets = injectionTargets;
-   }
-
-   /**
-    * Get the ignoreDependency.
-    * 
-    * @return the ignoreDependency.
-    */
-   public EmptyMetaData getIgnoreDependency()
-   {
-      return ignoreDependency;
-   }
-
-   /**
-    * Set the ignoreDependency.
-    * 
-    * @param ignoreDependency the ignoreDependency.
-    * @throws IllegalArgumentException for a null ignoreDependency
-    */
-   //@SchemaProperty(mandatory=false)
-   @XmlElement(required=false)
-   public void setIgnoreDependency(EmptyMetaData ignoreDependency)
-   {
-      if (ignoreDependency == null)
-         throw new IllegalArgumentException("Null ignoreDependency");
-      this.ignoreDependency = ignoreDependency;
-   }
-   
-   /**
-    * Get whether the dependency is ignored
-    * 
-    * @return true when the dependency is ignored
-    */
-   public boolean isDependencyIgnored()
-   {
-      return ignoreDependency != null;
-   }
-   
-   /**
-    * Merge the contents of override with original into this.
-    * 
-    * @param override data which overrides original
-    * @param original the original data
-    */
-   public void merge(ResourceInjectionMetaData override, ResourceInjectionMetaData original)
-   {
-      super.merge(override, original);
-      if (override != null && override.mappedName != null)
-         setMappedName(override.mappedName);
-      else if (original.mappedName != null)
-         setMappedName(original.mappedName);
-      if (override != null && override.ignoreDependency != null)
-         setIgnoreDependency(override.ignoreDependency);
-      else if (original.ignoreDependency != null)
-         setIgnoreDependency(original.ignoreDependency);
-      
-      // TODO proper merge
-      if (override != null && override.injectionTargets != null)
-         setInjectionTargets(override.injectionTargets);
-      else if (original.injectionTargets != null)
-         setInjectionTargets(original.injectionTargets);
-   }
-}

Copied: projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/ResourceInjectionMetaData.java (from rev 72751, projects/metadata/trunk/src/main/java/org/jboss/metadata/javaee/spec/ResourceInjectionMetaData.java)
===================================================================
--- projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/ResourceInjectionMetaData.java	                        (rev 0)
+++ projects/metadata/tags/1.0.0.Beta10/src/main/java/org/jboss/metadata/javaee/spec/ResourceInjectionMetaData.java	2008-04-27 14:41:37 UTC (rev 72760)
@@ -0,0 +1,212 @@
+/*
+* 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.metadata.javaee.spec;
+
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlTransient;
+
+import org.jboss.metadata.javaee.spec.ResourceInjectionTargetMetaData;
+import org.jboss.metadata.javaee.support.NamedMetaData;
+import org.jboss.xb.annotations.JBossXmlNsPrefix;
+
+/**
+ * ResourceInjectionMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class ResourceInjectionMetaData extends NamedMetaData
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 6333738851813890701L;
+
+   /** The mapped name */
+   private String mappedName;
+   private String resolvedJndiName;
+
+   /** The injection targets */
+   private Set<ResourceInjectionTargetMetaData> injectionTargets;
+
+   /** The ignore dependency */
+   private EmptyMetaData ignoreDependency;
+   
+   /**
+    * Create a new ResourceInjectionMetaData.
+    */
+   public ResourceInjectionMetaData()
+   {
+      // For serialization
+   }
+
+   /**
+    * Get the jndiName.
+    * 
+    * @return the jndiName.
+    */
+   public String getJndiName()
+   {
+      return getMappedName();
+   }
+
+   /**
+    * Set the jndiName.
+    * 
+    * @param jndiName the jndiName.
+    * @throws IllegalArgumentException for a null jndiName
+    */
+   //@SchemaProperty(mandatory=false)
+   @XmlElement(required=false)
+   public void setJndiName(String jndiName)
+   {
+      setMappedName(jndiName);
+   }
+   
+   /**
+    * Get the mappedName.
+    * 
+    * @return the mappedName.
+    */
+   public String getMappedName()
+   {
+      return mappedName;
+   }
+
+   /**
+    * Set the mappedName.
+    * 
+    * @param mappedName the mappedName.
+    * @throws IllegalArgumentException for a null mappedName
+    */
+   //@SchemaProperty(mandatory=false)
+   @XmlElement(required=false)
+   //@JBossXmlNsPrefix(prefix="jee", schemaTargetIfNotMapped=true)
+   public void setMappedName(String mappedName)
+   {
+      if (mappedName == null)
+         throw new IllegalArgumentException("Null mappedName");
+      this.mappedName = mappedName;
+   }
+
+   /**
+    * An unmanaged runtime jndi name for the resource. Used by deployers to
+    * propagate resolved resource location.
+    * 
+    * @return
+    */
+   public String getResolvedJndiName()
+   {
+      return resolvedJndiName;
+   }
+   @XmlTransient
+   public void setResolvedJndiName(String resolvedJndiName)
+   {
+      this.resolvedJndiName = resolvedJndiName;
+   }
+
+   /**
+    * Get the injectionTargets.
+    * 
+    * @return the injectionTargets.
+    */
+   public Set<ResourceInjectionTargetMetaData> getInjectionTargets()
+   {
+      return injectionTargets;
+   }
+
+   /**
+    * Set the injectionTargets.
+    * 
+    * @param injectionTargets the injectionTargets.
+    * @throws IllegalArgumentException for a null injectionTargets
+    */
+   //@SchemaProperty(name="injection-target", impl=NonNullLinkedHashSet.class, mandatory=false)
+   @XmlElement(name="injection-target", /*type=NonNullLinkedHashSet.class,*/ required=false)
+   //@JBossXmlNsPrefix(prefix="jee", schemaTargetIfNotMapped=true)
+   public void setInjectionTargets(Set<ResourceInjectionTargetMetaData> injectionTargets)
+   {
+      if (injectionTargets == null)
+         throw new IllegalArgumentException("Null injectionTargets");
+      this.injectionTargets = injectionTargets;
+   }
+
+   /**
+    * Get the ignoreDependency.
+    * 
+    * @return the ignoreDependency.
+    */
+   public EmptyMetaData getIgnoreDependency()
+   {
+      return ignoreDependency;
+   }
+
+   /**
+    * Set the ignoreDependency.
+    * 
+    * @param ignoreDependency the ignoreDependency.
+    * @throws IllegalArgumentException for a null ignoreDependency
+    */
+   //@SchemaProperty(mandatory=false)
+   @XmlElement(required=false)
+   public void setIgnoreDependency(EmptyMetaData ignoreDependency)
+   {
+      if (ignoreDependency == null)
+         throw new IllegalArgumentException("Null ignoreDependency");
+      this.ignoreDependency = ignoreDependency;
+   }
+   
+   /**
+    * Get whether the dependency is ignored
+    * 
+    * @return true when the dependency is ignored
+    */
+   public boolean isDependencyIgnored()
+   {
+      return ignoreDependency != null;
+   }
+   
+   /**
+    * Merge the contents of override with original into this.
+    * 
+    * @param override data which overrides original
+    * @param original the original data
+    */
+   public void merge(ResourceInjectionMetaData override, ResourceInjectionMetaData original)
+   {
+      super.merge(override, original);
+      if (override != null && override.mappedName != null)
+         setMappedName(override.mappedName);
+      else if (original != null && original.mappedName != null)
+         setMappedName(original.mappedName);
+      if (override != null && override.ignoreDependency != null)
+         setIgnoreDependency(override.ignoreDependency);
+      else if (original != null && original.ignoreDependency != null)
+         setIgnoreDependency(original.ignoreDependency);
+      
+      // TODO proper merge
+      if (override != null && override.injectionTargets != null)
+         setInjectionTargets(override.injectionTargets);
+      else if (original != null && original.injectionTargets != null)
+         setInjectionTargets(original.injectionTargets);
+   }
+}

Deleted: projects/metadata/tags/1.0.0.Beta10/src/test/java/org/jboss/test/metadata/annotation/client/AnnotationClientUnitTestCase.java
===================================================================
--- projects/metadata/trunk/src/test/java/org/jboss/test/metadata/annotation/client/AnnotationClientUnitTestCase.java	2008-04-26 15:30:20 UTC (rev 72750)
+++ projects/metadata/tags/1.0.0.Beta10/src/test/java/org/jboss/test/metadata/annotation/client/AnnotationClientUnitTestCase.java	2008-04-27 14:41:37 UTC (rev 72760)
@@ -1,176 +0,0 @@
-/*
- * 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.test.metadata.annotation.client;
-
-import java.lang.reflect.AnnotatedElement;
-import java.util.Collection;
-import java.util.Set;
-
-import org.jboss.metadata.annotation.creator.client.ApplicationClient5MetaDataCreator;
-import org.jboss.metadata.annotation.finder.AnnotationFinder;
-import org.jboss.metadata.annotation.finder.DefaultAnnotationFinder;
-import org.jboss.metadata.client.jboss.JBossClient5DTDMetaData;
-import org.jboss.metadata.client.spec.AnnotationMergedView;
-import org.jboss.metadata.client.spec.ApplicationClient14DTDMetaData;
-import org.jboss.metadata.client.spec.ApplicationClient14MetaData;
-import org.jboss.metadata.client.spec.ApplicationClient5MetaData;
-import org.jboss.metadata.ejb.jboss.JBoss50DTDMetaData;
-import org.jboss.metadata.ejb.jboss.JBoss50MetaData;
-import org.jboss.metadata.ejb.spec.EjbJar20MetaData;
-import org.jboss.metadata.ejb.spec.EjbJar21MetaData;
-import org.jboss.metadata.ejb.spec.EjbJar30MetaData;
-import org.jboss.metadata.javaee.spec.AnnotatedEJBReferenceMetaData;
-import org.jboss.metadata.javaee.spec.AnnotatedEJBReferencesMetaData;
-import org.jboss.metadata.javaee.spec.EJBReferenceMetaData;
-import org.jboss.metadata.javaee.spec.EnvironmentEntryMetaData;
-import org.jboss.metadata.javaee.spec.LifecycleCallbackMetaData;
-import org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData;
-import org.jboss.metadata.javaee.spec.MessageDestinationMetaData;
-import org.jboss.metadata.javaee.spec.ResourceEnvironmentReferenceMetaData;
-import org.jboss.metadata.javaee.spec.ResourceInjectionTargetMetaData;
-import org.jboss.metadata.javaee.spec.ResourceReferenceMetaData;
-import org.jboss.test.metadata.annotation.client.basic.Client;
-import org.jboss.test.metadata.annotation.client.basic.ResourceIF;
-import org.jboss.test.metadata.common.PackageScanner;
-import org.jboss.test.metadata.common.ScanPackage;
-import org.jboss.test.metadata.javaee.AbstractJavaEEMetaDataTest;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
-import org.omg.CORBA.ORB;
-
-/**
- * @author Scott.Stark at jboss.org
- * @version $Revision:$
- */
-public class AnnotationClientUnitTestCase extends AbstractJavaEEMetaDataTest
-{
-   public static SchemaBindingResolver initResolver()
-   {
-      DefaultSchemaResolver resolver = new DefaultSchemaResolver();
-      
-      resolver.addClassBindingForLocation("application-client_1_3.dtd", ApplicationClient14DTDMetaData.class);
-      resolver.addClassBindingForLocation("application-client_1_4.xsd", ApplicationClient14MetaData.class);
-      resolver.addClassBindingForLocation("application-client_5.xsd", ApplicationClient5MetaData.class);
-      resolver.addClassBindingForLocation("jboss-client", JBossClient5DTDMetaData.class);
-      return resolver;
-   }
-
-   public AnnotationClientUnitTestCase(String name)
-   {
-      super(name);
-   }
-
-   @SuppressWarnings("unchecked")
-   @ScanPackage("org.jboss.test.metadata.annotation.client.basic")
-   public void testApplicationClientProcessor()
-      throws Exception
-   {
-      AnnotationFinder<AnnotatedElement> finder = new DefaultAnnotationFinder<AnnotatedElement>();
-      
-      Collection<Class<?>> classes = PackageScanner.loadClasses();
-      System.out.println("Processing classes: "+classes);
-      ApplicationClient5MetaDataCreator creator = new ApplicationClient5MetaDataCreator(finder);
-      ApplicationClient5MetaData clientMD = creator.create(classes);
-      System.out.println(clientMD.getAnnotatedEjbReferences());
-      assertEquals(3, clientMD.getAnnotatedEjbReferences().size());
-
-      AnnotatedEJBReferenceMetaData resourceMethodBean = clientMD.getAnnotatedEjbReferences().get("resourceMethodBean");
-      assertNotNull(resourceMethodBean);
-      assertEquals(ResourceIF.class, resourceMethodBean.getBeanInterface());
-      assertEquals("ResourceOnMethodBean", resourceMethodBean.getLink());
-      Set<ResourceInjectionTargetMetaData> resourceMethodBeanTargets = resourceMethodBean.getInjectionTargets();
-      assertNotNull(resourceMethodBeanTargets);
-      assertEquals(1, resourceMethodBeanTargets.size());
-      ResourceInjectionTargetMetaData method = resourceMethodBeanTargets.iterator().next();
-      assertEquals(Client.class.getName(), method.getInjectionTargetClass());
-      assertEquals("setResourceMethodBean", method.getInjectionTargetName());
-
-      AnnotatedEJBReferenceMetaData resourceFieldBean = clientMD.getAnnotatedEjbReferences().get("resourceFieldBean");
-      assertNotNull(resourceFieldBean);
-      assertEquals("ResourceOnFieldBean", resourceFieldBean.getLink());
-      Set<ResourceInjectionTargetMetaData> resourceFieldBeanTargets = resourceFieldBean.getInjectionTargets();
-      assertNotNull(resourceFieldBeanTargets);
-      assertEquals(1, resourceFieldBeanTargets.size());
-      ResourceInjectionTargetMetaData field = resourceFieldBeanTargets.iterator().next();
-      assertEquals(Client.class.getName(), field.getInjectionTargetClass());
-      assertEquals("resourceFieldBean", field.getInjectionTargetName());
-
-      AnnotatedEJBReferenceMetaData resourceClassBean = clientMD.getAnnotatedEjbReferences().get("ejb/resourceClassBean");
-      assertNotNull(resourceClassBean);
-      assertEquals("ResourcesOnClassBean", resourceClassBean.getLink());
-      assertEquals("refs/resources/ResourcesOnClassBean", resourceClassBean.getMappedName());
-      assertEquals("refs/resources/ResourcesOnClassBean", resourceClassBean.getJndiName());
-
-      // ORB maps to a resource-env-ref
-      ResourceEnvironmentReferenceMetaData orbRes = clientMD.getResourceEnvironmentReferenceByName("orb");
-      System.out.println(clientMD.getResourceEnvironmentReferences());
-      assertNotNull(orbRes);
-      assertEquals(ORB.class.getName(), orbRes.getType());
-   }
-   @ScanPackage("org.jboss.test.metadata.annotation.client.basic")
-   public void testXmlMerge()
-      throws Exception
-   {
-      AnnotationFinder<AnnotatedElement> finder = new DefaultAnnotationFinder<AnnotatedElement>();
-      Collection<Class<?>> classes = PackageScanner.loadClasses();
-      System.out.println("Processing classes: "+classes);
-      ApplicationClient5MetaDataCreator creator = new ApplicationClient5MetaDataCreator(finder);
-      ApplicationClient5MetaData clientMD = creator.create(classes);
-      
-      ApplicationClient5MetaData xmlMD = super.unmarshal(ApplicationClient5MetaData.class);
-      ApplicationClient5MetaData merged = new ApplicationClient5MetaData();
-      AnnotationMergedView.merge(merged, xmlMD, clientMD);
-
-      EnvironmentEntryMetaData msg = merged.getEnvironmentEntryByName("msg");
-      assertNotNull(msg);
-      assertEquals("java.lang.String", msg.getType());
-      assertEquals("how are you?", msg.getValue());
-
-      LifecycleCallbacksMetaData postConstructs = merged.getPostConstructs();
-      assertNotNull(postConstructs);
-      assertEquals(1, postConstructs.size());
-      LifecycleCallbackMetaData pc0 = postConstructs.get(0);
-      assertEquals("postConstruct", pc0.getMethodName());
-
-      LifecycleCallbacksMetaData preDestroys = merged.getPreDestroys();
-      assertNotNull(preDestroys);
-      assertEquals(1, preDestroys.size());
-      LifecycleCallbackMetaData pd0 = preDestroys.get(0);
-      assertEquals("preDestroy", pd0.getMethodName());
-
-      assertEquals("org.jboss.ejb3.test.applicationclient.client.TestCallbackHandler", merged.getCallbackHandler());
-
-      // ORB maps to a resource-env-ref
-      ResourceEnvironmentReferenceMetaData orbRes = merged.getResourceEnvironmentReferenceByName("orb");
-      System.out.println(clientMD.getResourceEnvironmentReferences());
-      assertNotNull(orbRes);
-      assertEquals(ORB.class.getName(), orbRes.getType());
-      ResourceEnvironmentReferenceMetaData messageReplier = merged.getResourceEnvironmentReferenceByName("messageReplier");
-      assertNotNull(messageReplier);
-      assertEquals("javax.jms.Queue", messageReplier.getType());
-
-      MessageDestinationMetaData md = merged.getMessageDestinationByName("MY-QUEUE");
-      assertNotNull(md);
-      assertEquals("queue/testQueue", md.getJndiName());
-      assertEquals("queue/testQueue", md.getMappedName());
-   }
-}

Copied: projects/metadata/tags/1.0.0.Beta10/src/test/java/org/jboss/test/metadata/annotation/client/AnnotationClientUnitTestCase.java (from rev 72757, projects/metadata/trunk/src/test/java/org/jboss/test/metadata/annotation/client/AnnotationClientUnitTestCase.java)
===================================================================
--- projects/metadata/tags/1.0.0.Beta10/src/test/java/org/jboss/test/metadata/annotation/client/AnnotationClientUnitTestCase.java	                        (rev 0)
+++ projects/metadata/tags/1.0.0.Beta10/src/test/java/org/jboss/test/metadata/annotation/client/AnnotationClientUnitTestCase.java	2008-04-27 14:41:37 UTC (rev 72760)
@@ -0,0 +1,234 @@
+/*
+ * 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.test.metadata.annotation.client;
+
+import java.lang.reflect.AnnotatedElement;
+import java.util.Collection;
+import java.util.Set;
+
+import org.jboss.metadata.annotation.creator.client.ApplicationClient5MetaDataCreator;
+import org.jboss.metadata.annotation.finder.AnnotationFinder;
+import org.jboss.metadata.annotation.finder.DefaultAnnotationFinder;
+import org.jboss.metadata.client.jboss.JBossClient5DTDMetaData;
+import org.jboss.metadata.client.spec.AnnotationMergedView;
+import org.jboss.metadata.client.spec.ApplicationClient14DTDMetaData;
+import org.jboss.metadata.client.spec.ApplicationClient14MetaData;
+import org.jboss.metadata.client.spec.ApplicationClient5MetaData;
+import org.jboss.metadata.ejb.jboss.JBoss50DTDMetaData;
+import org.jboss.metadata.ejb.jboss.JBoss50MetaData;
+import org.jboss.metadata.ejb.spec.EjbJar20MetaData;
+import org.jboss.metadata.ejb.spec.EjbJar21MetaData;
+import org.jboss.metadata.ejb.spec.EjbJar30MetaData;
+import org.jboss.metadata.javaee.spec.AnnotatedEJBReferenceMetaData;
+import org.jboss.metadata.javaee.spec.AnnotatedEJBReferencesMetaData;
+import org.jboss.metadata.javaee.spec.EJBReferenceMetaData;
+import org.jboss.metadata.javaee.spec.EnvironmentEntryMetaData;
+import org.jboss.metadata.javaee.spec.LifecycleCallbackMetaData;
+import org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData;
+import org.jboss.metadata.javaee.spec.MessageDestinationMetaData;
+import org.jboss.metadata.javaee.spec.ResourceEnvironmentReferenceMetaData;
+import org.jboss.metadata.javaee.spec.ResourceInjectionTargetMetaData;
+import org.jboss.metadata.javaee.spec.ResourceReferenceMetaData;
+import org.jboss.test.metadata.annotation.client.basic.Client;
+import org.jboss.test.metadata.annotation.client.basic.ResourceIF;
+import org.jboss.test.metadata.common.PackageScanner;
+import org.jboss.test.metadata.common.ScanPackage;
+import org.jboss.test.metadata.javaee.AbstractJavaEEMetaDataTest;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
+import org.omg.CORBA.ORB;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class AnnotationClientUnitTestCase extends AbstractJavaEEMetaDataTest
+{
+   public static SchemaBindingResolver initResolver()
+   {
+      DefaultSchemaResolver resolver = new DefaultSchemaResolver();
+      
+      resolver.addClassBindingForLocation("application-client_1_3.dtd", ApplicationClient14DTDMetaData.class);
+      resolver.addClassBindingForLocation("application-client_1_4.xsd", ApplicationClient14MetaData.class);
+      resolver.addClassBindingForLocation("application-client_5.xsd", ApplicationClient5MetaData.class);
+      resolver.addClassBindingForLocation("jboss-client", JBossClient5DTDMetaData.class);
+      return resolver;
+   }
+
+   public AnnotationClientUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   @SuppressWarnings("unchecked")
+   @ScanPackage("org.jboss.test.metadata.annotation.client.basic")
+   public void testApplicationClientProcessor()
+      throws Exception
+   {
+      AnnotationFinder<AnnotatedElement> finder = new DefaultAnnotationFinder<AnnotatedElement>();
+      
+      Collection<Class<?>> classes = PackageScanner.loadClasses();
+      System.out.println("Processing classes: "+classes);
+      ApplicationClient5MetaDataCreator creator = new ApplicationClient5MetaDataCreator(finder);
+      ApplicationClient5MetaData clientMD = creator.create(classes);
+      System.out.println(clientMD.getAnnotatedEjbReferences());
+      assertEquals(3, clientMD.getAnnotatedEjbReferences().size());
+
+      AnnotatedEJBReferenceMetaData resourceMethodBean = clientMD.getAnnotatedEjbReferences().get("resourceMethodBean");
+      assertNotNull(resourceMethodBean);
+      assertEquals(ResourceIF.class, resourceMethodBean.getBeanInterface());
+      assertEquals("ResourceOnMethodBean", resourceMethodBean.getLink());
+      Set<ResourceInjectionTargetMetaData> resourceMethodBeanTargets = resourceMethodBean.getInjectionTargets();
+      assertNotNull(resourceMethodBeanTargets);
+      assertEquals(1, resourceMethodBeanTargets.size());
+      ResourceInjectionTargetMetaData method = resourceMethodBeanTargets.iterator().next();
+      assertEquals(Client.class.getName(), method.getInjectionTargetClass());
+      assertEquals("setResourceMethodBean", method.getInjectionTargetName());
+
+      AnnotatedEJBReferenceMetaData resourceFieldBean = clientMD.getAnnotatedEjbReferences().get("resourceFieldBean");
+      assertNotNull(resourceFieldBean);
+      assertEquals("ResourceOnFieldBean", resourceFieldBean.getLink());
+      Set<ResourceInjectionTargetMetaData> resourceFieldBeanTargets = resourceFieldBean.getInjectionTargets();
+      assertNotNull(resourceFieldBeanTargets);
+      assertEquals(1, resourceFieldBeanTargets.size());
+      ResourceInjectionTargetMetaData field = resourceFieldBeanTargets.iterator().next();
+      assertEquals(Client.class.getName(), field.getInjectionTargetClass());
+      assertEquals("resourceFieldBean", field.getInjectionTargetName());
+
+      AnnotatedEJBReferenceMetaData resourceClassBean = clientMD.getAnnotatedEjbReferences().get("ejb/resourceClassBean");
+      assertNotNull(resourceClassBean);
+      assertEquals("ResourcesOnClassBean", resourceClassBean.getLink());
+      assertEquals("refs/resources/ResourcesOnClassBean", resourceClassBean.getMappedName());
+      assertEquals("refs/resources/ResourcesOnClassBean", resourceClassBean.getJndiName());
+
+      // ORB maps to a resource-env-ref
+      ResourceEnvironmentReferenceMetaData orbRes = clientMD.getResourceEnvironmentReferenceByName("orb");
+      System.out.println(clientMD.getResourceEnvironmentReferences());
+      assertNotNull(orbRes);
+      Set<ResourceInjectionTargetMetaData> orbResTargets = orbRes.getInjectionTargets();
+      assertNotNull(orbResTargets);
+      assertEquals(1, orbResTargets.size());
+      ResourceInjectionTargetMetaData orbField = orbResTargets.iterator().next();
+      assertEquals(Client.class.getName(), orbField.getInjectionTargetClass());
+      assertEquals("orb", orbField.getInjectionTargetName());
+
+      // URL maps to resource-ref
+      ResourceReferenceMetaData urlRes = clientMD.getResourceReferenceByName("jboss-home-page");
+      assertNotNull(urlRes);
+      assertEquals("http://www.jboss.org", urlRes.getMappedName());
+      Set<ResourceInjectionTargetMetaData> urlResTargets = urlRes.getInjectionTargets();
+      assertNotNull(urlResTargets);
+      assertEquals(1, urlResTargets.size());
+      ResourceInjectionTargetMetaData urlResField = urlResTargets.iterator().next();
+      assertEquals(Client.class.getName(), urlResField.getInjectionTargetClass());
+      assertEquals("jbossHome", urlResField.getInjectionTargetName());
+
+      // UserTransaction
+      
+      // String maps to env-entry
+      System.out.println(clientMD.getEnvironmentEntries());
+      EnvironmentEntryMetaData queueNameEntry = clientMD.getEnvironmentEntryByName("queueName");
+      assertNotNull(queueNameEntry);
+      assertEquals("queue/testQueue", queueNameEntry.getValue());
+      Set<ResourceInjectionTargetMetaData> queueNameEntryTargets = queueNameEntry.getInjectionTargets();
+      assertNotNull(queueNameEntryTargets);
+      assertEquals(1, queueNameEntryTargets.size());
+      ResourceInjectionTargetMetaData queueNameEntryField = queueNameEntryTargets.iterator().next();
+      assertEquals(Client.class.getName(), queueNameEntryField.getInjectionTargetClass());
+      assertEquals("queueName", queueNameEntryField.getInjectionTargetName());
+      // Float
+      // int
+
+      LifecycleCallbacksMetaData postConstructs = clientMD.getPostConstructs();
+      assertNotNull(postConstructs);
+      assertEquals(1, postConstructs.size());
+      LifecycleCallbackMetaData pc = postConstructs.get(0);
+      assertEquals(Client.class.getName(), pc.getClassName());
+      assertEquals("postConstruct", pc.getMethodName());
+      
+      LifecycleCallbacksMetaData preDestroys = clientMD.getPreDestroys();
+      assertNotNull(preDestroys);
+      assertEquals(1, preDestroys.size());
+      LifecycleCallbackMetaData pd = preDestroys.get(0);
+      assertEquals(Client.class.getName(), pd.getClassName());
+      assertEquals("destroy", pd.getMethodName());
+   }
+   @ScanPackage("org.jboss.test.metadata.annotation.client.basic")
+   public void testXmlMerge()
+      throws Exception
+   {
+      AnnotationFinder<AnnotatedElement> finder = new DefaultAnnotationFinder<AnnotatedElement>();
+      Collection<Class<?>> classes = PackageScanner.loadClasses();
+      System.out.println("Processing classes: "+classes);
+      ApplicationClient5MetaDataCreator creator = new ApplicationClient5MetaDataCreator(finder);
+      ApplicationClient5MetaData clientMD = creator.create(classes);
+      
+      ApplicationClient5MetaData xmlMD = super.unmarshal(ApplicationClient5MetaData.class);
+      ApplicationClient5MetaData merged = new ApplicationClient5MetaData();
+      AnnotationMergedView.merge(merged, xmlMD, clientMD);
+
+      EnvironmentEntryMetaData msg = merged.getEnvironmentEntryByName("msg");
+      assertNotNull(msg);
+      assertEquals("java.lang.String", msg.getType());
+      assertEquals("how are you?", msg.getValue());
+
+      LifecycleCallbacksMetaData postConstructs = merged.getPostConstructs();
+      assertNotNull(postConstructs);
+      // FIXME: JBMETA-27 assertEquals(1, postConstructs.size());
+      LifecycleCallbackMetaData pc0 = postConstructs.get(0);
+      assertEquals("postConstruct", pc0.getMethodName());
+
+      LifecycleCallbacksMetaData preDestroys = merged.getPreDestroys();
+      assertNotNull(preDestroys);
+      // FIXME: JBMETA-27 assertEquals(1, preDestroys.size());
+      LifecycleCallbackMetaData pd0 = preDestroys.get(0);
+      assertEquals("preDestroy", pd0.getMethodName());
+
+      assertEquals("org.jboss.ejb3.test.applicationclient.client.TestCallbackHandler", merged.getCallbackHandler());
+
+      // ORB maps to a resource-env-ref
+      ResourceEnvironmentReferenceMetaData orbRes = merged.getResourceEnvironmentReferenceByName("orb");
+      System.out.println(clientMD.getResourceEnvironmentReferences());
+      assertNotNull(orbRes);
+      assertEquals(ORB.class.getName(), orbRes.getType());
+      ResourceEnvironmentReferenceMetaData messageReplier = merged.getResourceEnvironmentReferenceByName("messageReplier");
+      assertNotNull(messageReplier);
+      assertEquals("javax.jms.Queue", messageReplier.getType());
+
+      // String maps to env-entry
+      System.out.println(clientMD.getEnvironmentEntries());
+      EnvironmentEntryMetaData queueNameEntry = clientMD.getEnvironmentEntryByName("queueName");
+      assertNotNull(queueNameEntry);
+      assertEquals("queue/testQueueOverride", queueNameEntry.getValue());
+      Set<ResourceInjectionTargetMetaData> queueNameEntryTargets = queueNameEntry.getInjectionTargets();
+      assertNotNull(queueNameEntryTargets);
+      assertEquals(1, queueNameEntryTargets.size());
+      ResourceInjectionTargetMetaData queueNameEntryField = queueNameEntryTargets.iterator().next();
+      assertEquals(Client.class.getName(), queueNameEntryField.getInjectionTargetClass());
+      assertEquals("queueName", queueNameEntryField.getInjectionTargetName());
+
+      MessageDestinationMetaData md = merged.getMessageDestinationByName("MY-QUEUE");
+      assertNotNull(md);
+      assertEquals("queue/testQueue", md.getJndiName());
+      assertEquals("queue/testQueue", md.getMappedName());
+   }
+}

Deleted: projects/metadata/tags/1.0.0.Beta10/src/test/java/org/jboss/test/metadata/annotation/client/basic/Client.java
===================================================================
--- projects/metadata/trunk/src/test/java/org/jboss/test/metadata/annotation/client/basic/Client.java	2008-04-26 15:30:20 UTC (rev 72750)
+++ projects/metadata/tags/1.0.0.Beta10/src/test/java/org/jboss/test/metadata/annotation/client/basic/Client.java	2008-04-27 14:41:37 UTC (rev 72760)
@@ -1,51 +0,0 @@
-/*
- * 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.test.metadata.annotation.client.basic;
-
-import javax.annotation.Resource;
-import javax.ejb.EJB;
-
-import org.omg.CORBA.ORB;
-
-/**
- * @author Scott.Stark at jboss.org
- * @version $Revision:$
- */
-public class Client
-{
-   private static ResourceIF resourceMethodBean;
-
-   @EJB(beanName = "ResourceOnFieldBean")
-   private static ResourceIF resourceFieldBean;
-
-   @EJB(name="ejb/resourceClassBean", beanName = "ResourcesOnClassBean", mappedName="refs/resources/ResourcesOnClassBean")
-   private static ResourceIF resourceClassBean;
-
-   @EJB(beanName = "ResourceOnMethodBean")
-   private static void setResourceMethodBean(ResourceIF rif)
-   {
-      resourceMethodBean = rif;
-   }
-
-   @Resource
-   private static ORB orb;
-}

Copied: projects/metadata/tags/1.0.0.Beta10/src/test/java/org/jboss/test/metadata/annotation/client/basic/Client.java (from rev 72756, projects/metadata/trunk/src/test/java/org/jboss/test/metadata/annotation/client/basic/Client.java)
===================================================================
--- projects/metadata/tags/1.0.0.Beta10/src/test/java/org/jboss/test/metadata/annotation/client/basic/Client.java	                        (rev 0)
+++ projects/metadata/tags/1.0.0.Beta10/src/test/java/org/jboss/test/metadata/annotation/client/basic/Client.java	2008-04-27 14:41:37 UTC (rev 72760)
@@ -0,0 +1,79 @@
+/*
+ * 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.test.metadata.annotation.client.basic;
+
+import java.net.URL;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.annotation.Resource;
+import javax.ejb.EJB;
+import javax.transaction.UserTransaction;
+
+import org.omg.CORBA.ORB;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class Client
+{
+   private static ResourceIF resourceMethodBean;
+
+   @EJB(beanName = "ResourceOnFieldBean")
+   private static ResourceIF resourceFieldBean;
+
+   @EJB(name="ejb/resourceClassBean", beanName = "ResourcesOnClassBean", mappedName="refs/resources/ResourcesOnClassBean")
+   private static ResourceIF resourceClassBean;
+
+   @EJB(beanName = "ResourceOnMethodBean")
+   private static void setResourceMethodBean(ResourceIF rif)
+   {
+      resourceMethodBean = rif;
+   }
+
+   @Resource(name="queueName", mappedName="queue/testQueue")
+   private static String queueName;
+   @Resource(mappedName="3.14159", description="pi to 5", name="PI")
+   private static Float pi;
+
+   @Resource
+   private static ORB orb;
+   @Resource(name="jboss-home-page", mappedName="http://www.jboss.org")
+   private static URL jbossHome;
+   private static UserTransaction utx;
+
+   @Resource(name="user-tx")
+   private static void setUserTransaction(UserTransaction utx)
+   {
+      Client.utx = utx;
+   }
+
+   @PostConstruct
+   public static void postConstruct()
+   {
+   }
+   @PreDestroy
+   public static void destroy()
+   {
+   }   
+}

Copied: projects/metadata/tags/1.0.0.Beta10/src/test/resources/org/jboss/test/metadata/annotation/client/AnnotationClient_testJBossXmlMerge.xml (from rev 72756, projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/annotation/client/AnnotationClient_testJBossXmlMerge.xml)
===================================================================
--- projects/metadata/tags/1.0.0.Beta10/src/test/resources/org/jboss/test/metadata/annotation/client/AnnotationClient_testJBossXmlMerge.xml	                        (rev 0)
+++ projects/metadata/tags/1.0.0.Beta10/src/test/resources/org/jboss/test/metadata/annotation/client/AnnotationClient_testJBossXmlMerge.xml	2008-04-27 14:41:37 UTC (rev 72760)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE jboss-client PUBLIC
+    "-//JBoss//DTD Application Client 5.0//EN"
+    "http://www.jboss.org/j2ee/dtd/jboss-client_5_0.dtd">
+<jboss-client>
+    <jndi-name>ee5client_test</jndi-name>
+    
+    <resource-env-ref>
+        <resource-env-ref-name>messageReplier</resource-env-ref-name>
+        <jndi-name>queue/messageReplier</jndi-name>
+    </resource-env-ref>
+</jboss-client>

Deleted: projects/metadata/tags/1.0.0.Beta10/src/test/resources/org/jboss/test/metadata/annotation/client/AnnotationClient_testXmlMerge.xml
===================================================================
--- projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/annotation/client/AnnotationClient_testXmlMerge.xml	2008-04-26 15:30:20 UTC (rev 72750)
+++ projects/metadata/tags/1.0.0.Beta10/src/test/resources/org/jboss/test/metadata/annotation/client/AnnotationClient_testXmlMerge.xml	2008-04-27 14:41:37 UTC (rev 72760)
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<application-client 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-client_5.xsd"
-    version="5" id="appclient-test">
-    <description>application client unit test</description>
-    <display-name>appclient-test-client</display-name>
-    
-    <env-entry>
-        <env-entry-name>msg</env-entry-name>
-        <env-entry-type>java.lang.String</env-entry-type>
-        <env-entry-value>how are you?</env-entry-value>
-    </env-entry>
-    
-    <resource-env-ref>
-        <resource-env-ref-name>messageReplier</resource-env-ref-name>
-        <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
-    </resource-env-ref>
-    
-    <post-construct>
-        <lifecycle-callback-method>postConstruct</lifecycle-callback-method>
-    </post-construct>
-    
-    <pre-destroy>
-        <lifecycle-callback-method>preDestroy</lifecycle-callback-method>
-    </pre-destroy>
-    
-    <callback-handler>org.jboss.ejb3.test.applicationclient.client.TestCallbackHandler</callback-handler>
-
-    <message-destination>
-        <message-destination-name>MY-QUEUE</message-destination-name>
-        <mapped-name>queue/testQueue</mapped-name>
-    </message-destination>
-</application-client>

Copied: projects/metadata/tags/1.0.0.Beta10/src/test/resources/org/jboss/test/metadata/annotation/client/AnnotationClient_testXmlMerge.xml (from rev 72751, projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/annotation/client/AnnotationClient_testXmlMerge.xml)
===================================================================
--- projects/metadata/tags/1.0.0.Beta10/src/test/resources/org/jboss/test/metadata/annotation/client/AnnotationClient_testXmlMerge.xml	                        (rev 0)
+++ projects/metadata/tags/1.0.0.Beta10/src/test/resources/org/jboss/test/metadata/annotation/client/AnnotationClient_testXmlMerge.xml	2008-04-27 14:41:37 UTC (rev 72760)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application-client 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-client_5.xsd"
+    version="5" id="appclient-test">
+    <description>application client unit test</description>
+    <display-name>appclient-test-client</display-name>
+    
+    <env-entry>
+        <env-entry-name>msg</env-entry-name>
+        <env-entry-type>java.lang.String</env-entry-type>
+        <env-entry-value>how are you?</env-entry-value>
+    </env-entry>
+    <env-entry>
+        <env-entry-name>queueName</env-entry-name>
+        <env-entry-type>java.lang.String</env-entry-type>
+        <env-entry-value>queue/testQueueOverride</env-entry-value>
+    </env-entry>
+    
+    <resource-env-ref>
+        <resource-env-ref-name>messageReplier</resource-env-ref-name>
+        <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
+    </resource-env-ref>
+    
+    <post-construct>
+        <lifecycle-callback-method>postConstruct</lifecycle-callback-method>
+    </post-construct>
+    
+    <pre-destroy>
+        <lifecycle-callback-method>preDestroy</lifecycle-callback-method>
+    </pre-destroy>
+    
+    <callback-handler>org.jboss.ejb3.test.applicationclient.client.TestCallbackHandler</callback-handler>
+
+    <message-destination>
+        <message-destination-name>MY-QUEUE</message-destination-name>
+        <mapped-name>queue/testQueue</mapped-name>
+    </message-destination>
+</application-client>




More information about the jboss-cvs-commits mailing list