[jboss-cvs] JBossAS SVN: r95772 - in projects/metadata/common/tags: 2.0.0.Alpha5 and 6 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Oct 29 13:21:19 EDT 2009


Author: remy.maucherat at jboss.com
Date: 2009-10-29 13:21:17 -0400 (Thu, 29 Oct 2009)
New Revision: 95772

Added:
   projects/metadata/common/tags/2.0.0.Alpha5/
   projects/metadata/common/tags/2.0.0.Alpha5/pom.xml
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/annotation/creator/AbstractComponentProcessor.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/ejb/jboss/JBossEnvironmentRefsGroupMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/DataSourcesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EJBLocalReferencesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EJBReferencesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentEntriesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentRefsGroupMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/LifecycleCallbacksMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationReferencesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationsMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/PersistenceContextReferencesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/PersistenceUnitReferencesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceEnvironmentReferencesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceInjectionMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceReferencesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ServiceReferencesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/support/
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/support/AugmentableMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/resources/schema/
Removed:
   projects/metadata/common/tags/2.0.0.Alpha5/pom.xml
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/annotation/creator/AbstractComponentProcessor.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/ejb/jboss/JBossEnvironmentRefsGroupMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/DataSourcesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EJBLocalReferencesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EJBReferencesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentEntriesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentRefsGroupMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/LifecycleCallbacksMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationReferencesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationsMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/PersistenceContextReferencesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/PersistenceUnitReferencesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceEnvironmentReferencesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceInjectionMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceReferencesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ServiceReferencesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/support/
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/support/AugmentableMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha5/src/main/resources/schema/
Log:
[maven-release-plugin]  copy for tag 2.0.0.Alpha5

Copied: projects/metadata/common/tags/2.0.0.Alpha5 (from rev 93711, projects/metadata/common/trunk)

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/pom.xml
===================================================================
--- projects/metadata/common/trunk/pom.xml	2009-09-18 13:08:39 UTC (rev 93711)
+++ projects/metadata/common/tags/2.0.0.Alpha5/pom.xml	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,221 +0,0 @@
-<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>4.0.CR1</version>
-  </parent>
-  <groupId>org.jboss.metadata</groupId>
-  <artifactId>jboss-metadata-common</artifactId>
-  <packaging>jar</packaging>
-  <version>2.0.0-SNAPSHOT</version>
-  <name>JBoss Metadata Common</name>
-  <url>http://www.jboss.org</url>
-  <description>The common JavaEE metadata classes</description>
-  <scm>
-    <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/metadata/common/trunk</connection>
-    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/metadata/common/trunk</developerConnection>
-  </scm>
-
-  <build>
-    <outputDirectory>${profile.outputDirectory}</outputDirectory>
-    <testOutputDirectory>${profile.testOutputDirectory}</testOutputDirectory>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <version>2.4.3</version>
-        <configuration>
-          <printSummary>true</printSummary>
-          <disableXmlReport>false</disableXmlReport>
-          <redirectTestOutputToFile>true</redirectTestOutputToFile>
-           <testFailureIgnore>false</testFailureIgnore>
-          <includes>
-            <include>**/*TestCase.java</include>
-          </includes>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <executions>
-          <execution>
-            <goals>
-              <goal>test-jar</goal>
-            </goals>
-            <configuration>
-               <excludes>
-                  <exclude>org/jboss/test/metadata/javaee/*TestCase.class</exclude>
-                  <exclude>org/jboss/test/metadata/javaee/*TestCase$*.class</exclude>
-                  <exclude>org/jboss/test/metadata/javaee/*.xml</exclude>
-               </excludes>
-            </configuration> 
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-source-plugin</artifactId>
-        <executions>
-          <execution>
-            <goals>
-              <goal>test-jar</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-
-  <repositories>
-    <repository>
-      <id>repository.jboss.org</id>
-      <name>JBoss Repository</name>
-      <layout>default</layout>
-      <url>http://repository.jboss.org/maven2/</url>
-      <snapshots>
-        <enabled>false</enabled>
-      </snapshots>
-    </repository>
-    <repository>
-      <id>snapshots.jboss.org</id>
-      <name>JBoss Snapshot Repository</name>
-      <layout>default</layout>
-      <url>http://snapshots.jboss.org/maven2/</url>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-    </repository>
-  </repositories>
-
-  <!-- 
-    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>default</id>
-      <activation>
-        <activeByDefault>true</activeByDefault>
-      </activation>
-      <properties>
-        <profile.outputDirectory>target/classes</profile.outputDirectory>
-        <profile.testOutputDirectory>target/tests-classes</profile.testOutputDirectory>
-      </properties>
-    </profile>
-    
-    <profile>
-      <id>eclipse</id>
-      <properties>
-        <profile.outputDirectory>eclipse-target/classes</profile.outputDirectory>
-        <profile.testOutputDirectory>eclipse-target/tests-classes</profile.testOutputDirectory>
-      </properties>
-    </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.14.GA</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.jboss.javaee</groupId>
-      <artifactId>jboss-ejb-api</artifactId>
-      <version>3.0.0.GA</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.hibernate</groupId>
-      <artifactId>ejb3-persistence</artifactId>
-      <version>1.0.2.GA</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.jboss.javaee</groupId>
-      <artifactId>jboss-jms-api</artifactId>
-      <version>1.1.0.GA</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.jboss.ws</groupId>
-      <artifactId>jbossws-spi</artifactId>
-      <version>1.0.6.GA</version>
-    </dependency>
-
-    <dependency>
-      <groupId>jboss.jbossws</groupId>
-      <artifactId>jboss-jaxws</artifactId>
-      <version>3.0.1-native-2.0.4.GA</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jbossxb</artifactId>
-      <version>2.0.2.Beta1</version>
-      <exclusions>
-        <exclusion>
-          <groupId>jboss</groupId>
-          <artifactId>jboss-common-logging-spi</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>javax.xml.bind</groupId>
-          <artifactId>jaxb-api</artifactId>
-        </exclusion>          
-      </exclusions>       
-    </dependency>
-    
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-vfs</artifactId>
-      <version>2.0.0.CR1</version>    
-    </dependency>
-
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-mdr</artifactId>
-      <version>2.0.0.GA</version>
-    </dependency>
-
-    <dependency>
-      <groupId>sun-jaxb</groupId>
-      <artifactId>jaxb-api</artifactId>
-      <version>2.1.4</version>
-   </dependency>
-      
-    <dependency>
-      <groupId>apache-xerces</groupId>
-      <artifactId>xml-apis</artifactId>
-      <version>2.9.1</version>    
-    </dependency>
-    
-    <!-- Test Dependencies -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.4</version>
-      <scope>test</scope>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.jboss.test</groupId>
-      <artifactId>jboss-test</artifactId>
-      <version>1.1.4.GA</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-</project>

Copied: projects/metadata/common/tags/2.0.0.Alpha5/pom.xml (from rev 95771, projects/metadata/common/trunk/pom.xml)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/pom.xml	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/pom.xml	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,221 @@
+<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>4.0.CR1</version>
+  </parent>
+  <groupId>org.jboss.metadata</groupId>
+  <artifactId>jboss-metadata-common</artifactId>
+  <packaging>jar</packaging>
+  <version>2.0.0.Alpha5</version>
+  <name>JBoss Metadata Common</name>
+  <url>http://www.jboss.org</url>
+  <description>The common JavaEE metadata classes</description>
+  <scm>
+    <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/metadata/common/tags/2.0.0.Alpha5</connection>
+    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/metadata/common/tags/2.0.0.Alpha5</developerConnection>
+  </scm>
+
+  <build>
+    <outputDirectory>${profile.outputDirectory}</outputDirectory>
+    <testOutputDirectory>${profile.testOutputDirectory}</testOutputDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.4.3</version>
+        <configuration>
+          <printSummary>true</printSummary>
+          <disableXmlReport>false</disableXmlReport>
+          <redirectTestOutputToFile>true</redirectTestOutputToFile>
+           <testFailureIgnore>false</testFailureIgnore>
+          <includes>
+            <include>**/*TestCase.java</include>
+          </includes>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>test-jar</goal>
+            </goals>
+            <configuration>
+               <excludes>
+                  <exclude>org/jboss/test/metadata/javaee/*TestCase.class</exclude>
+                  <exclude>org/jboss/test/metadata/javaee/*TestCase$*.class</exclude>
+                  <exclude>org/jboss/test/metadata/javaee/*.xml</exclude>
+               </excludes>
+            </configuration> 
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>test-jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <repositories>
+    <repository>
+      <id>repository.jboss.org</id>
+      <name>JBoss Repository</name>
+      <layout>default</layout>
+      <url>http://repository.jboss.org/maven2/</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
+    <repository>
+      <id>snapshots.jboss.org</id>
+      <name>JBoss Snapshot Repository</name>
+      <layout>default</layout>
+      <url>http://snapshots.jboss.org/maven2/</url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </repository>
+  </repositories>
+
+  <!-- 
+    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>default</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <properties>
+        <profile.outputDirectory>target/classes</profile.outputDirectory>
+        <profile.testOutputDirectory>target/tests-classes</profile.testOutputDirectory>
+      </properties>
+    </profile>
+    
+    <profile>
+      <id>eclipse</id>
+      <properties>
+        <profile.outputDirectory>eclipse-target/classes</profile.outputDirectory>
+        <profile.testOutputDirectory>eclipse-target/tests-classes</profile.testOutputDirectory>
+      </properties>
+    </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.14.GA</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss.javaee</groupId>
+      <artifactId>jboss-ejb-api</artifactId>
+      <version>3.0.0.GA</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.hibernate</groupId>
+      <artifactId>ejb3-persistence</artifactId>
+      <version>1.0.2.GA</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss.javaee</groupId>
+      <artifactId>jboss-jms-api</artifactId>
+      <version>1.1.0.GA</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss.ws</groupId>
+      <artifactId>jbossws-spi</artifactId>
+      <version>1.0.6.GA</version>
+    </dependency>
+
+    <dependency>
+      <groupId>jboss.jbossws</groupId>
+      <artifactId>jboss-jaxws</artifactId>
+      <version>3.0.1-native-2.0.4.GA</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jbossxb</artifactId>
+      <version>2.0.2.Beta1</version>
+      <exclusions>
+        <exclusion>
+          <groupId>jboss</groupId>
+          <artifactId>jboss-common-logging-spi</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>javax.xml.bind</groupId>
+          <artifactId>jaxb-api</artifactId>
+        </exclusion>          
+      </exclusions>       
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-vfs</artifactId>
+      <version>2.0.0.CR1</version>    
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-mdr</artifactId>
+      <version>2.0.0.GA</version>
+    </dependency>
+
+    <dependency>
+      <groupId>sun-jaxb</groupId>
+      <artifactId>jaxb-api</artifactId>
+      <version>2.1.4</version>
+   </dependency>
+      
+    <dependency>
+      <groupId>apache-xerces</groupId>
+      <artifactId>xml-apis</artifactId>
+      <version>2.9.1</version>    
+    </dependency>
+    
+    <!-- Test Dependencies -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.4</version>
+      <scope>test</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss.test</groupId>
+      <artifactId>jboss-test</artifactId>
+      <version>1.1.4.GA</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+</project>
\ No newline at end of file

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/annotation/creator/AbstractComponentProcessor.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/annotation/creator/AbstractComponentProcessor.java	2009-09-18 13:08:39 UTC (rev 93711)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/annotation/creator/AbstractComponentProcessor.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,141 +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.metadata.annotation.creator;
-
-import java.lang.reflect.AnnotatedElement;
-
-import org.jboss.metadata.annotation.creator.ws.WebServiceRefClassProcessor;
-import org.jboss.metadata.annotation.creator.ws.WebServiceRefFieldProcessor;
-import org.jboss.metadata.annotation.creator.ws.WebServiceRefMethodProcessor;
-import org.jboss.metadata.annotation.creator.ws.WebServiceRefsClassProcessor;
-import org.jboss.metadata.annotation.finder.AnnotationFinder;
-import org.jboss.metadata.javaee.spec.AnnotatedEJBReferencesMetaData;
-import org.jboss.metadata.javaee.spec.EnvironmentRefsGroupMetaData;
-import org.jboss.metadata.javaee.spec.PersistenceContextReferencesMetaData;
-import org.jboss.metadata.javaee.spec.PersistenceUnitReferencesMetaData;
-import org.jboss.metadata.javaee.spec.RemoteEnvironmentRefsGroupMetaData;
-import org.jboss.metadata.javaee.spec.ServiceReferencesMetaData;
-
-/**
- * A base javaee component processor.
- * @param MD - the component metadata type
- * 
- * @author Scott.Stark at jboss.org
- * @version $Revision: 77146 $
- */
-public abstract class AbstractComponentProcessor<MD>
-   extends AbstractProcessor<MD>
-{
-
-   public AbstractComponentProcessor(AnnotationFinder<AnnotatedElement> finder)
-   {
-      super(finder);
-
-      // Add component environment processors
-      // @Resources/@Resource
-      addMethodProcessor(new ResourceMethodProcessor(finder));
-      addFieldProcessor(new ResourceFieldProcessor(finder));
-      addTypeProcessor(new ResourceClassProcessor(finder));
-      addTypeProcessor(new ResourcesClassProcessor(finder));
-      // @EJBs/@EJB
-      addMethodProcessor(new EJBMethodProcessor(finder));
-      addFieldProcessor(new EJBFieldProcessor(finder));
-      addTypeProcessor(new EJBClassProcessor(finder));
-      addTypeProcessor(new EJBsClassProcessor(finder));
-      // @PersistenceContext
-      addFieldProcessor(new PersistenceContextFieldProcessor(finder));
-      addMethodProcessor(new PersistenceContextMethodProcessor(finder));
-      addTypeProcessor(new PersistenceContextClassProcessor(finder));
-      addTypeProcessor(new PersistenceContextsClassProcessor(finder));
-      // @PersistenceUnit/@PersistenceUnits
-      addFieldProcessor(new PersistenceUnitFieldProcessor(finder));
-      addMethodProcessor(new PersistenceUnitMethodProcessor(finder));
-      addTypeProcessor(new PersistenceUnitClassProcessor(finder));
-      addTypeProcessor(new PersistenceUnitsClassProcessor(finder));
-      // @PostConstruct/@PreDestroy
-      addMethodProcessor(new PostConstructMethodProcessor(finder));
-      addMethodProcessor(new PreDestroyMethodProcessor(finder));
-      // @WebServiceRef (includes @HandlerChain)
-      addMethodProcessor(new WebServiceRefMethodProcessor(finder));
-      addFieldProcessor(new WebServiceRefFieldProcessor(finder));  
-      addTypeProcessor(new WebServiceRefClassProcessor(finder));
-      addTypeProcessor(new WebServiceRefsClassProcessor(finder));
-   }
-
-   /**
-    * Process type for remote environment metadata related annotations
-    * 
-    * @param metaData
-    * @param type
-    */
-   public void process(RemoteEnvironmentRefsGroupMetaData metaData, Class<?> type)
-   {
-      // @Resources/@Resource
-      processClass(metaData, type, RemoteEnvironmentRefsGroupMetaData.class);
-
-      // @EJBs/@EJB
-      AnnotatedEJBReferencesMetaData aejbRefs = metaData.getAnnotatedEjbReferences();
-      if(aejbRefs == null)
-      {
-         aejbRefs = new AnnotatedEJBReferencesMetaData();
-         metaData.setAnnotatedEjbReferences(aejbRefs);
-      }
-      processClass(aejbRefs, type);
-
-      // @PersistenceUnit
-      PersistenceUnitReferencesMetaData puRefs = metaData.getPersistenceUnitRefs();
-      if(puRefs == null)
-      {
-         puRefs = new PersistenceUnitReferencesMetaData();
-         metaData.setPersistenceUnitRefs(puRefs);
-      }
-      processClass(puRefs, type);
-      // @WebServiceRefs/@WebServiceRef
-      ServiceReferencesMetaData wsRefs = metaData.getServiceReferences();
-      if(wsRefs == null)
-      {
-         wsRefs = new ServiceReferencesMetaData();
-         metaData.setServiceReferences(wsRefs);
-      }
-      processClass(wsRefs, type);
-   }
-   
-   /**
-    * Process type for environment metadata related annotations
-    * 
-    * @param metaData
-    * @param type
-    */
-   public void process(EnvironmentRefsGroupMetaData metaData, Class<?> type)
-   {
-      this.process((RemoteEnvironmentRefsGroupMetaData)metaData, type);
-
-      // @PersistenceContext
-      PersistenceContextReferencesMetaData pcRefs = metaData.getPersistenceContextRefs();
-      if(pcRefs == null)
-      {
-         pcRefs = new PersistenceContextReferencesMetaData();
-         metaData.setPersistenceContextRefs(pcRefs);
-      }
-      processClass(pcRefs, type);
-   }
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/annotation/creator/AbstractComponentProcessor.java (from rev 95641, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/annotation/creator/AbstractComponentProcessor.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/annotation/creator/AbstractComponentProcessor.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/annotation/creator/AbstractComponentProcessor.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,142 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.metadata.annotation.creator;
+
+import java.lang.reflect.AnnotatedElement;
+
+import org.jboss.metadata.annotation.creator.ws.WebServiceRefClassProcessor;
+import org.jboss.metadata.annotation.creator.ws.WebServiceRefFieldProcessor;
+import org.jboss.metadata.annotation.creator.ws.WebServiceRefMethodProcessor;
+import org.jboss.metadata.annotation.creator.ws.WebServiceRefsClassProcessor;
+import org.jboss.metadata.annotation.finder.AnnotationFinder;
+import org.jboss.metadata.javaee.spec.AnnotatedEJBReferencesMetaData;
+import org.jboss.metadata.javaee.spec.EnvironmentRefsGroupMetaData;
+import org.jboss.metadata.javaee.spec.PersistenceContextReferencesMetaData;
+import org.jboss.metadata.javaee.spec.PersistenceUnitReferencesMetaData;
+import org.jboss.metadata.javaee.spec.RemoteEnvironmentRefsGroupMetaData;
+import org.jboss.metadata.javaee.spec.ServiceReferencesMetaData;
+
+/**
+ * A base javaee component processor.
+ * @param MD - the component metadata type
+ * 
+ * @author Scott.Stark at jboss.org
+ * @version $Revision: 77146 $
+ */
+public abstract class AbstractComponentProcessor<MD>
+   extends AbstractProcessor<MD>
+{
+
+   public AbstractComponentProcessor(AnnotationFinder<AnnotatedElement> finder)
+   {
+      super(finder);
+
+      // Add component environment processors
+      // @Resources/@Resource
+      addMethodProcessor(new ResourceMethodProcessor(finder));
+      addFieldProcessor(new ResourceFieldProcessor(finder));
+      addTypeProcessor(new ResourceClassProcessor(finder));
+      addTypeProcessor(new ResourcesClassProcessor(finder));
+      // @EJBs/@EJB
+      addMethodProcessor(new EJBMethodProcessor(finder));
+      addFieldProcessor(new EJBFieldProcessor(finder));
+      addTypeProcessor(new EJBClassProcessor(finder));
+      addTypeProcessor(new EJBsClassProcessor(finder));
+      // @PersistenceContext
+      addFieldProcessor(new PersistenceContextFieldProcessor(finder));
+      addMethodProcessor(new PersistenceContextMethodProcessor(finder));
+      addTypeProcessor(new PersistenceContextClassProcessor(finder));
+      addTypeProcessor(new PersistenceContextsClassProcessor(finder));
+      // @PersistenceUnit/@PersistenceUnits
+      addFieldProcessor(new PersistenceUnitFieldProcessor(finder));
+      addMethodProcessor(new PersistenceUnitMethodProcessor(finder));
+      addTypeProcessor(new PersistenceUnitClassProcessor(finder));
+      addTypeProcessor(new PersistenceUnitsClassProcessor(finder));
+      // @PostConstruct/@PreDestroy
+      addMethodProcessor(new PostConstructMethodProcessor(finder));
+      addMethodProcessor(new PreDestroyMethodProcessor(finder));
+      // @WebServiceRef (includes @HandlerChain)
+      addMethodProcessor(new WebServiceRefMethodProcessor(finder));
+      addFieldProcessor(new WebServiceRefFieldProcessor(finder));  
+      addTypeProcessor(new WebServiceRefClassProcessor(finder));
+      addTypeProcessor(new WebServiceRefsClassProcessor(finder));
+      // TODO: @DataSourceDefinitions/@DataSourceDefinition
+   }
+
+   /**
+    * Process type for remote environment metadata related annotations
+    * 
+    * @param metaData
+    * @param type
+    */
+   public void process(RemoteEnvironmentRefsGroupMetaData metaData, Class<?> type)
+   {
+      // @Resources/@Resource
+      processClass(metaData, type, RemoteEnvironmentRefsGroupMetaData.class);
+
+      // @EJBs/@EJB
+      AnnotatedEJBReferencesMetaData aejbRefs = metaData.getAnnotatedEjbReferences();
+      if(aejbRefs == null)
+      {
+         aejbRefs = new AnnotatedEJBReferencesMetaData();
+         metaData.setAnnotatedEjbReferences(aejbRefs);
+      }
+      processClass(aejbRefs, type);
+
+      // @PersistenceUnit
+      PersistenceUnitReferencesMetaData puRefs = metaData.getPersistenceUnitRefs();
+      if(puRefs == null)
+      {
+         puRefs = new PersistenceUnitReferencesMetaData();
+         metaData.setPersistenceUnitRefs(puRefs);
+      }
+      processClass(puRefs, type);
+      // @WebServiceRefs/@WebServiceRef
+      ServiceReferencesMetaData wsRefs = metaData.getServiceReferences();
+      if(wsRefs == null)
+      {
+         wsRefs = new ServiceReferencesMetaData();
+         metaData.setServiceReferences(wsRefs);
+      }
+      processClass(wsRefs, type);
+   }
+   
+   /**
+    * Process type for environment metadata related annotations
+    * 
+    * @param metaData
+    * @param type
+    */
+   public void process(EnvironmentRefsGroupMetaData metaData, Class<?> type)
+   {
+      this.process((RemoteEnvironmentRefsGroupMetaData)metaData, type);
+
+      // @PersistenceContext
+      PersistenceContextReferencesMetaData pcRefs = metaData.getPersistenceContextRefs();
+      if(pcRefs == null)
+      {
+         pcRefs = new PersistenceContextReferencesMetaData();
+         metaData.setPersistenceContextRefs(pcRefs);
+      }
+      processClass(pcRefs, type);
+   }
+}

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/ejb/jboss/JBossEnvironmentRefsGroupMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/ejb/jboss/JBossEnvironmentRefsGroupMetaData.java	2009-09-18 13:08:39 UTC (rev 93711)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/ejb/jboss/JBossEnvironmentRefsGroupMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,259 +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.ejb.jboss;
-
-import java.io.Serializable;
-
-import javax.xml.bind.annotation.XmlElement;
-
-import org.jboss.metadata.javaee.jboss.JBossServiceReferenceMetaData;
-import org.jboss.metadata.javaee.jboss.JBossServiceReferencesMetaData;
-import org.jboss.metadata.javaee.spec.EJBLocalReferenceMetaData;
-import org.jboss.metadata.javaee.spec.EJBLocalReferencesMetaData;
-import org.jboss.metadata.javaee.spec.Environment;
-import org.jboss.metadata.javaee.spec.EnvironmentRefsGroupMetaData;
-import org.jboss.metadata.javaee.spec.PersistenceContextReferenceMetaData;
-import org.jboss.metadata.javaee.spec.PersistenceContextReferencesMetaData;
-import org.jboss.metadata.javaee.spec.RemoteEnvironmentRefsGroupMetaData;
-import org.jboss.metadata.javaee.spec.ResourceReferenceMetaData;
-import org.jboss.metadata.javaee.spec.ResourceReferencesMetaData;
-import org.jboss.metadata.javaee.spec.ServiceReferencesMetaData;
-import org.jboss.xb.annotations.JBossXmlCollection;
-import org.jboss.xb.annotations.JBossXmlModelGroup;
-
-/**
- * JBossEnvironmentRefsGroupMetaData.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
- at JBossXmlModelGroup(name="jndiEnvironmentRefsGroup",
-      propOrder={"environmentEntries", "ejbReferences", "ejbLocalReferences",
-      "serviceReferences", "resourceReferences", "resourceEnvironmentReferences",
-      "messageDestinationReferences", "persistenceContextRefs", "persistenceUnitRefs",
-      "postConstructs", "preDestroys"})
-public class JBossEnvironmentRefsGroupMetaData
-   extends RemoteEnvironmentRefsGroupMetaData
-   implements Serializable, Environment
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = 4642263968653845579L;
-
-   /** The ejb local references */
-   private EJBLocalReferencesMetaData ejbLocalReferences;
- 
-   /** The service references */
-   private JBossServiceReferencesMetaData serviceReferences;
-   
-   /** The persistence context reference */
-   private PersistenceContextReferencesMetaData persistenceContextRefs;
-
-   /**
-    * Merge an environment
-    * 
-    * @param jbossEnvironmentRefsGroup the override environment
-    * @param environmentRefsGroup the overriden environment
-    * @param overridenFile the overriden file name
-    * @param overrideFile the override file
-    * @return the merged environment
-    */
-   public static JBossEnvironmentRefsGroupMetaData mergeNew(JBossEnvironmentRefsGroupMetaData jbossEnvironmentRefsGroup,
-            EnvironmentRefsGroupMetaData environmentRefsGroup,
-            ResourceManagersMetaData resourceMgrs,
-            String overrideFile, String overridenFile, boolean mustOverride)
-   {
-      JBossEnvironmentRefsGroupMetaData merged = new JBossEnvironmentRefsGroupMetaData();
-      
-      merged.merge(jbossEnvironmentRefsGroup, environmentRefsGroup, resourceMgrs, overridenFile, overrideFile, mustOverride);
-      
-      return merged;
-   }
-
-   public EJBLocalReferenceMetaData getEjbLocalReferenceByName(String name)
-   {
-      EJBLocalReferenceMetaData ref = null;
-      if(this.ejbLocalReferences != null)
-         ref = ejbLocalReferences.get(name);
-      return ref;
-   }
-
-   public PersistenceContextReferenceMetaData getPersistenceContextReferenceByName(String name)
-   {
-      PersistenceContextReferenceMetaData ref = null;
-      if(this.persistenceContextRefs != null)
-         ref = persistenceContextRefs.get(name);
-      return ref;
-   }
-
-   public ServiceReferencesMetaData getServiceReferences()
-   {
-      return serviceReferences;
-   }
-
-   @JBossXmlCollection(type=JBossServiceReferencesMetaData.class)
-   @XmlElement(name="service-ref", type=JBossServiceReferenceMetaData.class)
-   public void setServiceReferences(ServiceReferencesMetaData serviceReferences)
-   {
-      this.serviceReferences = (JBossServiceReferencesMetaData) serviceReferences;
-   }
-
-
-   public EJBLocalReferencesMetaData getEjbLocalReferences()
-   {
-      return ejbLocalReferences;
-   }
-
-   @XmlElement(name="ejb-local-ref")
-   public void setEjbLocalReferences(EJBLocalReferencesMetaData ejbLocalReferences)
-   {
-      this.ejbLocalReferences = ejbLocalReferences;
-   }
-
-
-   public PersistenceContextReferencesMetaData getPersistenceContextRefs()
-   {
-      return persistenceContextRefs;
-   }
-
-   @XmlElement(name="persistence-context-ref")
-   public void setPersistenceContextRefs(PersistenceContextReferencesMetaData persistenceContextRefs)
-   {
-      this.persistenceContextRefs = persistenceContextRefs;
-   }
-
-
-   /**
-    * Merge an environment
-    * 
-    * @param jbossEnvironmentRefsGroup the override environment
-    * @param environmentRefsGroup the overriden environment
-    * @param overridenFile the overriden file name
-    * @param overrideFile the override file
-    * @return the merged environment
-    */
-   public void merge(JBossEnvironmentRefsGroupMetaData jbossEnv,
-         Environment specEnv,
-         ResourceManagersMetaData resourceMgrs,
-         String overrideFile, String overridenFile, boolean mustOverride)
-   {
-      if (jbossEnv == null && specEnv == null)
-         return;
-
-      super.merge(jbossEnv, specEnv, overridenFile, overrideFile, mustOverride);
-
-      EJBLocalReferencesMetaData ejbLocalRefs = null;
-      EJBLocalReferencesMetaData jbossEjbLocalRefs = null;
-      PersistenceContextReferencesMetaData specPersistenceContextRefs = null;
-      PersistenceContextReferencesMetaData jbossPersistenceContextRefs = null;
-
-      if (specEnv != null)
-      {
-         ejbLocalRefs = specEnv.getEjbLocalReferences();
-         specPersistenceContextRefs = specEnv.getPersistenceContextRefs();
-      }
-      
-      if (jbossEnv != null)
-      {
-         jbossEjbLocalRefs = jbossEnv.getEjbLocalReferences();
-         jbossPersistenceContextRefs = jbossEnv.getPersistenceContextRefs();
-      }
-      else
-      {
-         // Use the merge target for the static merge methods
-         jbossEjbLocalRefs = this.getEjbLocalReferences();
-         jbossPersistenceContextRefs = getPersistenceContextRefs();
-      }
-
-      EJBLocalReferencesMetaData mergedEjbLocalRefs = EJBLocalReferencesMetaData.merge(jbossEjbLocalRefs, ejbLocalRefs, overridenFile, overrideFile);
-      if (mergedEjbLocalRefs != null)
-         this.setEjbLocalReferences(mergedEjbLocalRefs);
-      
-      // Need to set the jndi name from resource mgr if referenced
-      ResourceReferencesMetaData jbossResRefs = getResourceReferences();
-      if(resourceMgrs != null && jbossResRefs != null)
-      {
-         for(ResourceReferenceMetaData ref : jbossResRefs)
-         {
-            ResourceManagerMetaData mgr = resourceMgrs.get(ref.getResourceName());
-            if(mgr != null)
-            {
-               if(mgr.getResJndiName() != null)
-                  ref.setJndiName(mgr.getResJndiName());
-               else if(mgr.getResUrl() != null)
-                  ref.setResUrl(mgr.getResUrl());
-            }
-         }
-      }
-
-      PersistenceContextReferencesMetaData mergedPcRefs = PersistenceContextReferencesMetaData.merge(jbossPersistenceContextRefs,
-            specPersistenceContextRefs, overridenFile, overrideFile);
-      if (mergedPcRefs != null)
-         this.setPersistenceContextRefs(mergedPcRefs);
-      
-   }
-   
-   public void merge(JBossEnvironmentRefsGroupMetaData override, JBossEnvironmentRefsGroupMetaData original, ResourceManagersMetaData resourceManagers)
-   {
-      super.merge(override, original, "deployment descriptors", "annotations", false);
-      
-      EJBLocalReferencesMetaData originalLocalRefs = null;
-      PersistenceContextReferencesMetaData originalPctxRefs = null;
-      if(original != null)
-      {
-         originalLocalRefs = original.ejbLocalReferences;
-         originalPctxRefs = original.persistenceContextRefs;
-      }
-      
-      EJBLocalReferencesMetaData overrideLocalRefs = null;
-      PersistenceContextReferencesMetaData overridePctxRefs = null;
-      if(override != null)
-      {
-         overrideLocalRefs = override.ejbLocalReferences;
-         overridePctxRefs = override.persistenceContextRefs;
-      }
-
-      EJBLocalReferencesMetaData mergedEjbLocalRefs = EJBLocalReferencesMetaData.merge(overrideLocalRefs, originalLocalRefs, null, "jboss.xml");
-      if (mergedEjbLocalRefs != null)
-         this.setEjbLocalReferences(mergedEjbLocalRefs);
-      
-      PersistenceContextReferencesMetaData mergedPctxRefs = PersistenceContextReferencesMetaData.merge(overridePctxRefs, originalPctxRefs, null, "jboss.xml");
-      if(mergedPctxRefs != null)
-         this.setPersistenceContextRefs(mergedPctxRefs);
-
-      // Need to set the jndi name from resource mgr if referenced
-      ResourceReferencesMetaData jbossResRefs = getResourceReferences();
-      if(resourceManagers != null && jbossResRefs != null)
-      {
-         for(ResourceReferenceMetaData ref : jbossResRefs)
-         {
-            ResourceManagerMetaData mgr = resourceManagers.get(ref.getResourceName());
-            if(mgr != null)
-            {
-               if(mgr.getResJndiName() != null)
-                  ref.setJndiName(mgr.getResJndiName());
-               else if(mgr.getResUrl() != null)
-                  ref.setResUrl(mgr.getResUrl());
-            }
-         }
-      }
-   }
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/ejb/jboss/JBossEnvironmentRefsGroupMetaData.java (from rev 95649, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/ejb/jboss/JBossEnvironmentRefsGroupMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/ejb/jboss/JBossEnvironmentRefsGroupMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/ejb/jboss/JBossEnvironmentRefsGroupMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,287 @@
+/*
+* 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.ejb.jboss;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.jboss.JBossServiceReferenceMetaData;
+import org.jboss.metadata.javaee.jboss.JBossServiceReferencesMetaData;
+import org.jboss.metadata.javaee.spec.DataSourceMetaData;
+import org.jboss.metadata.javaee.spec.DataSourcesMetaData;
+import org.jboss.metadata.javaee.spec.EJBLocalReferenceMetaData;
+import org.jboss.metadata.javaee.spec.EJBLocalReferencesMetaData;
+import org.jboss.metadata.javaee.spec.Environment;
+import org.jboss.metadata.javaee.spec.EnvironmentRefsGroupMetaData;
+import org.jboss.metadata.javaee.spec.PersistenceContextReferenceMetaData;
+import org.jboss.metadata.javaee.spec.PersistenceContextReferencesMetaData;
+import org.jboss.metadata.javaee.spec.RemoteEnvironmentRefsGroupMetaData;
+import org.jboss.metadata.javaee.spec.ResourceReferenceMetaData;
+import org.jboss.metadata.javaee.spec.ResourceReferencesMetaData;
+import org.jboss.metadata.javaee.spec.ServiceReferencesMetaData;
+import org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+import org.jboss.xb.annotations.JBossXmlCollection;
+import org.jboss.xb.annotations.JBossXmlModelGroup;
+
+/**
+ * JBossEnvironmentRefsGroupMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at JBossXmlModelGroup(name="jndiEnvironmentRefsGroup",
+      propOrder={"environmentEntries", "ejbReferences", "ejbLocalReferences",
+      "serviceReferences", "resourceReferences", "resourceEnvironmentReferences",
+      "messageDestinationReferences", "persistenceContextRefs", "persistenceUnitRefs",
+      "postConstructs", "preDestroys", "dataSources"})
+public class JBossEnvironmentRefsGroupMetaData
+   extends RemoteEnvironmentRefsGroupMetaData
+   implements Serializable, Environment
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 4642263968653845579L;
+
+   /** The ejb local references */
+   private EJBLocalReferencesMetaData ejbLocalReferences;
+ 
+   /** The service references */
+   private JBossServiceReferencesMetaData serviceReferences;
+   
+   /** The persistence context reference */
+   private PersistenceContextReferencesMetaData persistenceContextRefs;
+
+   /** The data sources */
+   private DataSourcesMetaData dataSources;
+   
+   /**
+    * Merge an environment
+    * 
+    * @param jbossEnvironmentRefsGroup the override environment
+    * @param environmentRefsGroup the overriden environment
+    * @param overridenFile the overriden file name
+    * @param overrideFile the override file
+    * @return the merged environment
+    */
+   public static JBossEnvironmentRefsGroupMetaData mergeNew(JBossEnvironmentRefsGroupMetaData jbossEnvironmentRefsGroup,
+            EnvironmentRefsGroupMetaData environmentRefsGroup,
+            ResourceManagersMetaData resourceMgrs,
+            String overrideFile, String overridenFile, boolean mustOverride)
+   {
+      JBossEnvironmentRefsGroupMetaData merged = new JBossEnvironmentRefsGroupMetaData();
+      
+      merged.merge(jbossEnvironmentRefsGroup, environmentRefsGroup, resourceMgrs, overridenFile, overrideFile, mustOverride);
+      
+      return merged;
+   }
+
+   public EJBLocalReferenceMetaData getEjbLocalReferenceByName(String name)
+   {
+      EJBLocalReferenceMetaData ref = null;
+      if(this.ejbLocalReferences != null)
+         ref = ejbLocalReferences.get(name);
+      return ref;
+   }
+
+   public PersistenceContextReferenceMetaData getPersistenceContextReferenceByName(String name)
+   {
+      PersistenceContextReferenceMetaData ref = null;
+      if(this.persistenceContextRefs != null)
+         ref = persistenceContextRefs.get(name);
+      return ref;
+   }
+
+   public ServiceReferencesMetaData getServiceReferences()
+   {
+      return serviceReferences;
+   }
+
+   @JBossXmlCollection(type=JBossServiceReferencesMetaData.class)
+   @XmlElement(name="service-ref", type=JBossServiceReferenceMetaData.class)
+   public void setServiceReferences(ServiceReferencesMetaData serviceReferences)
+   {
+      this.serviceReferences = (JBossServiceReferencesMetaData) serviceReferences;
+   }
+
+
+   public EJBLocalReferencesMetaData getEjbLocalReferences()
+   {
+      return ejbLocalReferences;
+   }
+
+   @XmlElement(name="ejb-local-ref")
+   public void setEjbLocalReferences(EJBLocalReferencesMetaData ejbLocalReferences)
+   {
+      this.ejbLocalReferences = ejbLocalReferences;
+   }
+
+
+   public PersistenceContextReferencesMetaData getPersistenceContextRefs()
+   {
+      return persistenceContextRefs;
+   }
+
+   @XmlElement(name="persistence-context-ref")
+   public void setPersistenceContextRefs(PersistenceContextReferencesMetaData persistenceContextRefs)
+   {
+      this.persistenceContextRefs = persistenceContextRefs;
+   }
+
+   public DataSourcesMetaData getDataSources()
+   {
+      return dataSources;
+   }
+   @XmlElement(name="data-source")
+   public void setDataSources(DataSourcesMetaData dataSources)
+   {
+      this.dataSources = dataSources;
+   }
+   
+   public DataSourceMetaData getDataSourceByName(String name)
+   {
+      return AbstractMappedMetaData.getByName(name, dataSources);
+   }
+
+   /**
+    * Merge an environment
+    * 
+    * @param jbossEnvironmentRefsGroup the override environment
+    * @param environmentRefsGroup the overriden environment
+    * @param overridenFile the overriden file name
+    * @param overrideFile the override file
+    * @return the merged environment
+    */
+   public void merge(JBossEnvironmentRefsGroupMetaData jbossEnv,
+         Environment specEnv,
+         ResourceManagersMetaData resourceMgrs,
+         String overrideFile, String overridenFile, boolean mustOverride)
+   {
+      if (jbossEnv == null && specEnv == null)
+         return;
+
+      super.merge(jbossEnv, specEnv, overridenFile, overrideFile, mustOverride);
+
+      EJBLocalReferencesMetaData ejbLocalRefs = null;
+      EJBLocalReferencesMetaData jbossEjbLocalRefs = null;
+      PersistenceContextReferencesMetaData specPersistenceContextRefs = null;
+      PersistenceContextReferencesMetaData jbossPersistenceContextRefs = null;
+
+      if (specEnv != null)
+      {
+         ejbLocalRefs = specEnv.getEjbLocalReferences();
+         specPersistenceContextRefs = specEnv.getPersistenceContextRefs();
+      }
+      
+      if (jbossEnv != null)
+      {
+         jbossEjbLocalRefs = jbossEnv.getEjbLocalReferences();
+         jbossPersistenceContextRefs = jbossEnv.getPersistenceContextRefs();
+      }
+      else
+      {
+         // Use the merge target for the static merge methods
+         jbossEjbLocalRefs = this.getEjbLocalReferences();
+         jbossPersistenceContextRefs = getPersistenceContextRefs();
+      }
+
+      EJBLocalReferencesMetaData mergedEjbLocalRefs = EJBLocalReferencesMetaData.merge(jbossEjbLocalRefs, ejbLocalRefs, overridenFile, overrideFile);
+      if (mergedEjbLocalRefs != null)
+         this.setEjbLocalReferences(mergedEjbLocalRefs);
+      
+      // Need to set the jndi name from resource mgr if referenced
+      ResourceReferencesMetaData jbossResRefs = getResourceReferences();
+      if(resourceMgrs != null && jbossResRefs != null)
+      {
+         for(ResourceReferenceMetaData ref : jbossResRefs)
+         {
+            ResourceManagerMetaData mgr = resourceMgrs.get(ref.getResourceName());
+            if(mgr != null)
+            {
+               if(mgr.getResJndiName() != null)
+                  ref.setJndiName(mgr.getResJndiName());
+               else if(mgr.getResUrl() != null)
+                  ref.setResUrl(mgr.getResUrl());
+            }
+         }
+      }
+
+      PersistenceContextReferencesMetaData mergedPcRefs = PersistenceContextReferencesMetaData.merge(jbossPersistenceContextRefs,
+            specPersistenceContextRefs, overridenFile, overrideFile);
+      if (mergedPcRefs != null)
+         this.setPersistenceContextRefs(mergedPcRefs);
+      
+   }
+   
+   public void merge(JBossEnvironmentRefsGroupMetaData override, JBossEnvironmentRefsGroupMetaData original, ResourceManagersMetaData resourceManagers)
+   {
+      super.merge(override, original, "deployment descriptors", "annotations", false);
+      
+      EJBLocalReferencesMetaData originalLocalRefs = null;
+      PersistenceContextReferencesMetaData originalPctxRefs = null;
+      DataSourcesMetaData originalDataSources = null;
+      if(original != null)
+      {
+         originalLocalRefs = original.ejbLocalReferences;
+         originalPctxRefs = original.persistenceContextRefs;
+         originalDataSources = original.dataSources;
+      }
+      
+      EJBLocalReferencesMetaData overrideLocalRefs = null;
+      PersistenceContextReferencesMetaData overridePctxRefs = null;
+      DataSourcesMetaData overrideDataSources = null;
+      if(override != null)
+      {
+         overrideLocalRefs = override.ejbLocalReferences;
+         overridePctxRefs = override.persistenceContextRefs;
+         overrideDataSources = override.dataSources;
+      }
+
+      EJBLocalReferencesMetaData mergedEjbLocalRefs = EJBLocalReferencesMetaData.merge(overrideLocalRefs, originalLocalRefs, null, "jboss.xml");
+      if (mergedEjbLocalRefs != null)
+         this.setEjbLocalReferences(mergedEjbLocalRefs);
+      
+      PersistenceContextReferencesMetaData mergedPctxRefs = PersistenceContextReferencesMetaData.merge(overridePctxRefs, originalPctxRefs, null, "jboss.xml");
+      if(mergedPctxRefs != null)
+         this.setPersistenceContextRefs(mergedPctxRefs);
+
+      DataSourcesMetaData mergedDataSources = DataSourcesMetaData.merge(overrideDataSources, originalDataSources, null, "jboss.xml");
+      if(mergedDataSources != null)
+         this.setDataSources(mergedDataSources);
+
+      // Need to set the jndi name from resource mgr if referenced
+      ResourceReferencesMetaData jbossResRefs = getResourceReferences();
+      if(resourceManagers != null && jbossResRefs != null)
+      {
+         for(ResourceReferenceMetaData ref : jbossResRefs)
+         {
+            ResourceManagerMetaData mgr = resourceManagers.get(ref.getResourceName());
+            if(mgr != null)
+            {
+               if(mgr.getResJndiName() != null)
+                  ref.setJndiName(mgr.getResJndiName());
+               else if(mgr.getResUrl() != null)
+                  ref.setResUrl(mgr.getResUrl());
+            }
+         }
+      }
+   }
+}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec (from rev 95641, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec)

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/DataSourcesMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/DataSourcesMetaData.java	2009-10-28 01:40:57 UTC (rev 95641)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/DataSourcesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,83 +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.metadata.javaee.spec;
-
-import org.jboss.metadata.javaee.support.AbstractMappedMetaData;
-import org.jboss.metadata.javaee.support.AugmentableMetaData;
-import org.jboss.metadata.javaee.support.JavaEEMetaDataUtil;
-
-/**
- * @author Remy Maucherat
- * @version $Revision: 65928 $
- */
-public class DataSourcesMetaData extends AbstractMappedMetaData<DataSourceMetaData> 
-   implements AugmentableMetaData<DataSourcesMetaData>
-{
-   private static final long serialVersionUID = 1;
-   public DataSourcesMetaData()
-   {
-      super("data sources");
-   }
-   
-   /**
-    * Merge data sources
-    * 
-    * @param override the override references
-    * @param overriden the overriden references 
-    * @param overridenFile the overriden file name
-    * @param overrideFile the override file
-    * @return the merged referencees
-    */
-   public static DataSourcesMetaData merge(DataSourcesMetaData override,
-         DataSourcesMetaData overriden,
-         String overridenFile, String overrideFile)
-   {
-      if (override == null && overriden == null)
-         return null;
-      
-      if (override == null)
-         return overriden;
-      
-      DataSourcesMetaData merged = new DataSourcesMetaData();
-      return JavaEEMetaDataUtil.merge(merged, overriden, override, "data-source", overridenFile, overrideFile, false);
-   }
-
-   public void augment(DataSourcesMetaData webFragmentMetaData, DataSourcesMetaData webMetaData)
-   {
-      for (DataSourceMetaData dataSourceMetaData : webFragmentMetaData)
-      {
-         if (containsKey(dataSourceMetaData.getKey()))
-         {
-            if (webMetaData == null || !webMetaData.containsKey(dataSourceMetaData.getKey()))
-            {
-               throw new IllegalStateException("Unresolved conflict on data source named: " 
-                     + dataSourceMetaData.getKey());
-            }
-         }
-         else
-         {
-            add(dataSourceMetaData);
-         }
-      }
-   }
-   
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/DataSourcesMetaData.java (from rev 95649, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/DataSourcesMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/DataSourcesMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/DataSourcesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.metadata.javaee.spec;
+
+import org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
+import org.jboss.metadata.javaee.support.JavaEEMetaDataUtil;
+
+/**
+ * @author Remy Maucherat
+ * @version $Revision: 65928 $
+ */
+public class DataSourcesMetaData extends AbstractMappedMetaData<DataSourceMetaData> 
+   implements AugmentableMetaData<DataSourcesMetaData>
+{
+   private static final long serialVersionUID = 1;
+   public DataSourcesMetaData()
+   {
+      super("data sources");
+   }
+   
+   /**
+    * Merge data sources
+    * 
+    * @param override the override references
+    * @param overriden the overriden references 
+    * @param overridenFile the overriden file name
+    * @param overrideFile the override file
+    * @return the merged referencees
+    */
+   public static DataSourcesMetaData merge(DataSourcesMetaData override,
+         DataSourcesMetaData overriden,
+         String overridenFile, String overrideFile)
+   {
+      if (override == null && overriden == null)
+         return null;
+      
+      if (override == null)
+         return overriden;
+      
+      DataSourcesMetaData merged = new DataSourcesMetaData();
+      return JavaEEMetaDataUtil.merge(merged, overriden, override, "data-source", overridenFile, overrideFile, false);
+   }
+
+   public void augment(DataSourcesMetaData webFragmentMetaData, DataSourcesMetaData webMetaData, boolean resolveConflicts)
+   {
+      for (DataSourceMetaData dataSourceMetaData : webFragmentMetaData)
+      {
+         if (containsKey(dataSourceMetaData.getKey()))
+         {
+            if (!resolveConflicts && (webMetaData == null || !webMetaData.containsKey(dataSourceMetaData.getKey())))
+            {
+               throw new IllegalStateException("Unresolved conflict on data source named: " 
+                     + dataSourceMetaData.getKey());
+            }
+         }
+         else
+         {
+            add(dataSourceMetaData);
+         }
+      }
+   }
+   
+}

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EJBLocalReferencesMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/EJBLocalReferencesMetaData.java	2009-10-28 01:40:57 UTC (rev 95641)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EJBLocalReferencesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,95 +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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
-import org.jboss.metadata.javaee.support.AugmentableMetaData;
-import org.jboss.metadata.javaee.support.JavaEEMetaDataUtil;
-
-/**
- * EJBLocalReferencesMetaData.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class EJBLocalReferencesMetaData extends AbstractMappedMetaData<EJBLocalReferenceMetaData>
-   implements AugmentableMetaData<EJBLocalReferencesMetaData>
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = -7264371854666919529L;
-
-   /**
-    * Merge ejb local references
-    * 
-    * @param override the override references
-    * @param overriden the overriden references 
-    * @param overridenFile the overriden file name
-    * @param overrideFile the override file
-    * @return the merged referencees
-    */
-   public static EJBLocalReferencesMetaData merge(EJBLocalReferencesMetaData override,
-         EJBLocalReferencesMetaData overriden,
-         String overridenFile, String overrideFile)
-   {
-      if (override == null && overriden == null)
-         return null;
-      
-      if (override == null)
-         return overriden;
-      
-      EJBLocalReferencesMetaData merged = new EJBLocalReferencesMetaData();
-      return JavaEEMetaDataUtil.merge(merged, overriden, override, "ejb-local-ref", overridenFile, overrideFile, false);
-   }
-
-   /**
-    * Create a new EJBLocalReferencesMetaData.
-    */
-   public EJBLocalReferencesMetaData()
-   {
-      super("ejb local ref name");
-   }
-   
-   public void augment(EJBLocalReferencesMetaData augment, EJBLocalReferencesMetaData main)
-   {
-      for (EJBLocalReferenceMetaData ejbLocalReference : augment)
-      {
-         if (containsKey(ejbLocalReference.getKey()))
-         {
-            if (main == null || !main.containsKey(ejbLocalReference.getKey()))
-            {
-               throw new IllegalStateException("Unresolved conflict on ejb local reference named: " 
-                     + ejbLocalReference.getKey());
-            }
-            else
-            {
-               get(ejbLocalReference.getKey()).augment(ejbLocalReference, 
-                     (main != null) ? main.get(ejbLocalReference.getKey()) : null);
-            }
-         }
-         else
-         {
-            add(ejbLocalReference);
-         }
-      }
-   }
-   
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EJBLocalReferencesMetaData.java (from rev 95649, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/EJBLocalReferencesMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EJBLocalReferencesMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EJBLocalReferencesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,95 @@
+/*
+* 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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
+import org.jboss.metadata.javaee.support.JavaEEMetaDataUtil;
+
+/**
+ * EJBLocalReferencesMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class EJBLocalReferencesMetaData extends AbstractMappedMetaData<EJBLocalReferenceMetaData>
+   implements AugmentableMetaData<EJBLocalReferencesMetaData>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -7264371854666919529L;
+
+   /**
+    * Merge ejb local references
+    * 
+    * @param override the override references
+    * @param overriden the overriden references 
+    * @param overridenFile the overriden file name
+    * @param overrideFile the override file
+    * @return the merged referencees
+    */
+   public static EJBLocalReferencesMetaData merge(EJBLocalReferencesMetaData override,
+         EJBLocalReferencesMetaData overriden,
+         String overridenFile, String overrideFile)
+   {
+      if (override == null && overriden == null)
+         return null;
+      
+      if (override == null)
+         return overriden;
+      
+      EJBLocalReferencesMetaData merged = new EJBLocalReferencesMetaData();
+      return JavaEEMetaDataUtil.merge(merged, overriden, override, "ejb-local-ref", overridenFile, overrideFile, false);
+   }
+
+   /**
+    * Create a new EJBLocalReferencesMetaData.
+    */
+   public EJBLocalReferencesMetaData()
+   {
+      super("ejb local ref name");
+   }
+   
+   public void augment(EJBLocalReferencesMetaData augment, EJBLocalReferencesMetaData main, boolean resolveConflicts)
+   {
+      for (EJBLocalReferenceMetaData ejbLocalReference : augment)
+      {
+         if (containsKey(ejbLocalReference.getKey()))
+         {
+            if (!resolveConflicts && (main == null || !main.containsKey(ejbLocalReference.getKey())))
+            {
+               throw new IllegalStateException("Unresolved conflict on ejb local reference named: " 
+                     + ejbLocalReference.getKey());
+            }
+            else
+            {
+               get(ejbLocalReference.getKey()).augment(ejbLocalReference, 
+                     (main != null) ? main.get(ejbLocalReference.getKey()) : null, resolveConflicts);
+            }
+         }
+         else
+         {
+            add(ejbLocalReference);
+         }
+      }
+   }
+   
+}

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EJBReferencesMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/EJBReferencesMetaData.java	2009-10-28 01:40:57 UTC (rev 95641)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EJBReferencesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,95 +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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
-import org.jboss.metadata.javaee.support.AugmentableMetaData;
-import org.jboss.metadata.javaee.support.JavaEEMetaDataUtil;
-
-/**
- * EJBReferencesMetaData.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class EJBReferencesMetaData extends AbstractMappedMetaData<EJBReferenceMetaData>
-   implements AugmentableMetaData<EJBReferencesMetaData>
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = 605087131047162516L;
-
-   /**
-    * Merge ejb references
-    * 
-    * @param override the override references
-    * @param overriden the overriden references 
-    * @param overridenFile the overriden file name
-    * @param overrideFile the override file
-    * @return the merged referencees
-    */
-   public static EJBReferencesMetaData merge(EJBReferencesMetaData override,
-         EJBReferencesMetaData overriden, String overridenFile, String overrideFile,
-         boolean mustOverride)
-   {
-      if (override == null && overriden == null)
-         return null;
-      
-      if (override == null)
-         return overriden;
-      
-      EJBReferencesMetaData merged = new EJBReferencesMetaData();
-      return JavaEEMetaDataUtil.merge(merged, overriden, override, "ejb-ref", overridenFile, overrideFile, mustOverride);
-   }
-   
-   /**
-    * Create a new EJBReferencesMetaData.
-    */
-   public EJBReferencesMetaData()
-   {
-      super("ejb ref name");
-   }
-   
-   public void augment(EJBReferencesMetaData augment, EJBReferencesMetaData main)
-   {
-      for (EJBReferenceMetaData ejbReference : augment)
-      {
-         if (containsKey(ejbReference.getKey()))
-         {
-            if (main == null || !main.containsKey(ejbReference.getKey()))
-            {
-               throw new IllegalStateException("Unresolved conflict on EJB reference named: " 
-                     + ejbReference.getKey());
-            }
-            else
-            {
-               get(ejbReference.getKey()).augment(ejbReference, 
-                     (main != null) ? main.get(ejbReference.getKey()) : null);
-            }
-         }
-         else
-         {
-            add(ejbReference);
-         }
-      }
-   }
-   
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EJBReferencesMetaData.java (from rev 95649, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/EJBReferencesMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EJBReferencesMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EJBReferencesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,95 @@
+/*
+* 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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
+import org.jboss.metadata.javaee.support.JavaEEMetaDataUtil;
+
+/**
+ * EJBReferencesMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class EJBReferencesMetaData extends AbstractMappedMetaData<EJBReferenceMetaData>
+   implements AugmentableMetaData<EJBReferencesMetaData>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 605087131047162516L;
+
+   /**
+    * Merge ejb references
+    * 
+    * @param override the override references
+    * @param overriden the overriden references 
+    * @param overridenFile the overriden file name
+    * @param overrideFile the override file
+    * @return the merged referencees
+    */
+   public static EJBReferencesMetaData merge(EJBReferencesMetaData override,
+         EJBReferencesMetaData overriden, String overridenFile, String overrideFile,
+         boolean mustOverride)
+   {
+      if (override == null && overriden == null)
+         return null;
+      
+      if (override == null)
+         return overriden;
+      
+      EJBReferencesMetaData merged = new EJBReferencesMetaData();
+      return JavaEEMetaDataUtil.merge(merged, overriden, override, "ejb-ref", overridenFile, overrideFile, mustOverride);
+   }
+   
+   /**
+    * Create a new EJBReferencesMetaData.
+    */
+   public EJBReferencesMetaData()
+   {
+      super("ejb ref name");
+   }
+   
+   public void augment(EJBReferencesMetaData augment, EJBReferencesMetaData main, boolean resolveConflicts)
+   {
+      for (EJBReferenceMetaData ejbReference : augment)
+      {
+         if (containsKey(ejbReference.getKey()))
+         {
+            if (!resolveConflicts && (main == null || !main.containsKey(ejbReference.getKey())))
+            {
+               throw new IllegalStateException("Unresolved conflict on EJB reference named: " 
+                     + ejbReference.getKey());
+            }
+            else
+            {
+               get(ejbReference.getKey()).augment(ejbReference, 
+                     (main != null) ? main.get(ejbReference.getKey()) : null, resolveConflicts);
+            }
+         }
+         else
+         {
+            add(ejbReference);
+         }
+      }
+   }
+   
+}

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentEntriesMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentEntriesMetaData.java	2009-10-28 01:40:57 UTC (rev 95641)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentEntriesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,71 +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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
-import org.jboss.metadata.javaee.support.AugmentableMetaData;
-
-/**
- * EnvironmentEntriesMetaData.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class EnvironmentEntriesMetaData extends AbstractMappedMetaData<EnvironmentEntryMetaData>
-   implements AugmentableMetaData<EnvironmentEntriesMetaData>
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = -7573363440492577599L;
-
-   /**
-    * Create a new EnvironmentEntriesMetaData.
-    */
-   public EnvironmentEntriesMetaData()
-   {
-      super("env entry name");
-   }
-   
-   public void augment(EnvironmentEntriesMetaData augment, EnvironmentEntriesMetaData main)
-   {
-      for (EnvironmentEntryMetaData envEntry : augment)
-      {
-         if (containsKey(envEntry.getKey()))
-         {
-            if (main == null || !main.containsKey(envEntry.getKey()))
-            {
-               throw new IllegalStateException("Unresolved conflict on environment entry named: " 
-                     + envEntry.getKey());
-            }
-            else
-            {
-               get(envEntry.getKey()).augment(envEntry, 
-                     (main != null) ? main.get(envEntry.getKey()) : null);
-            }
-         }
-         else
-         {
-            add(envEntry);
-         }
-      }
-   }
-   
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentEntriesMetaData.java (from rev 95649, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentEntriesMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentEntriesMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentEntriesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,71 @@
+/*
+* 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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
+
+/**
+ * EnvironmentEntriesMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class EnvironmentEntriesMetaData extends AbstractMappedMetaData<EnvironmentEntryMetaData>
+   implements AugmentableMetaData<EnvironmentEntriesMetaData>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -7573363440492577599L;
+
+   /**
+    * Create a new EnvironmentEntriesMetaData.
+    */
+   public EnvironmentEntriesMetaData()
+   {
+      super("env entry name");
+   }
+   
+   public void augment(EnvironmentEntriesMetaData augment, EnvironmentEntriesMetaData main, boolean resolveConflicts)
+   {
+      for (EnvironmentEntryMetaData envEntry : augment)
+      {
+         if (containsKey(envEntry.getKey()))
+         {
+            if (!resolveConflicts && (main == null || !main.containsKey(envEntry.getKey())))
+            {
+               throw new IllegalStateException("Unresolved conflict on environment entry named: " 
+                     + envEntry.getKey());
+            }
+            else
+            {
+               get(envEntry.getKey()).augment(envEntry, 
+                     (main != null) ? main.get(envEntry.getKey()) : null, resolveConflicts);
+            }
+         }
+         else
+         {
+            add(envEntry);
+         }
+      }
+   }
+   
+}

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentRefsGroupMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentRefsGroupMetaData.java	2009-10-28 01:40:57 UTC (rev 95641)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentRefsGroupMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,230 +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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
-import org.jboss.xb.annotations.JBossXmlModelGroup;
-
-/**
- * EnvironmentRefsGroupMetaData.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
- at JBossXmlModelGroup(name="jndiEnvironmentRefsGroup",
-      propOrder={"environmentEntries", "ejbReferences", "ejbLocalReferences",
-      "serviceReferences", "resourceReferences", "resourceEnvironmentReferences",
-      "messageDestinationReferences", "persistenceContextRefs", "persistenceUnitRefs",
-      "postConstructs", "preDestroys", "dataSources"})
-public class EnvironmentRefsGroupMetaData extends RemoteEnvironmentRefsGroupMetaData
-   implements Serializable, Environment, MutableEnvironment
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = 1337095770028220349L;
-
-   /** The ejb local references */
-   private EJBLocalReferencesMetaData ejbLocalReferences;
- 
-   /** The persistence context reference */
-   private PersistenceContextReferencesMetaData persistenceContextRefs;
-
-   /** The data sources */
-   private DataSourcesMetaData dataSources;
-   
-   /**
-    * Create a new EnvironmentRefsGroupMetaData.
-    */
-   public EnvironmentRefsGroupMetaData()
-   {
-      // For serialization
-   }
-
-   /**
-    * Get the ejbLocalReferences.
-    * 
-    * @return the ejbLocalReferences.
-    */
-   public EJBLocalReferencesMetaData getEjbLocalReferences()
-   {
-      return ejbLocalReferences;
-   }
-
-   /**
-    * Set the ejbLocalReferences.
-    * 
-    * @param ejbLocalReferences the ejbLocalReferences.
-    * @throws IllegalArgumentException for a null ejbLocalReferences
-    */
-   @XmlElement(name="ejb-local-ref")
-   public void setEjbLocalReferences(EJBLocalReferencesMetaData ejbLocalReferences)
-   {
-      if (ejbLocalReferences == null)
-         throw new IllegalArgumentException("Null ejbLocalReferences");
-      this.ejbLocalReferences = ejbLocalReferences;
-   }
-
-   /**
-    * Get the persistenceContextRefs.
-    * 
-    * @return the persistenceContextRefs.
-    */
-   public PersistenceContextReferencesMetaData getPersistenceContextRefs()
-   {
-      return persistenceContextRefs;
-   }
-
-   private static PersistenceContextReferencesMetaData getPersistenceContextRefs(Environment env)
-   {
-      if(env == null)
-         return null;
-      return env.getPersistenceContextRefs();
-   }
-   
-   /**
-    * Set the persistenceContextRefs.
-    * 
-    * @param persistenceContextRefs the persistenceContextRefs.
-    * @throws IllegalArgumentException for a null persistenceContextRefs
-    */
-   @XmlElement(name="persistence-context-ref")
-   public void setPersistenceContextRefs(PersistenceContextReferencesMetaData persistenceContextRefs)
-   {
-      if (persistenceContextRefs == null)
-         throw new IllegalArgumentException("Null persistenceContextRefs");
-      this.persistenceContextRefs = persistenceContextRefs;
-   }
-
-   public EJBLocalReferenceMetaData getEjbLocalReferenceByName(String name)
-   {
-      return AbstractMappedMetaData.getByName(name, ejbLocalReferences);
-   }
-
-   public PersistenceContextReferenceMetaData getPersistenceContextReferenceByName(String name)
-   {
-      return AbstractMappedMetaData.getByName(name, persistenceContextRefs);
-   }
-
-   public DataSourcesMetaData getDataSources()
-   {
-      return dataSources;
-   }
-   @XmlElement(name="data-source")
-   public void setDataSources(DataSourcesMetaData dataSources)
-   {
-      this.dataSources = dataSources;
-   }
-   
-   public DataSourceMetaData getDataSourceByName(String name)
-   {
-      return AbstractMappedMetaData.getByName(name, dataSources);
-   }
-
-   private static DataSourcesMetaData getDataSources(Environment env)
-   {
-      if(env == null)
-         return null;
-      return env.getDataSources();
-   }
-   
-   public void merge(Environment jbossEnv, Environment specEnv,
-         String overridenFile, String overrideFile, boolean mustOverride)
-   {
-      super.merge(jbossEnv, specEnv, overrideFile, overridenFile, mustOverride);
-
-      EJBLocalReferencesMetaData ejbLocalRefs = null;
-      EJBLocalReferencesMetaData jbossEjbLocalRefs = null;
-
-      if (specEnv != null)
-      {
-         ejbLocalRefs = specEnv.getEjbLocalReferences();
-      }
-      
-      if (jbossEnv != null)
-      {
-         jbossEjbLocalRefs = jbossEnv.getEjbLocalReferences();
-      }
-      else
-      {
-         // Use the merge target for the static merge methods
-         jbossEjbLocalRefs = this.getEjbLocalReferences();
-      }
-
-      EJBLocalReferencesMetaData mergedEjbLocalRefs = EJBLocalReferencesMetaData.merge(jbossEjbLocalRefs, ejbLocalRefs, overridenFile, overrideFile);
-      if (mergedEjbLocalRefs != null)
-         this.setEjbLocalReferences(mergedEjbLocalRefs);
-
-     PersistenceContextReferencesMetaData persistenceContextRefs = PersistenceContextReferencesMetaData.merge(getPersistenceContextRefs(jbossEnv), getPersistenceContextRefs(specEnv), overridenFile, overrideFile);
-     if(persistenceContextRefs != null)
-        setPersistenceContextRefs(persistenceContextRefs);
-
-     DataSourcesMetaData dataSources = DataSourcesMetaData.merge(getDataSources(jbossEnv), getDataSources(specEnv), overridenFile, overrideFile);
-     if(dataSources != null)
-        setDataSources(dataSources);
-
-   }
-
-   public void augment(RemoteEnvironmentRefsGroupMetaData augment, RemoteEnvironmentRefsGroupMetaData main)
-   {
-      super.augment(augment, main);
-      EnvironmentRefsGroupMetaData augmentE = (EnvironmentRefsGroupMetaData) augment;
-      EnvironmentRefsGroupMetaData mainE = (EnvironmentRefsGroupMetaData) main;
-
-      // Data sources
-      if (getDataSources() == null)
-      {
-         setDataSources(augmentE.getDataSources());
-      }
-      else if (augmentE.getDataSources() != null)
-      {
-         getDataSources().augment(augmentE.getDataSources(), (mainE != null) ? mainE.getDataSources() : null);
-      }
-      
-      // EJB local references
-      if (getEjbLocalReferences() == null)
-      {
-         if (augmentE.getEjbLocalReferences() != null)
-            setEjbLocalReferences(augmentE.getEjbLocalReferences());
-      }
-      else if (augmentE.getEjbLocalReferences() != null)
-      {
-         getEjbLocalReferences().augment(augmentE.getEjbLocalReferences(), 
-               (mainE != null) ? mainE.getEjbLocalReferences() : null);
-      }
-      
-      // Persistence context refs
-      if (getPersistenceContextRefs() == null)
-      {
-         if (augmentE.getPersistenceContextRefs() != null)
-            setPersistenceContextRefs(augmentE.getPersistenceContextRefs());
-      }
-      else if (augmentE.getPersistenceContextRefs() != null)
-      {
-         getPersistenceContextRefs().augment(augmentE.getPersistenceContextRefs(), 
-               (mainE != null) ? mainE.getPersistenceContextRefs() : null);
-      }
-      
-   }
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentRefsGroupMetaData.java (from rev 95649, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentRefsGroupMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentRefsGroupMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/EnvironmentRefsGroupMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,231 @@
+/*
+* 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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+import org.jboss.xb.annotations.JBossXmlModelGroup;
+
+/**
+ * EnvironmentRefsGroupMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at JBossXmlModelGroup(name="jndiEnvironmentRefsGroup",
+      propOrder={"environmentEntries", "ejbReferences", "ejbLocalReferences",
+      "serviceReferences", "resourceReferences", "resourceEnvironmentReferences",
+      "messageDestinationReferences", "persistenceContextRefs", "persistenceUnitRefs",
+      "postConstructs", "preDestroys", "dataSources"})
+public class EnvironmentRefsGroupMetaData extends RemoteEnvironmentRefsGroupMetaData
+   implements Serializable, Environment, MutableEnvironment
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1337095770028220349L;
+
+   /** The ejb local references */
+   private EJBLocalReferencesMetaData ejbLocalReferences;
+ 
+   /** The persistence context reference */
+   private PersistenceContextReferencesMetaData persistenceContextRefs;
+
+   /** The data sources */
+   private DataSourcesMetaData dataSources;
+   
+   /**
+    * Create a new EnvironmentRefsGroupMetaData.
+    */
+   public EnvironmentRefsGroupMetaData()
+   {
+      // For serialization
+   }
+
+   /**
+    * Get the ejbLocalReferences.
+    * 
+    * @return the ejbLocalReferences.
+    */
+   public EJBLocalReferencesMetaData getEjbLocalReferences()
+   {
+      return ejbLocalReferences;
+   }
+
+   /**
+    * Set the ejbLocalReferences.
+    * 
+    * @param ejbLocalReferences the ejbLocalReferences.
+    * @throws IllegalArgumentException for a null ejbLocalReferences
+    */
+   @XmlElement(name="ejb-local-ref")
+   public void setEjbLocalReferences(EJBLocalReferencesMetaData ejbLocalReferences)
+   {
+      if (ejbLocalReferences == null)
+         throw new IllegalArgumentException("Null ejbLocalReferences");
+      this.ejbLocalReferences = ejbLocalReferences;
+   }
+
+   /**
+    * Get the persistenceContextRefs.
+    * 
+    * @return the persistenceContextRefs.
+    */
+   public PersistenceContextReferencesMetaData getPersistenceContextRefs()
+   {
+      return persistenceContextRefs;
+   }
+
+   private static PersistenceContextReferencesMetaData getPersistenceContextRefs(Environment env)
+   {
+      if(env == null)
+         return null;
+      return env.getPersistenceContextRefs();
+   }
+   
+   /**
+    * Set the persistenceContextRefs.
+    * 
+    * @param persistenceContextRefs the persistenceContextRefs.
+    * @throws IllegalArgumentException for a null persistenceContextRefs
+    */
+   @XmlElement(name="persistence-context-ref")
+   public void setPersistenceContextRefs(PersistenceContextReferencesMetaData persistenceContextRefs)
+   {
+      if (persistenceContextRefs == null)
+         throw new IllegalArgumentException("Null persistenceContextRefs");
+      this.persistenceContextRefs = persistenceContextRefs;
+   }
+
+   public EJBLocalReferenceMetaData getEjbLocalReferenceByName(String name)
+   {
+      return AbstractMappedMetaData.getByName(name, ejbLocalReferences);
+   }
+
+   public PersistenceContextReferenceMetaData getPersistenceContextReferenceByName(String name)
+   {
+      return AbstractMappedMetaData.getByName(name, persistenceContextRefs);
+   }
+
+   public DataSourcesMetaData getDataSources()
+   {
+      return dataSources;
+   }
+   @XmlElement(name="data-source")
+   public void setDataSources(DataSourcesMetaData dataSources)
+   {
+      this.dataSources = dataSources;
+   }
+   
+   public DataSourceMetaData getDataSourceByName(String name)
+   {
+      return AbstractMappedMetaData.getByName(name, dataSources);
+   }
+
+   private static DataSourcesMetaData getDataSources(Environment env)
+   {
+      if(env == null)
+         return null;
+      return env.getDataSources();
+   }
+   
+   public void merge(Environment jbossEnv, Environment specEnv,
+         String overridenFile, String overrideFile, boolean mustOverride)
+   {
+      super.merge(jbossEnv, specEnv, overrideFile, overridenFile, mustOverride);
+
+      EJBLocalReferencesMetaData ejbLocalRefs = null;
+      EJBLocalReferencesMetaData jbossEjbLocalRefs = null;
+
+      if (specEnv != null)
+      {
+         ejbLocalRefs = specEnv.getEjbLocalReferences();
+      }
+      
+      if (jbossEnv != null)
+      {
+         jbossEjbLocalRefs = jbossEnv.getEjbLocalReferences();
+      }
+      else
+      {
+         // Use the merge target for the static merge methods
+         jbossEjbLocalRefs = this.getEjbLocalReferences();
+      }
+
+      EJBLocalReferencesMetaData mergedEjbLocalRefs = EJBLocalReferencesMetaData.merge(jbossEjbLocalRefs, ejbLocalRefs, overridenFile, overrideFile);
+      if (mergedEjbLocalRefs != null)
+         this.setEjbLocalReferences(mergedEjbLocalRefs);
+
+     PersistenceContextReferencesMetaData persistenceContextRefs = PersistenceContextReferencesMetaData.merge(getPersistenceContextRefs(jbossEnv), getPersistenceContextRefs(specEnv), overridenFile, overrideFile);
+     if(persistenceContextRefs != null)
+        setPersistenceContextRefs(persistenceContextRefs);
+
+     DataSourcesMetaData dataSources = DataSourcesMetaData.merge(getDataSources(jbossEnv), getDataSources(specEnv), overridenFile, overrideFile);
+     if(dataSources != null)
+        setDataSources(dataSources);
+
+   }
+
+   public void augment(RemoteEnvironmentRefsGroupMetaData augment, RemoteEnvironmentRefsGroupMetaData main, boolean resolveConflicts)
+   {
+      super.augment(augment, main, resolveConflicts);
+      EnvironmentRefsGroupMetaData augmentE = (EnvironmentRefsGroupMetaData) augment;
+      EnvironmentRefsGroupMetaData mainE = (EnvironmentRefsGroupMetaData) main;
+
+      // Data sources
+      if (getDataSources() == null)
+      {
+         setDataSources(augmentE.getDataSources());
+      }
+      else if (augmentE.getDataSources() != null)
+      {
+         getDataSources().augment(augmentE.getDataSources(), 
+               (mainE != null) ? mainE.getDataSources() : null, resolveConflicts);
+      }
+      
+      // EJB local references
+      if (getEjbLocalReferences() == null)
+      {
+         if (augmentE.getEjbLocalReferences() != null)
+            setEjbLocalReferences(augmentE.getEjbLocalReferences());
+      }
+      else if (augmentE.getEjbLocalReferences() != null)
+      {
+         getEjbLocalReferences().augment(augmentE.getEjbLocalReferences(), 
+               (mainE != null) ? mainE.getEjbLocalReferences() : null, resolveConflicts);
+      }
+      
+      // Persistence context refs
+      if (getPersistenceContextRefs() == null)
+      {
+         if (augmentE.getPersistenceContextRefs() != null)
+            setPersistenceContextRefs(augmentE.getPersistenceContextRefs());
+      }
+      else if (augmentE.getPersistenceContextRefs() != null)
+      {
+         getPersistenceContextRefs().augment(augmentE.getPersistenceContextRefs(), 
+               (mainE != null) ? mainE.getPersistenceContextRefs() : null, resolveConflicts);
+      }
+      
+   }
+}

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/LifecycleCallbacksMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/LifecycleCallbacksMetaData.java	2009-10-28 01:40:57 UTC (rev 95641)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/LifecycleCallbacksMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,144 +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.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.jboss.metadata.javaee.support.AugmentableMetaData;
-
-/**
- * LifecycleCallbacksMetaData.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class LifecycleCallbacksMetaData extends ArrayList<LifecycleCallbackMetaData>
-   implements AugmentableMetaData<LifecycleCallbacksMetaData>
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = -3843612778667898679L;
-
-   /**
-    * Create a new LifecycleCallbacksMetaData.
-    */
-   public LifecycleCallbacksMetaData()
-   {
-      // For serialization
-   }
-
-   /**
-    * Return a list of the post construct callbacks ordered according to the spec rules defined in
-    * 12.4.1 Multiple Callback Interceptor Methods for a Life Cycle Callback Event.
-    * 
-    * @param defaultClass
-    * @return
-    */
-   public List<Method> getOrderedCallbacks(Class<?> defaultClass)
-   {
-      if(isEmpty())
-         return Collections.emptyList();
-
-      Class<?> parameterTypes[] = new Class[0];
-      ClassLoader cl = Thread.currentThread().getContextClassLoader();
-      String className = null;
-      String methodName = null;
-
-      try
-      {
-         Set<Class<?>> callbacksSet = new HashSet<Class<?>>();
-         LinkedList<Method> methods = new LinkedList<Method>();
-         for (LifecycleCallbackMetaData callback : this)
-         {
-            className = callback.getClassName();
-            methodName = callback.getMethodName();
-            Class<?> lifecycleClass = className == null ? defaultClass : cl.loadClass(className);
-
-            // If we haven't yet added the callback for this class
-            if (callbacksSet.add(lifecycleClass))
-            {
-               Method method = lifecycleClass.getDeclaredMethod(methodName, parameterTypes);
-
-               boolean added = false;
-               for (int i = 0; i < methods.size(); ++i)
-               {
-                  Method m = methods.get(i);
-                  Class<?> methodClass = m.getDeclaringClass();
-                  // insert the class before the current class in the list if the class is a superclass of the current class
-                  if (lifecycleClass.isAssignableFrom(methodClass))
-                  {
-                     methods.add(i, method);
-                     added = true;
-                     break;
-                  }
-                  // insert the class before the current class in the list
-                  // if the class is not a subclass of the current class and
-                  // it is a superclass of the default class or the default class itself 
-                  else if(!methodClass.isAssignableFrom(lifecycleClass) &&
-                        (lifecycleClass == defaultClass || lifecycleClass.isAssignableFrom(defaultClass)))
-                  {
-                     methods.add(i, method);
-                     added = true;
-                     break;
-                  }
-               }
-
-               if (!added)
-                  methods.add(method);
-            }
-         }
-         
-         return methods;
-      }
-      catch (ClassNotFoundException e)
-      {
-         throw new IllegalStateException("Failed to load class for callback method " + methodName + ": " + className, e);
-      }
-      catch (NoSuchMethodException e)
-      {
-         throw new IllegalStateException("Failed to get callback method in class " + className + ": " + methodName, e);
-      }
-   }
-   
-   public void augment(LifecycleCallbacksMetaData augment, LifecycleCallbacksMetaData main)
-   {
-      if (main != null && main.size() > 0)
-      {
-         // If main contains lifecycle callbacks, drop the all lifecycle callbacks
-         clear();
-      }
-      else
-      {
-         // Add injection targets
-         if (augment != null)
-         {
-            addAll(augment);
-         }
-      }
-   }
-
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/LifecycleCallbacksMetaData.java (from rev 95649, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/LifecycleCallbacksMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/LifecycleCallbacksMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/LifecycleCallbacksMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,144 @@
+/*
+* 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.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
+
+/**
+ * LifecycleCallbacksMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class LifecycleCallbacksMetaData extends ArrayList<LifecycleCallbackMetaData>
+   implements AugmentableMetaData<LifecycleCallbacksMetaData>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -3843612778667898679L;
+
+   /**
+    * Create a new LifecycleCallbacksMetaData.
+    */
+   public LifecycleCallbacksMetaData()
+   {
+      // For serialization
+   }
+
+   /**
+    * Return a list of the post construct callbacks ordered according to the spec rules defined in
+    * 12.4.1 Multiple Callback Interceptor Methods for a Life Cycle Callback Event.
+    * 
+    * @param defaultClass
+    * @return
+    */
+   public List<Method> getOrderedCallbacks(Class<?> defaultClass)
+   {
+      if(isEmpty())
+         return Collections.emptyList();
+
+      Class<?> parameterTypes[] = new Class[0];
+      ClassLoader cl = Thread.currentThread().getContextClassLoader();
+      String className = null;
+      String methodName = null;
+
+      try
+      {
+         Set<Class<?>> callbacksSet = new HashSet<Class<?>>();
+         LinkedList<Method> methods = new LinkedList<Method>();
+         for (LifecycleCallbackMetaData callback : this)
+         {
+            className = callback.getClassName();
+            methodName = callback.getMethodName();
+            Class<?> lifecycleClass = className == null ? defaultClass : cl.loadClass(className);
+
+            // If we haven't yet added the callback for this class
+            if (callbacksSet.add(lifecycleClass))
+            {
+               Method method = lifecycleClass.getDeclaredMethod(methodName, parameterTypes);
+
+               boolean added = false;
+               for (int i = 0; i < methods.size(); ++i)
+               {
+                  Method m = methods.get(i);
+                  Class<?> methodClass = m.getDeclaringClass();
+                  // insert the class before the current class in the list if the class is a superclass of the current class
+                  if (lifecycleClass.isAssignableFrom(methodClass))
+                  {
+                     methods.add(i, method);
+                     added = true;
+                     break;
+                  }
+                  // insert the class before the current class in the list
+                  // if the class is not a subclass of the current class and
+                  // it is a superclass of the default class or the default class itself 
+                  else if(!methodClass.isAssignableFrom(lifecycleClass) &&
+                        (lifecycleClass == defaultClass || lifecycleClass.isAssignableFrom(defaultClass)))
+                  {
+                     methods.add(i, method);
+                     added = true;
+                     break;
+                  }
+               }
+
+               if (!added)
+                  methods.add(method);
+            }
+         }
+         
+         return methods;
+      }
+      catch (ClassNotFoundException e)
+      {
+         throw new IllegalStateException("Failed to load class for callback method " + methodName + ": " + className, e);
+      }
+      catch (NoSuchMethodException e)
+      {
+         throw new IllegalStateException("Failed to get callback method in class " + className + ": " + methodName, e);
+      }
+   }
+   
+   public void augment(LifecycleCallbacksMetaData augment, LifecycleCallbacksMetaData main, boolean resolveConflicts)
+   {
+      if (main != null && main.size() > 0)
+      {
+         // If main contains lifecycle callbacks, drop the all lifecycle callbacks
+         clear();
+      }
+      else
+      {
+         // Add injection targets
+         if (augment != null)
+         {
+            addAll(augment);
+         }
+      }
+   }
+
+}

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationMetaData.java	2009-10-28 01:40:57 UTC (rev 95641)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,201 +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.AugmentableMetaData;
-import org.jboss.metadata.javaee.support.MergeableMappedMetaData;
-import org.jboss.metadata.javaee.support.NamedMetaDataWithDescriptionGroup;
-
-/**
- * MessageDestinationMetaData.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
- at XmlType(name="message-destinationType", propOrder={"descriptionGroup", "messageDestinationName", "jndiName", "mappedName", "lookupName"})
-public class MessageDestinationMetaData extends NamedMetaDataWithDescriptionGroup 
-   implements MergeableMappedMetaData<MessageDestinationMetaData>, AugmentableMetaData<MessageDestinationMetaData>
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = 2129990191983873784L;
-
-   /** The mapped name */
-   private String mappedName;
-   /** The lookup name */
-   private String lookupName;
-
-   /**
-    * Create a new MessageDestinationMetaData.
-    */
-   public MessageDestinationMetaData()
-   {
-      // For serialization
-   }
-
-   /**
-    * Get the messageDestinationName.
-    * 
-    * @return the messageDestinationName.
-    */
-   public String getMessageDestinationName()
-   {
-      return getName();
-   }
-
-   /**
-    * Set the messageDestinationName.
-    * 
-    * @param messageDestinationName the messageDestinationName.
-    * @throws IllegalArgumentException for a null messageDestinationName
-    */
-   public void setMessageDestinationName(String messageDestinationName)
-   {
-      setName(messageDestinationName);
-   }
-
-   /**
-    * Get the mappedName.
-    * 
-    * @return the mappedName.
-    */
-   public String getMappedName()
-   {
-      return mappedName;
-   }
-
-   /**
-    * Set the mappedName.
-    * 
-    * @param mappedName the mappedName.
-    * @throws IllegalArgumentException for a null mappedName
-    */
-   @XmlElement(required=false)
-   public void setMappedName(String mappedName)
-   {
-      if (mappedName == null)
-         throw new IllegalArgumentException("Null mappedName");
-      this.mappedName = mappedName;
-   }
-
-   /**
-    * Get the jndiName.
-    * 
-    * @return the jndiName.
-    */
-   public String getJndiName()
-   {
-      return getMappedName();
-   }
-
-   /**
-    * Set the jndiName.
-    * 
-    * @param jndiName the jndiName.
-    * @throws IllegalArgumentException for a null jndiName
-    */
-   @XmlElement(required=false)
-   public void setJndiName(String jndiName)
-   {
-      setMappedName(jndiName);
-   }
-
-   /**
-    * Get the lookupName.
-    * 
-    * @return the lookupName.
-    */
-   public String getLookupName()
-   {
-      return lookupName;
-   }
-
-   /**
-    * Set the lookupName.
-    * 
-    * @param lookupName the lookupName.
-    */
-   public void setLookupName(String lookupName)
-   {
-      this.lookupName = lookupName;
-   }
-
-   public MessageDestinationMetaData merge(MessageDestinationMetaData original)
-   {
-      MessageDestinationMetaData merged = new MessageDestinationMetaData();
-      merged.merge(this, original);
-      return merged;
-   }
-
-   /**
-    * Merge the contents of override with original into this.
-    * 
-    * @param override data which overrides original
-    * @param original the original data
-    */
-   public void merge(MessageDestinationMetaData override, MessageDestinationMetaData 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.lookupName != null)
-         setLookupName(override.lookupName);
-      else if (original.lookupName != null)
-         setLookupName(original.lookupName);
-   }
-   
-   public void augment(MessageDestinationMetaData augment,
-         MessageDestinationMetaData main)
-   {
-      // Mapped name
-      if (getMappedName() == null)
-      {
-         setMappedName(augment.getMappedName());
-      }
-      else if (augment.getMappedName() != null)
-      {
-         if (main != null && !getMappedName().equals(augment.getMappedName()) 
-               && main.getMappedName() == null)
-         {
-            throw new IllegalStateException("Unresolved conflict on mapped name: " + getMappedName());
-         }
-      }
-      // Lookup name
-      if (getLookupName() == null)
-      {
-         setLookupName(augment.getLookupName());
-      }
-      else if (augment.getLookupName() != null)
-      {
-         if (main != null && !getLookupName().equals(augment.getLookupName()) 
-               && main.getLookupName() == null)
-         {
-            throw new IllegalStateException("Unresolved conflict on lookup name: " + getLookupName());
-         }
-      }
-   }
-   
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationMetaData.java (from rev 95649, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,201 @@
+/*
+* 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.AugmentableMetaData;
+import org.jboss.metadata.javaee.support.MergeableMappedMetaData;
+import org.jboss.metadata.javaee.support.NamedMetaDataWithDescriptionGroup;
+
+/**
+ * MessageDestinationMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlType(name="message-destinationType", propOrder={"descriptionGroup", "messageDestinationName", "jndiName", "mappedName", "lookupName"})
+public class MessageDestinationMetaData extends NamedMetaDataWithDescriptionGroup 
+   implements MergeableMappedMetaData<MessageDestinationMetaData>, AugmentableMetaData<MessageDestinationMetaData>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 2129990191983873784L;
+
+   /** The mapped name */
+   private String mappedName;
+   /** The lookup name */
+   private String lookupName;
+
+   /**
+    * Create a new MessageDestinationMetaData.
+    */
+   public MessageDestinationMetaData()
+   {
+      // For serialization
+   }
+
+   /**
+    * Get the messageDestinationName.
+    * 
+    * @return the messageDestinationName.
+    */
+   public String getMessageDestinationName()
+   {
+      return getName();
+   }
+
+   /**
+    * Set the messageDestinationName.
+    * 
+    * @param messageDestinationName the messageDestinationName.
+    * @throws IllegalArgumentException for a null messageDestinationName
+    */
+   public void setMessageDestinationName(String messageDestinationName)
+   {
+      setName(messageDestinationName);
+   }
+
+   /**
+    * Get the mappedName.
+    * 
+    * @return the mappedName.
+    */
+   public String getMappedName()
+   {
+      return mappedName;
+   }
+
+   /**
+    * Set the mappedName.
+    * 
+    * @param mappedName the mappedName.
+    * @throws IllegalArgumentException for a null mappedName
+    */
+   @XmlElement(required=false)
+   public void setMappedName(String mappedName)
+   {
+      if (mappedName == null)
+         throw new IllegalArgumentException("Null mappedName");
+      this.mappedName = mappedName;
+   }
+
+   /**
+    * Get the jndiName.
+    * 
+    * @return the jndiName.
+    */
+   public String getJndiName()
+   {
+      return getMappedName();
+   }
+
+   /**
+    * Set the jndiName.
+    * 
+    * @param jndiName the jndiName.
+    * @throws IllegalArgumentException for a null jndiName
+    */
+   @XmlElement(required=false)
+   public void setJndiName(String jndiName)
+   {
+      setMappedName(jndiName);
+   }
+
+   /**
+    * Get the lookupName.
+    * 
+    * @return the lookupName.
+    */
+   public String getLookupName()
+   {
+      return lookupName;
+   }
+
+   /**
+    * Set the lookupName.
+    * 
+    * @param lookupName the lookupName.
+    */
+   public void setLookupName(String lookupName)
+   {
+      this.lookupName = lookupName;
+   }
+
+   public MessageDestinationMetaData merge(MessageDestinationMetaData original)
+   {
+      MessageDestinationMetaData merged = new MessageDestinationMetaData();
+      merged.merge(this, original);
+      return merged;
+   }
+
+   /**
+    * Merge the contents of override with original into this.
+    * 
+    * @param override data which overrides original
+    * @param original the original data
+    */
+   public void merge(MessageDestinationMetaData override, MessageDestinationMetaData 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.lookupName != null)
+         setLookupName(override.lookupName);
+      else if (original.lookupName != null)
+         setLookupName(original.lookupName);
+   }
+   
+   public void augment(MessageDestinationMetaData augment,
+         MessageDestinationMetaData main, boolean resolveConflicts)
+   {
+      // Mapped name
+      if (getMappedName() == null)
+      {
+         setMappedName(augment.getMappedName());
+      }
+      else if (augment.getMappedName() != null)
+      {
+         if (!resolveConflicts && !getMappedName().equals(augment.getMappedName()) 
+               && (main == null || main.getMappedName() == null))
+         {
+            throw new IllegalStateException("Unresolved conflict on mapped name: " + getMappedName());
+         }
+      }
+      // Lookup name
+      if (getLookupName() == null)
+      {
+         setLookupName(augment.getLookupName());
+      }
+      else if (augment.getLookupName() != null)
+      {
+         if (!resolveConflicts && !getLookupName().equals(augment.getLookupName()) 
+               && (main == null || main.getLookupName() == null))
+         {
+            throw new IllegalStateException("Unresolved conflict on lookup name: " + getLookupName());
+         }
+      }
+   }
+   
+}

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationReferencesMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationReferencesMetaData.java	2009-10-28 01:40:57 UTC (rev 95641)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationReferencesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,96 +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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
-import org.jboss.metadata.javaee.support.AugmentableMetaData;
-import org.jboss.metadata.javaee.support.JavaEEMetaDataUtil;
-
-/**
- * MessageDestinationReferencesMetaData.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class MessageDestinationReferencesMetaData extends AbstractMappedMetaData<MessageDestinationReferenceMetaData>
-   implements AugmentableMetaData<MessageDestinationReferencesMetaData>
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = -5571423286458126147L;
-
-   /**
-    * Merge message destination references
-    * 
-    * @param override the override references
-    * @param overriden the overriden references 
-    * @param overridenFile the overriden file name
-    * @param overrideFile the override file
-    * @return the merged referencees
-    */
-   public static MessageDestinationReferencesMetaData merge(MessageDestinationReferencesMetaData override,
-         MessageDestinationReferencesMetaData overriden,
-         String overridenFile, String overrideFile,
-         boolean mustOverride)
-   {
-      if (override == null && overriden == null)
-         return null;
-      
-      if (override == null)
-         return overriden;
-      
-      MessageDestinationReferencesMetaData merged = new MessageDestinationReferencesMetaData();
-      return JavaEEMetaDataUtil.merge(merged, overriden, override, "message-destination-ref", overridenFile, overrideFile, mustOverride);
-   }
-
-   /**
-    * Create a new MessageDestinationReferencesMetaData.
-    */
-   public MessageDestinationReferencesMetaData()
-   {
-      super("message destination ref name");
-   }
-   
-   public void augment(MessageDestinationReferencesMetaData augment, MessageDestinationReferencesMetaData main)
-   {
-      for (MessageDestinationReferenceMetaData messageDestinationRef : augment)
-      {
-         if (containsKey(messageDestinationRef.getKey()))
-         {
-            if (main == null || !main.containsKey(messageDestinationRef.getKey()))
-            {
-               throw new IllegalStateException("Unresolved conflict on message destination reference named: " 
-                     + messageDestinationRef.getKey());
-            }
-            else
-            {
-               get(messageDestinationRef.getKey()).augment(messageDestinationRef, 
-                     (main != null) ? main.get(messageDestinationRef.getKey()) : null);
-            }
-         }
-         else
-         {
-            add(messageDestinationRef);
-         }
-      }
-   }
-   
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationReferencesMetaData.java (from rev 95649, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationReferencesMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationReferencesMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationReferencesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,97 @@
+/*
+* 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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
+import org.jboss.metadata.javaee.support.JavaEEMetaDataUtil;
+
+/**
+ * MessageDestinationReferencesMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class MessageDestinationReferencesMetaData extends AbstractMappedMetaData<MessageDestinationReferenceMetaData>
+   implements AugmentableMetaData<MessageDestinationReferencesMetaData>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -5571423286458126147L;
+
+   /**
+    * Merge message destination references
+    * 
+    * @param override the override references
+    * @param overriden the overriden references 
+    * @param overridenFile the overriden file name
+    * @param overrideFile the override file
+    * @return the merged referencees
+    */
+   public static MessageDestinationReferencesMetaData merge(MessageDestinationReferencesMetaData override,
+         MessageDestinationReferencesMetaData overriden,
+         String overridenFile, String overrideFile,
+         boolean mustOverride)
+   {
+      if (override == null && overriden == null)
+         return null;
+      
+      if (override == null)
+         return overriden;
+      
+      MessageDestinationReferencesMetaData merged = new MessageDestinationReferencesMetaData();
+      return JavaEEMetaDataUtil.merge(merged, overriden, override, "message-destination-ref", overridenFile, overrideFile, mustOverride);
+   }
+
+   /**
+    * Create a new MessageDestinationReferencesMetaData.
+    */
+   public MessageDestinationReferencesMetaData()
+   {
+      super("message destination ref name");
+   }
+   
+   public void augment(MessageDestinationReferencesMetaData augment, 
+         MessageDestinationReferencesMetaData main, boolean resolveConflicts)
+   {
+      for (MessageDestinationReferenceMetaData messageDestinationRef : augment)
+      {
+         if (containsKey(messageDestinationRef.getKey()))
+         {
+            if (!resolveConflicts && (main == null || !main.containsKey(messageDestinationRef.getKey())))
+            {
+               throw new IllegalStateException("Unresolved conflict on message destination reference named: " 
+                     + messageDestinationRef.getKey());
+            }
+            else
+            {
+               get(messageDestinationRef.getKey()).augment(messageDestinationRef, 
+                     (main != null) ? main.get(messageDestinationRef.getKey()) : null, resolveConflicts);
+            }
+         }
+         else
+         {
+            add(messageDestinationRef);
+         }
+      }
+   }
+   
+}

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationsMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationsMetaData.java	2009-10-28 01:40:57 UTC (rev 95641)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationsMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,96 +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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
-import org.jboss.metadata.javaee.support.AugmentableMetaData;
-import org.jboss.metadata.javaee.support.JavaEEMetaDataUtil;
-import org.jboss.metadata.merge.MergeUtil;
-
-/**
- * MessageDestinationsMetaData.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 67878 $
- */
-public class MessageDestinationsMetaData extends AbstractMappedMetaData<MessageDestinationMetaData>
-   implements AugmentableMetaData<MessageDestinationsMetaData>
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = -6198704374773701253L;
-
-   /**
-   /**
-    * Merge the contents of override with original into a new MessageDestinationsMetaData.
-    * @param override - metadata augmenting overriden
-    * @param overriden - the base metadata
-    * @param overridenFile - the source of the override destinations
-    * @param overrideFile- the source of the overriden destinations
-    * @return a new merged MessageDestinationsMetaData if either
-    * override and overriden is not null, null otherwise.
-    */
-   public static MessageDestinationsMetaData merge(MessageDestinationsMetaData override,
-         MessageDestinationsMetaData overriden,
-         String overridenFile, String overrideFile)
-   {
-      if (override == null && overriden == null)
-         return null;
-      
-      if (override == null)
-         return overriden;
-      
-      MessageDestinationsMetaData merged = new MessageDestinationsMetaData();
-      // mustOverride is false because legacy jboss descriptors not having a message-destination
-      return JavaEEMetaDataUtil.merge(merged, overriden, override, "message-destination", overridenFile, overrideFile, false);
-   }
-
-   /**
-    * Create a new MessageDestinationsMetaData.
-    */
-   public MessageDestinationsMetaData()
-   {
-      super("message destination name");
-   }
-
-   public void merge(MessageDestinationsMetaData override, MessageDestinationsMetaData original)
-   {
-      super.merge(override, original);
-      MergeUtil.merge(this, override, original);
-   }
-
-   public void augment(MessageDestinationsMetaData augment,
-         MessageDestinationsMetaData main)
-   {
-      for (MessageDestinationMetaData messageDestinationMetaData : augment)
-      {
-         if (containsKey(messageDestinationMetaData.getKey()))
-         {
-            get(messageDestinationMetaData.getKey()).augment(messageDestinationMetaData, 
-                  (main != null) ? main.get(messageDestinationMetaData.getKey()) : null);
-         }
-         else
-         {
-            add(messageDestinationMetaData);
-         }
-      }
-   }
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationsMetaData.java (from rev 95649, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationsMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationsMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationsMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,96 @@
+/*
+* 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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
+import org.jboss.metadata.javaee.support.JavaEEMetaDataUtil;
+import org.jboss.metadata.merge.MergeUtil;
+
+/**
+ * MessageDestinationsMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 67878 $
+ */
+public class MessageDestinationsMetaData extends AbstractMappedMetaData<MessageDestinationMetaData>
+   implements AugmentableMetaData<MessageDestinationsMetaData>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -6198704374773701253L;
+
+   /**
+   /**
+    * Merge the contents of override with original into a new MessageDestinationsMetaData.
+    * @param override - metadata augmenting overriden
+    * @param overriden - the base metadata
+    * @param overridenFile - the source of the override destinations
+    * @param overrideFile- the source of the overriden destinations
+    * @return a new merged MessageDestinationsMetaData if either
+    * override and overriden is not null, null otherwise.
+    */
+   public static MessageDestinationsMetaData merge(MessageDestinationsMetaData override,
+         MessageDestinationsMetaData overriden,
+         String overridenFile, String overrideFile)
+   {
+      if (override == null && overriden == null)
+         return null;
+      
+      if (override == null)
+         return overriden;
+      
+      MessageDestinationsMetaData merged = new MessageDestinationsMetaData();
+      // mustOverride is false because legacy jboss descriptors not having a message-destination
+      return JavaEEMetaDataUtil.merge(merged, overriden, override, "message-destination", overridenFile, overrideFile, false);
+   }
+
+   /**
+    * Create a new MessageDestinationsMetaData.
+    */
+   public MessageDestinationsMetaData()
+   {
+      super("message destination name");
+   }
+
+   public void merge(MessageDestinationsMetaData override, MessageDestinationsMetaData original)
+   {
+      super.merge(override, original);
+      MergeUtil.merge(this, override, original);
+   }
+
+   public void augment(MessageDestinationsMetaData augment,
+         MessageDestinationsMetaData main, boolean resolveConflicts)
+   {
+      for (MessageDestinationMetaData messageDestinationMetaData : augment)
+      {
+         if (containsKey(messageDestinationMetaData.getKey()))
+         {
+            get(messageDestinationMetaData.getKey()).augment(messageDestinationMetaData, 
+                  (main != null) ? main.get(messageDestinationMetaData.getKey()) : null, resolveConflicts);
+         }
+         else
+         {
+            add(messageDestinationMetaData);
+         }
+      }
+   }
+}

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/PersistenceContextReferencesMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/PersistenceContextReferencesMetaData.java	2009-10-28 01:40:57 UTC (rev 95641)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/PersistenceContextReferencesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,86 +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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
-import org.jboss.metadata.javaee.support.AugmentableMetaData;
-import org.jboss.metadata.javaee.support.JavaEEMetaDataUtil;
-
-/**
- * PersistenceContextReferencesMetaData.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class PersistenceContextReferencesMetaData extends AbstractMappedMetaData<PersistenceContextReferenceMetaData>
-   implements AugmentableMetaData<PersistenceContextReferencesMetaData>
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = 75353633724235761L;
-
-   public static PersistenceContextReferencesMetaData merge(PersistenceContextReferencesMetaData override,
-         PersistenceContextReferencesMetaData overriden,
-         String overridenFile, String overrideFile)
-   {
-      if (override == null && overriden == null)
-         return null;
-      
-      if (override == null)
-         return overriden;
-      
-      PersistenceContextReferencesMetaData merged = new PersistenceContextReferencesMetaData();
-      return JavaEEMetaDataUtil.merge(merged, overriden, override, "persistence-context-ref", overridenFile, overrideFile, false);
-   }
-
-   /**
-    * Create a new PersistenceContextReferencesMetaData.
-    */
-   public PersistenceContextReferencesMetaData()
-   {
-      super("persistence-context-ref-name");
-   }
-   
-   public void augment(PersistenceContextReferencesMetaData augment, PersistenceContextReferencesMetaData main)
-   {
-      for (PersistenceContextReferenceMetaData persistenceContextReference : augment)
-      {
-         if (containsKey(persistenceContextReference.getKey()))
-         {
-            if (main == null || !main.containsKey(persistenceContextReference.getKey()))
-            {
-               throw new IllegalStateException("Unresolved conflict on persistence context reference named: " 
-                     + persistenceContextReference.getKey());
-            }
-            else
-            {
-               get(persistenceContextReference.getKey()).augment(persistenceContextReference, 
-                     (main != null) ? main.get(persistenceContextReference.getKey()) : null);
-            }
-         }
-         else
-         {
-            add(persistenceContextReference);
-         }
-      }
-   }
-   
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/PersistenceContextReferencesMetaData.java (from rev 95649, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/PersistenceContextReferencesMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/PersistenceContextReferencesMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/PersistenceContextReferencesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,87 @@
+/*
+* 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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
+import org.jboss.metadata.javaee.support.JavaEEMetaDataUtil;
+
+/**
+ * PersistenceContextReferencesMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class PersistenceContextReferencesMetaData extends AbstractMappedMetaData<PersistenceContextReferenceMetaData>
+   implements AugmentableMetaData<PersistenceContextReferencesMetaData>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 75353633724235761L;
+
+   public static PersistenceContextReferencesMetaData merge(PersistenceContextReferencesMetaData override,
+         PersistenceContextReferencesMetaData overriden,
+         String overridenFile, String overrideFile)
+   {
+      if (override == null && overriden == null)
+         return null;
+      
+      if (override == null)
+         return overriden;
+      
+      PersistenceContextReferencesMetaData merged = new PersistenceContextReferencesMetaData();
+      return JavaEEMetaDataUtil.merge(merged, overriden, override, "persistence-context-ref", overridenFile, overrideFile, false);
+   }
+
+   /**
+    * Create a new PersistenceContextReferencesMetaData.
+    */
+   public PersistenceContextReferencesMetaData()
+   {
+      super("persistence-context-ref-name");
+   }
+   
+   public void augment(PersistenceContextReferencesMetaData augment, 
+         PersistenceContextReferencesMetaData main, boolean resolveConflicts)
+   {
+      for (PersistenceContextReferenceMetaData persistenceContextReference : augment)
+      {
+         if (containsKey(persistenceContextReference.getKey()))
+         {
+            if (!resolveConflicts && (main == null || !main.containsKey(persistenceContextReference.getKey())))
+            {
+               throw new IllegalStateException("Unresolved conflict on persistence context reference named: " 
+                     + persistenceContextReference.getKey());
+            }
+            else
+            {
+               get(persistenceContextReference.getKey()).augment(persistenceContextReference, 
+                     (main != null) ? main.get(persistenceContextReference.getKey()) : null, resolveConflicts);
+            }
+         }
+         else
+         {
+            add(persistenceContextReference);
+         }
+      }
+   }
+   
+}

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/PersistenceUnitReferencesMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/PersistenceUnitReferencesMetaData.java	2009-10-28 01:40:57 UTC (rev 95641)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/PersistenceUnitReferencesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,77 +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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
-import org.jboss.metadata.javaee.support.AugmentableMetaData;
-import org.jboss.metadata.merge.MergeUtil;
-
-/**
- * PersistenceUnitReferencesMetaData.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class PersistenceUnitReferencesMetaData extends AbstractMappedMetaData<PersistenceUnitReferenceMetaData>
-   implements AugmentableMetaData<PersistenceUnitReferencesMetaData>
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = 5762149182578142090L;
-
-   /**
-    * Create a new PersistenceUnitReferencesMetaData.
-    */
-   public PersistenceUnitReferencesMetaData()
-   {
-      super("persistence-unit-ref-name");
-   }
-   
-   public void merge(PersistenceUnitReferencesMetaData override, PersistenceUnitReferencesMetaData original)
-   {
-      MergeUtil.merge(this, override, original);
-   }
-   
-   public void augment(PersistenceUnitReferencesMetaData augment, PersistenceUnitReferencesMetaData main)
-   {
-      for (PersistenceUnitReferenceMetaData persistenceUnitRef : augment)
-      {
-         if (containsKey(persistenceUnitRef.getKey()))
-         {
-            if (main == null || !main.containsKey(persistenceUnitRef.getKey()))
-            {
-               throw new IllegalStateException("Unresolved conflict on persistence unit reference named: " 
-                     + persistenceUnitRef.getKey());
-            }
-            else
-            {
-               get(persistenceUnitRef.getKey()).augment(persistenceUnitRef, 
-                     (main != null) ? main.get(persistenceUnitRef.getKey()) : null);
-            }
-         }
-         else
-         {
-            add(persistenceUnitRef);
-         }
-      }
-   }
-   
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/PersistenceUnitReferencesMetaData.java (from rev 95649, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/PersistenceUnitReferencesMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/PersistenceUnitReferencesMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/PersistenceUnitReferencesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,78 @@
+/*
+* 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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
+import org.jboss.metadata.merge.MergeUtil;
+
+/**
+ * PersistenceUnitReferencesMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class PersistenceUnitReferencesMetaData extends AbstractMappedMetaData<PersistenceUnitReferenceMetaData>
+   implements AugmentableMetaData<PersistenceUnitReferencesMetaData>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 5762149182578142090L;
+
+   /**
+    * Create a new PersistenceUnitReferencesMetaData.
+    */
+   public PersistenceUnitReferencesMetaData()
+   {
+      super("persistence-unit-ref-name");
+   }
+   
+   public void merge(PersistenceUnitReferencesMetaData override, PersistenceUnitReferencesMetaData original)
+   {
+      MergeUtil.merge(this, override, original);
+   }
+   
+   public void augment(PersistenceUnitReferencesMetaData augment, 
+         PersistenceUnitReferencesMetaData main, boolean resolveConflicts)
+   {
+      for (PersistenceUnitReferenceMetaData persistenceUnitRef : augment)
+      {
+         if (containsKey(persistenceUnitRef.getKey()))
+         {
+            if (!resolveConflicts && (main == null || !main.containsKey(persistenceUnitRef.getKey())))
+            {
+               throw new IllegalStateException("Unresolved conflict on persistence unit reference named: " 
+                     + persistenceUnitRef.getKey());
+            }
+            else
+            {
+               get(persistenceUnitRef.getKey()).augment(persistenceUnitRef, 
+                     (main != null) ? main.get(persistenceUnitRef.getKey()) : null, resolveConflicts);
+            }
+         }
+         else
+         {
+            add(persistenceUnitRef);
+         }
+      }
+   }
+   
+}

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java	2009-10-28 01:40:57 UTC (rev 95641)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,606 +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.metadata.javaee.support.AugmentableMetaData;
-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: 76290 $
- */
- at JBossXmlModelGroup(name="jndiEnvironmentRefsGroup",
-      propOrder={
-         "environmentEntries", 
-         "ejbReferences",
-         "serviceReferences",
-         "resourceReferences", 
-         "resourceEnvironmentReferences",
-         "messageDestinationReferences",
-         "persistenceUnitRefs",
-         "postConstructs",
-         "preDestroys"})
-public class RemoteEnvironmentRefsGroupMetaData
-   implements Serializable, RemoteEnvironment, MutableRemoteEnvironment, 
-      AugmentableMetaData<RemoteEnvironmentRefsGroupMetaData>
-{
-   /** 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();
-      // Don't allow duplicates
-      for(LifecycleCallbackMetaData lcmd : additions)
-      {
-         if(current.contains(lcmd) == false)
-            current.add(lcmd);
-      }
-      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;
-      PersistenceUnitReferencesMetaData jbossPersistenceUnitRefs = 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();
-         jbossPersistenceUnitRefs = jbossEnv.getPersistenceUnitRefs();
-      }
-      else
-      {
-         // Merge into this
-         jbossEjbRefs = getEjbReferences();
-         jbossServiceRefs = getServiceReferences();
-         jbossResRefs = getResourceReferences();
-         jbossResEnvRefs = getResourceEnvironmentReferences();
-         jbossMessageDestinationRefs = getMessageDestinationReferences();
-         jbossPersistenceUnitRefs = getPersistenceUnitRefs();
-      }
-
-
-      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 || jbossPersistenceUnitRefs != null)
-      {
-         if(this.persistenceUnitRefs == null)
-            this.persistenceUnitRefs = new PersistenceUnitReferencesMetaData();
-         this.persistenceUnitRefs.merge(jbossPersistenceUnitRefs, persistenceUnitRefs);
-      }
-
-      // Fill the annotated refs with the xml descriptor
-      AnnotatedEJBReferencesMetaData annotatedRefs = AnnotatedEJBReferencesMetaData.merge(this.getEjbReferences(), annotatedEjbRefs);
-      if(annotatedRefs != null)
-         this.setAnnotatedEjbReferences(annotatedRefs);
-   }
-   
-   public void augment(RemoteEnvironmentRefsGroupMetaData augment, RemoteEnvironmentRefsGroupMetaData main)
-   {
-      // EJB references
-      if (getEjbReferences() == null)
-      {
-         if (augment.getEjbReferences() != null)
-            setEjbReferences(augment.getEjbReferences());
-      }
-      else if (augment.getEjbReferences() != null)
-      {
-         getEjbReferences().augment(augment.getEjbReferences(), 
-               (main != null) ? main.getEjbReferences() : null);
-      }
-      // Environment entries
-      if (getEnvironmentEntries() == null)
-      {
-         if (augment.getEnvironmentEntries() != null)
-            setEnvironmentEntries(augment.getEnvironmentEntries());
-      }
-      else if (augment.getEnvironmentEntries() != null)
-      {
-         getEnvironmentEntries().augment(augment.getEnvironmentEntries(), 
-               (main != null) ? main.getEnvironmentEntries() : null);
-      }
-      // Message destination references
-      if (getMessageDestinationReferences() == null)
-      {
-         if (augment.getMessageDestinationReferences() != null)
-            setMessageDestinationReferences(augment.getMessageDestinationReferences());
-      }
-      else if (augment.getMessageDestinationReferences() != null)
-      {
-         getMessageDestinationReferences().augment(augment.getMessageDestinationReferences(), 
-               (main != null) ? main.getMessageDestinationReferences() : null);
-      }
-      // Persistence unit references
-      if (getPersistenceUnitRefs() == null)
-      {
-         if (augment.getPersistenceUnitRefs() != null)
-            setPersistenceUnitRefs(augment.getPersistenceUnitRefs());
-      }
-      else if (augment.getPersistenceUnitRefs() != null)
-      {
-         getPersistenceUnitRefs().augment(augment.getPersistenceUnitRefs(), 
-               (main != null) ? main.getPersistenceUnitRefs() : null);
-      }
-      // Post construct
-      if (getPostConstructs() == null)
-      {
-         if (augment.getPostConstructs() != null)
-            setPostConstructs(augment.getPostConstructs());
-      }
-      else if (augment.getPostConstructs() != null)
-      {
-         getPostConstructs().augment(augment.getPostConstructs(), 
-               (main != null) ? main.getPostConstructs() : null);
-      }
-      // Pre destroy
-      if (getPreDestroys() == null)
-      {
-         if (augment.getPreDestroys() != null)
-            setPreDestroys(augment.getPreDestroys());
-      }
-      else if (augment.getPreDestroys() != null)
-      {
-         getPreDestroys().augment(augment.getPreDestroys(), 
-               (main != null) ? main.getPreDestroys() : null);
-      }
-      // Resource environment references
-      if (getResourceEnvironmentReferences() == null)
-      {
-         if (augment.getResourceEnvironmentReferences() != null)
-            setResourceEnvironmentReferences(augment.getResourceEnvironmentReferences());
-      }
-      else if (augment.getResourceEnvironmentReferences() != null)
-      {
-         getResourceEnvironmentReferences().augment(augment.getResourceEnvironmentReferences(), 
-               (main != null) ? main.getResourceEnvironmentReferences() : null);
-      }
-      // Resource references
-      if (getResourceReferences() == null)
-      {
-         if (augment.getResourceReferences() != null)
-            setResourceReferences(augment.getResourceReferences());
-      }
-      else if (augment.getResourceReferences() != null)
-      {
-         getResourceReferences().augment(augment.getResourceReferences(), 
-               (main != null) ? main.getResourceReferences() : null);
-      }
-      // Service reference
-      if (getServiceReferences() == null)
-      {
-         setServiceReferences(augment.getServiceReferences());
-      }
-      else if (augment.getServiceReferences() != null)
-      {
-         getServiceReferences().augment(augment.getServiceReferences(), 
-               (main != null) ? main.getServiceReferences() : null);
-      }
-   }
-   
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java (from rev 95649, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,606 @@
+/*
+* 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.metadata.javaee.support.AugmentableMetaData;
+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: 76290 $
+ */
+ at JBossXmlModelGroup(name="jndiEnvironmentRefsGroup",
+      propOrder={
+         "environmentEntries", 
+         "ejbReferences",
+         "serviceReferences",
+         "resourceReferences", 
+         "resourceEnvironmentReferences",
+         "messageDestinationReferences",
+         "persistenceUnitRefs",
+         "postConstructs",
+         "preDestroys"})
+public class RemoteEnvironmentRefsGroupMetaData
+   implements Serializable, RemoteEnvironment, MutableRemoteEnvironment, 
+      AugmentableMetaData<RemoteEnvironmentRefsGroupMetaData>
+{
+   /** 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();
+      // Don't allow duplicates
+      for(LifecycleCallbackMetaData lcmd : additions)
+      {
+         if(current.contains(lcmd) == false)
+            current.add(lcmd);
+      }
+      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;
+      PersistenceUnitReferencesMetaData jbossPersistenceUnitRefs = 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();
+         jbossPersistenceUnitRefs = jbossEnv.getPersistenceUnitRefs();
+      }
+      else
+      {
+         // Merge into this
+         jbossEjbRefs = getEjbReferences();
+         jbossServiceRefs = getServiceReferences();
+         jbossResRefs = getResourceReferences();
+         jbossResEnvRefs = getResourceEnvironmentReferences();
+         jbossMessageDestinationRefs = getMessageDestinationReferences();
+         jbossPersistenceUnitRefs = getPersistenceUnitRefs();
+      }
+
+
+      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 || jbossPersistenceUnitRefs != null)
+      {
+         if(this.persistenceUnitRefs == null)
+            this.persistenceUnitRefs = new PersistenceUnitReferencesMetaData();
+         this.persistenceUnitRefs.merge(jbossPersistenceUnitRefs, persistenceUnitRefs);
+      }
+
+      // Fill the annotated refs with the xml descriptor
+      AnnotatedEJBReferencesMetaData annotatedRefs = AnnotatedEJBReferencesMetaData.merge(this.getEjbReferences(), annotatedEjbRefs);
+      if(annotatedRefs != null)
+         this.setAnnotatedEjbReferences(annotatedRefs);
+   }
+   
+   public void augment(RemoteEnvironmentRefsGroupMetaData augment, RemoteEnvironmentRefsGroupMetaData main, boolean resolveConflicts)
+   {
+      // EJB references
+      if (getEjbReferences() == null)
+      {
+         if (augment.getEjbReferences() != null)
+            setEjbReferences(augment.getEjbReferences());
+      }
+      else if (augment.getEjbReferences() != null)
+      {
+         getEjbReferences().augment(augment.getEjbReferences(), 
+               (main != null) ? main.getEjbReferences() : null, resolveConflicts);
+      }
+      // Environment entries
+      if (getEnvironmentEntries() == null)
+      {
+         if (augment.getEnvironmentEntries() != null)
+            setEnvironmentEntries(augment.getEnvironmentEntries());
+      }
+      else if (augment.getEnvironmentEntries() != null)
+      {
+         getEnvironmentEntries().augment(augment.getEnvironmentEntries(), 
+               (main != null) ? main.getEnvironmentEntries() : null, resolveConflicts);
+      }
+      // Message destination references
+      if (getMessageDestinationReferences() == null)
+      {
+         if (augment.getMessageDestinationReferences() != null)
+            setMessageDestinationReferences(augment.getMessageDestinationReferences());
+      }
+      else if (augment.getMessageDestinationReferences() != null)
+      {
+         getMessageDestinationReferences().augment(augment.getMessageDestinationReferences(), 
+               (main != null) ? main.getMessageDestinationReferences() : null, resolveConflicts);
+      }
+      // Persistence unit references
+      if (getPersistenceUnitRefs() == null)
+      {
+         if (augment.getPersistenceUnitRefs() != null)
+            setPersistenceUnitRefs(augment.getPersistenceUnitRefs());
+      }
+      else if (augment.getPersistenceUnitRefs() != null)
+      {
+         getPersistenceUnitRefs().augment(augment.getPersistenceUnitRefs(), 
+               (main != null) ? main.getPersistenceUnitRefs() : null, resolveConflicts);
+      }
+      // Post construct
+      if (getPostConstructs() == null)
+      {
+         if (augment.getPostConstructs() != null)
+            setPostConstructs(augment.getPostConstructs());
+      }
+      else if (augment.getPostConstructs() != null)
+      {
+         getPostConstructs().augment(augment.getPostConstructs(), 
+               (main != null) ? main.getPostConstructs() : null, resolveConflicts);
+      }
+      // Pre destroy
+      if (getPreDestroys() == null)
+      {
+         if (augment.getPreDestroys() != null)
+            setPreDestroys(augment.getPreDestroys());
+      }
+      else if (augment.getPreDestroys() != null)
+      {
+         getPreDestroys().augment(augment.getPreDestroys(), 
+               (main != null) ? main.getPreDestroys() : null, resolveConflicts);
+      }
+      // Resource environment references
+      if (getResourceEnvironmentReferences() == null)
+      {
+         if (augment.getResourceEnvironmentReferences() != null)
+            setResourceEnvironmentReferences(augment.getResourceEnvironmentReferences());
+      }
+      else if (augment.getResourceEnvironmentReferences() != null)
+      {
+         getResourceEnvironmentReferences().augment(augment.getResourceEnvironmentReferences(), 
+               (main != null) ? main.getResourceEnvironmentReferences() : null, resolveConflicts);
+      }
+      // Resource references
+      if (getResourceReferences() == null)
+      {
+         if (augment.getResourceReferences() != null)
+            setResourceReferences(augment.getResourceReferences());
+      }
+      else if (augment.getResourceReferences() != null)
+      {
+         getResourceReferences().augment(augment.getResourceReferences(), 
+               (main != null) ? main.getResourceReferences() : null, resolveConflicts);
+      }
+      // Service reference
+      if (getServiceReferences() == null)
+      {
+         setServiceReferences(augment.getServiceReferences());
+      }
+      else if (augment.getServiceReferences() != null)
+      {
+         getServiceReferences().augment(augment.getServiceReferences(), 
+               (main != null) ? main.getServiceReferences() : null, resolveConflicts);
+      }
+   }
+   
+}

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceEnvironmentReferencesMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/ResourceEnvironmentReferencesMetaData.java	2009-10-28 01:40:57 UTC (rev 95641)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceEnvironmentReferencesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,93 +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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
-import org.jboss.metadata.javaee.support.AugmentableMetaData;
-import org.jboss.metadata.javaee.support.JavaEEMetaDataUtil;
-
-/**
- * ResourceEnvironmentReferencesMetaData.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class ResourceEnvironmentReferencesMetaData extends AbstractMappedMetaData<ResourceEnvironmentReferenceMetaData>
-   implements AugmentableMetaData<ResourceEnvironmentReferencesMetaData>
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = -1586023682859221620L;
-
-   /**
-    * Merge resource environment references
-    * 
-    * @param override the override references
-    * @param overriden the overriden references 
-    * @param overridenFile the overriden file name
-    * @param overrideFile the override file
-    * @return the merged referencees
-    */
-   public static ResourceEnvironmentReferencesMetaData merge(ResourceEnvironmentReferencesMetaData override, ResourceEnvironmentReferencesMetaData overriden, String overridenFile, String overrideFile)
-   {
-      if (override == null && overriden == null)
-         return null;
-      
-      if (override == null)
-         return overriden;
-      
-      ResourceEnvironmentReferencesMetaData merged = new ResourceEnvironmentReferencesMetaData();
-      return JavaEEMetaDataUtil.merge(merged, overriden, override, "resource-env-ref", overridenFile, overrideFile, false);
-   }
-
-   /**
-    * Create a new ResourceEnvironmentReferencesMetaData.
-    */
-   public ResourceEnvironmentReferencesMetaData()
-   {
-      super("resource env ref name");
-   }
-   
-   public void augment(ResourceEnvironmentReferencesMetaData augment, ResourceEnvironmentReferencesMetaData main)
-   {
-      for (ResourceEnvironmentReferenceMetaData resourceEnvRef : augment)
-      {
-         if (containsKey(resourceEnvRef.getKey()))
-         {
-            if (main == null || !main.containsKey(resourceEnvRef.getKey()))
-            {
-               throw new IllegalStateException("Unresolved conflict on resource environment reference named: " 
-                     + resourceEnvRef.getKey());
-            }
-            else
-            {
-               get(resourceEnvRef.getKey()).augment(resourceEnvRef, 
-                     (main != null) ? main.get(resourceEnvRef.getKey()) : null);
-            }
-         }
-         else
-         {
-            add(resourceEnvRef);
-         }
-      }
-   }
-   
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceEnvironmentReferencesMetaData.java (from rev 95649, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/ResourceEnvironmentReferencesMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceEnvironmentReferencesMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceEnvironmentReferencesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,94 @@
+/*
+* 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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
+import org.jboss.metadata.javaee.support.JavaEEMetaDataUtil;
+
+/**
+ * ResourceEnvironmentReferencesMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class ResourceEnvironmentReferencesMetaData extends AbstractMappedMetaData<ResourceEnvironmentReferenceMetaData>
+   implements AugmentableMetaData<ResourceEnvironmentReferencesMetaData>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -1586023682859221620L;
+
+   /**
+    * Merge resource environment references
+    * 
+    * @param override the override references
+    * @param overriden the overriden references 
+    * @param overridenFile the overriden file name
+    * @param overrideFile the override file
+    * @return the merged referencees
+    */
+   public static ResourceEnvironmentReferencesMetaData merge(ResourceEnvironmentReferencesMetaData override, ResourceEnvironmentReferencesMetaData overriden, String overridenFile, String overrideFile)
+   {
+      if (override == null && overriden == null)
+         return null;
+      
+      if (override == null)
+         return overriden;
+      
+      ResourceEnvironmentReferencesMetaData merged = new ResourceEnvironmentReferencesMetaData();
+      return JavaEEMetaDataUtil.merge(merged, overriden, override, "resource-env-ref", overridenFile, overrideFile, false);
+   }
+
+   /**
+    * Create a new ResourceEnvironmentReferencesMetaData.
+    */
+   public ResourceEnvironmentReferencesMetaData()
+   {
+      super("resource env ref name");
+   }
+   
+   public void augment(ResourceEnvironmentReferencesMetaData augment, 
+         ResourceEnvironmentReferencesMetaData main, boolean resolveConflicts)
+   {
+      for (ResourceEnvironmentReferenceMetaData resourceEnvRef : augment)
+      {
+         if (containsKey(resourceEnvRef.getKey()))
+         {
+            if (!resolveConflicts && (main == null || !main.containsKey(resourceEnvRef.getKey())))
+            {
+               throw new IllegalStateException("Unresolved conflict on resource environment reference named: " 
+                     + resourceEnvRef.getKey());
+            }
+            else
+            {
+               get(resourceEnvRef.getKey()).augment(resourceEnvRef, 
+                     (main != null) ? main.get(resourceEnvRef.getKey()) : null, resolveConflicts);
+            }
+         }
+         else
+         {
+            add(resourceEnvRef);
+         }
+      }
+   }
+   
+}

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceInjectionMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/ResourceInjectionMetaData.java	2009-10-28 01:40:57 UTC (rev 95641)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceInjectionMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,237 +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.support.AugmentableMetaData;
-import org.jboss.metadata.javaee.support.NamedMetaData;
-
-/**
- * ResourceInjectionMetaData.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public abstract class ResourceInjectionMetaData extends NamedMetaData
-   implements AugmentableMetaData<ResourceInjectionMetaData>
-{
-   /** 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
-   }
-
-   @XmlTransient
-   public String getName()
-   {
-      return super.getName();
-   }
-   
-   /**
-    * Get the jndiName.
-    * 
-    * @return the jndiName.
-    */
-   public String getJndiName()
-   {
-      return getMappedName();
-   }
-
-   /**
-    * Set the jndiName.
-    * 
-    * @param jndiName the jndiName.
-    * @throws IllegalArgumentException for a null jndiName
-    */
-   @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
-    */
-   @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
-    */
-   @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
-    */
-   @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
-    */
-   @XmlTransient
-   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);
-   }
-   
-   public void augment(ResourceInjectionMetaData augment, ResourceInjectionMetaData main)
-   {
-      if (main != null && main.getInjectionTargets() != null)
-      {
-         // If main contains injection target, drop the all injection targets
-         injectionTargets = null;
-      }
-      else
-      {
-         // Add injection targets
-         if (getInjectionTargets() == null)
-         {
-            injectionTargets = augment.getInjectionTargets();
-         }
-         else if (augment.getInjectionTargets() != null)
-         {
-            getInjectionTargets().addAll(augment.getInjectionTargets());
-         }
-      }
-   }
-   
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceInjectionMetaData.java (from rev 95649, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/ResourceInjectionMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceInjectionMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceInjectionMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,237 @@
+/*
+* 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.support.AugmentableMetaData;
+import org.jboss.metadata.javaee.support.NamedMetaData;
+
+/**
+ * ResourceInjectionMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class ResourceInjectionMetaData extends NamedMetaData
+   implements AugmentableMetaData<ResourceInjectionMetaData>
+{
+   /** 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
+   }
+
+   @XmlTransient
+   public String getName()
+   {
+      return super.getName();
+   }
+   
+   /**
+    * Get the jndiName.
+    * 
+    * @return the jndiName.
+    */
+   public String getJndiName()
+   {
+      return getMappedName();
+   }
+
+   /**
+    * Set the jndiName.
+    * 
+    * @param jndiName the jndiName.
+    * @throws IllegalArgumentException for a null jndiName
+    */
+   @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
+    */
+   @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
+    */
+   @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
+    */
+   @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
+    */
+   @XmlTransient
+   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);
+   }
+   
+   public void augment(ResourceInjectionMetaData augment, ResourceInjectionMetaData main, boolean resolveConflicts)
+   {
+      if (main != null && main.getInjectionTargets() != null)
+      {
+         // If main contains injection target, drop the all injection targets
+         injectionTargets = null;
+      }
+      else
+      {
+         // Add injection targets
+         if (getInjectionTargets() == null)
+         {
+            injectionTargets = augment.getInjectionTargets();
+         }
+         else if (augment.getInjectionTargets() != null)
+         {
+            getInjectionTargets().addAll(augment.getInjectionTargets());
+         }
+      }
+   }
+   
+}

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceReferencesMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/ResourceReferencesMetaData.java	2009-10-28 01:40:57 UTC (rev 95641)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceReferencesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,93 +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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
-import org.jboss.metadata.javaee.support.AugmentableMetaData;
-import org.jboss.metadata.javaee.support.JavaEEMetaDataUtil;
-
-/**
- * ResourceReferencesMetaData.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class ResourceReferencesMetaData extends AbstractMappedMetaData<ResourceReferenceMetaData>
-   implements AugmentableMetaData<ResourceReferencesMetaData>
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = -6067974868675929921L;
-
-   /**
-    * Merge resource references
-    * 
-    * @param override the override references
-    * @param overriden the overriden references 
-    * @param overridenFile the overriden file name
-    * @param overrideFile the override file
-    * @return the merged referencees
-    */
-   public static ResourceReferencesMetaData merge(ResourceReferencesMetaData override, ResourceReferencesMetaData overriden, String overridenFile, String overrideFile, boolean mustOverride)
-   {
-      if (override == null && overriden == null)
-         return null;
-      
-      if (override == null)
-         return overriden;
-      
-      ResourceReferencesMetaData merged = new ResourceReferencesMetaData();
-      return JavaEEMetaDataUtil.merge(merged, overriden, override, "resource-ref", overridenFile, overrideFile, mustOverride);
-   }
-
-   /**
-    * Create a new ResourceReferencesMetaData.
-    */
-   public ResourceReferencesMetaData()
-   {
-      super("resource ref name");
-   }
-   
-   public void augment(ResourceReferencesMetaData augment, ResourceReferencesMetaData main)
-   {
-      for (ResourceReferenceMetaData resourceRef : augment)
-      {
-         if (containsKey(resourceRef.getKey()))
-         {
-            if (main == null || !main.containsKey(resourceRef.getKey()))
-            {
-               throw new IllegalStateException("Unresolved conflict on resource reference named: " 
-                     + resourceRef.getKey());
-            }
-            else
-            {
-               get(resourceRef.getKey()).augment(resourceRef, 
-                     (main != null) ? main.get(resourceRef.getKey()) : null);
-            }
-         }
-         else
-         {
-            add(resourceRef);
-         }
-      }
-   }
-   
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceReferencesMetaData.java (from rev 95649, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/ResourceReferencesMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceReferencesMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ResourceReferencesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,93 @@
+/*
+* 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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
+import org.jboss.metadata.javaee.support.JavaEEMetaDataUtil;
+
+/**
+ * ResourceReferencesMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class ResourceReferencesMetaData extends AbstractMappedMetaData<ResourceReferenceMetaData>
+   implements AugmentableMetaData<ResourceReferencesMetaData>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -6067974868675929921L;
+
+   /**
+    * Merge resource references
+    * 
+    * @param override the override references
+    * @param overriden the overriden references 
+    * @param overridenFile the overriden file name
+    * @param overrideFile the override file
+    * @return the merged referencees
+    */
+   public static ResourceReferencesMetaData merge(ResourceReferencesMetaData override, ResourceReferencesMetaData overriden, String overridenFile, String overrideFile, boolean mustOverride)
+   {
+      if (override == null && overriden == null)
+         return null;
+      
+      if (override == null)
+         return overriden;
+      
+      ResourceReferencesMetaData merged = new ResourceReferencesMetaData();
+      return JavaEEMetaDataUtil.merge(merged, overriden, override, "resource-ref", overridenFile, overrideFile, mustOverride);
+   }
+
+   /**
+    * Create a new ResourceReferencesMetaData.
+    */
+   public ResourceReferencesMetaData()
+   {
+      super("resource ref name");
+   }
+   
+   public void augment(ResourceReferencesMetaData augment, ResourceReferencesMetaData main, boolean resolveConflicts)
+   {
+      for (ResourceReferenceMetaData resourceRef : augment)
+      {
+         if (containsKey(resourceRef.getKey()))
+         {
+            if (!resolveConflicts && (main == null || !main.containsKey(resourceRef.getKey())))
+            {
+               throw new IllegalStateException("Unresolved conflict on resource reference named: " 
+                     + resourceRef.getKey());
+            }
+            else
+            {
+               get(resourceRef.getKey()).augment(resourceRef, 
+                     (main != null) ? main.get(resourceRef.getKey()) : null, resolveConflicts);
+            }
+         }
+         else
+         {
+            add(resourceRef);
+         }
+      }
+   }
+   
+}

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ServiceReferencesMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/ServiceReferencesMetaData.java	2009-10-28 01:40:57 UTC (rev 95641)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ServiceReferencesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,93 +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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
-import org.jboss.metadata.javaee.support.AugmentableMetaData;
-import org.jboss.metadata.javaee.support.JavaEEMetaDataUtil;
-
-/**
- * The service-refGroup type
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class ServiceReferencesMetaData
-   extends AbstractMappedMetaData<ServiceReferenceMetaData>
-   implements AugmentableMetaData<ServiceReferencesMetaData>
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = -2667900705228419782L;
-
-   /**
-    * Create a new ServiceReferencesMetaData.
-    */
-   public ServiceReferencesMetaData()
-   {
-      super("service ref name for service ref");
-   }
-   /**
-    * Merge resource references
-    * 
-    * @param override the override references
-    * @param overriden the overriden references 
-    * @param overridenFile the overriden file name
-    * @param overrideFile the override file
-    * @return the merged referencees
-    */
-   public static ServiceReferencesMetaData merge(ServiceReferencesMetaData override, ServiceReferencesMetaData overriden, String overridenFile, String overrideFile)
-   {
-      if (override == null && overriden == null)
-         return null;
-      
-      if (override == null)
-         return overriden;
-      
-      ServiceReferencesMetaData merged = new ServiceReferencesMetaData();
-      return JavaEEMetaDataUtil.merge(merged, overriden, override, "service-ref", overridenFile, overrideFile, true);
-   }
-   
-   public void augment(ServiceReferencesMetaData augment, ServiceReferencesMetaData main)
-   {
-      for (ServiceReferenceMetaData serviceRef : augment)
-      {
-         if (containsKey(serviceRef.getKey()))
-         {
-            if (main == null || !main.containsKey(serviceRef.getKey()))
-            {
-               throw new IllegalStateException("Unresolved conflict on service reference named: " 
-                     + serviceRef.getKey());
-            }
-            else
-            {
-               get(serviceRef.getKey()).augment(serviceRef, 
-                     (main != null) ? main.get(serviceRef.getKey()) : null);
-            }
-         }
-         else
-         {
-            add(serviceRef);
-         }
-      }
-   }
-
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ServiceReferencesMetaData.java (from rev 95649, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/ServiceReferencesMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ServiceReferencesMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/spec/ServiceReferencesMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,93 @@
+/*
+* 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 org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
+import org.jboss.metadata.javaee.support.JavaEEMetaDataUtil;
+
+/**
+ * The service-refGroup type
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class ServiceReferencesMetaData
+   extends AbstractMappedMetaData<ServiceReferenceMetaData>
+   implements AugmentableMetaData<ServiceReferencesMetaData>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -2667900705228419782L;
+
+   /**
+    * Create a new ServiceReferencesMetaData.
+    */
+   public ServiceReferencesMetaData()
+   {
+      super("service ref name for service ref");
+   }
+   /**
+    * Merge resource references
+    * 
+    * @param override the override references
+    * @param overriden the overriden references 
+    * @param overridenFile the overriden file name
+    * @param overrideFile the override file
+    * @return the merged referencees
+    */
+   public static ServiceReferencesMetaData merge(ServiceReferencesMetaData override, ServiceReferencesMetaData overriden, String overridenFile, String overrideFile)
+   {
+      if (override == null && overriden == null)
+         return null;
+      
+      if (override == null)
+         return overriden;
+      
+      ServiceReferencesMetaData merged = new ServiceReferencesMetaData();
+      return JavaEEMetaDataUtil.merge(merged, overriden, override, "service-ref", overridenFile, overrideFile, true);
+   }
+   
+   public void augment(ServiceReferencesMetaData augment, ServiceReferencesMetaData main, boolean resolveConflicts)
+   {
+      for (ServiceReferenceMetaData serviceRef : augment)
+      {
+         if (containsKey(serviceRef.getKey()))
+         {
+            if (!resolveConflicts && (main == null || !main.containsKey(serviceRef.getKey())))
+            {
+               throw new IllegalStateException("Unresolved conflict on service reference named: " 
+                     + serviceRef.getKey());
+            }
+            else
+            {
+               get(serviceRef.getKey()).augment(serviceRef, 
+                     (main != null) ? main.get(serviceRef.getKey()) : null, resolveConflicts);
+            }
+         }
+         else
+         {
+            add(serviceRef);
+         }
+      }
+   }
+
+}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/support (from rev 95641, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/support)

Deleted: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/support/AugmentableMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/support/AugmentableMetaData.java	2009-10-28 01:40:57 UTC (rev 95641)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/support/AugmentableMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -1,46 +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.support;
-
-/**
- * AugmentableMetaData.
- * This implements meta data merging according to the Servlet API 3.0
- * definitions. 
- * 
- * @param <T> the augment type
- * @author Remy Maucherat
- * @version $Revision: 1.1 $
- */
-public interface AugmentableMetaData<T>
-{
-   /**
-    * Augment the current meta data with the given meta data.
-    * 
-    * @param augment this meta data will augment the current one
-    * @param main this meta data will be used to resolve conflicts
-    * @throws IllegalStateException if a conflict is found between the
-    *    current meta data and the augmenting meta data, that is not
-    *    resolved according to the specific rules for the meta data
-    *    considered
-    */
-   public void augment(T augment, T main);
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/support/AugmentableMetaData.java (from rev 95649, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/support/AugmentableMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/support/AugmentableMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha5/src/main/java/org/jboss/metadata/javaee/support/AugmentableMetaData.java	2009-10-29 17:21:17 UTC (rev 95772)
@@ -0,0 +1,48 @@
+/*
+* 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.support;
+
+/**
+ * AugmentableMetaData.
+ * This implements meta data merging according to the Servlet API 3.0
+ * definitions. 
+ * 
+ * @param <T> the augment type
+ * @author Remy Maucherat
+ * @version $Revision: 1.1 $
+ */
+public interface AugmentableMetaData<T>
+{
+   /**
+    * Augment the current meta data with the given meta data.
+    * 
+    * @param augment this meta data will augment the current one
+    * @param main this meta data will be used to resolve conflicts
+    * @param resolveConflicts true if conflicts will be resolved, and
+    *    false if they should cause an error
+    * @throws IllegalStateException if a conflict is found between the
+    *    current meta data and the augmenting meta data, that is not
+    *    resolved according to the specific rules for the meta data
+    *    considered
+    */
+   public void augment(T augment, T main, boolean resolveConflicts);
+}

Copied: projects/metadata/common/tags/2.0.0.Alpha5/src/main/resources/schema (from rev 95641, projects/metadata/common/trunk/src/main/resources/schema)




More information about the jboss-cvs-commits mailing list