[jboss-cvs] JBossAS SVN: r95872 - in projects/metadata/common/tags: 2.0.0.Alpha8 and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Oct 30 20:29:48 EDT 2009


Author: remy.maucherat at jboss.com
Date: 2009-10-30 20:29:47 -0400 (Fri, 30 Oct 2009)
New Revision: 95872

Added:
   projects/metadata/common/tags/2.0.0.Alpha8/
   projects/metadata/common/tags/2.0.0.Alpha8/pom.xml
   projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/
   projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/annotation/creator/DataSourceDefinitionProcessor.java
   projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/annotation/creator/DataSourceDefinitionsProcessor.java
   projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/AnnotatedEJBReferencesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha8/src/main/resources/schema/
Removed:
   projects/metadata/common/tags/2.0.0.Alpha8/pom.xml
   projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/
   projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/annotation/creator/DataSourceDefinitionProcessor.java
   projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/annotation/creator/DataSourceDefinitionsProcessor.java
   projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/AnnotatedEJBReferencesMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java
   projects/metadata/common/tags/2.0.0.Alpha8/src/main/resources/schema/
Log:
[maven-release-plugin]  copy for tag 2.0.0.Alpha8

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

Deleted: projects/metadata/common/tags/2.0.0.Alpha8/pom.xml
===================================================================
--- projects/metadata/common/trunk/pom.xml	2009-09-18 13:08:39 UTC (rev 93711)
+++ projects/metadata/common/tags/2.0.0.Alpha8/pom.xml	2009-10-31 00:29:47 UTC (rev 95872)
@@ -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.Alpha8/pom.xml (from rev 95871, projects/metadata/common/trunk/pom.xml)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha8/pom.xml	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha8/pom.xml	2009-10-31 00:29:47 UTC (rev 95872)
@@ -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.Alpha8</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.Alpha8</connection>
+    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/metadata/common/tags/2.0.0.Alpha8</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

Copied: projects/metadata/common/tags/2.0.0.Alpha8/src/main/java (from rev 95770, projects/metadata/common/trunk/src/main/java)

Deleted: projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/annotation/creator/DataSourceDefinitionProcessor.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/annotation/creator/DataSourceDefinitionProcessor.java	2009-10-29 17:09:06 UTC (rev 95770)
+++ projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/annotation/creator/DataSourceDefinitionProcessor.java	2009-10-31 00:29:47 UTC (rev 95872)
@@ -1,151 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, 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.annotation.Annotation;
-import java.lang.reflect.AnnotatedElement;
-import java.sql.Connection;
-import java.util.Collection;
-
-import javax.annotation.sql.DataSourceDefinition;
-
-import org.jboss.annotation.javaee.Descriptions;
-import org.jboss.metadata.annotation.finder.AnnotationFinder;
-import org.jboss.metadata.javaee.spec.DataSourceMetaData;
-import org.jboss.metadata.javaee.spec.DataSourcesMetaData;
-import org.jboss.metadata.javaee.spec.IsolationLevelType;
-import org.jboss.metadata.javaee.spec.PropertiesMetaData;
-import org.jboss.metadata.javaee.spec.PropertyMetaData;
-
-/**
- * Processor for DataSourceDefinition
- * @author Remy Maucherat
- * @version $Revision: 67218 $
- */
-public class DataSourceDefinitionProcessor extends AbstractFinderUser
-   implements Processor<DataSourcesMetaData, Class<?>>, Creator<Class<?>, DataSourceMetaData>
-{
-   public DataSourceDefinitionProcessor(AnnotationFinder<AnnotatedElement> finder)
-   {
-      super(finder);
-   }
-
-   public void process(DataSourcesMetaData metaData, Class<?> type)
-   {
-      DataSourceDefinition annotation = finder.getAnnotation(type, DataSourceDefinition.class);
-      if(annotation == null)
-         return;
-
-      process(metaData, type, annotation);
-   }
-   
-   public void process(DataSourcesMetaData metaData, Class<?> type, DataSourceDefinition annotation)
-   {
-      DataSourceMetaData dataSource = create(type);
-      metaData.add(dataSource);
-   }
-   
-   public DataSourceMetaData create(Class<?> element)
-   {
-      DataSourceDefinition dataSource = finder.getAnnotation(element, DataSourceDefinition.class);
-      if (dataSource == null)
-         return null;
-
-      DataSourceMetaData metaData = new DataSourceMetaData();
-      metaData.setName(dataSource.name());
-      metaData.setClassName(dataSource.className());
-      Descriptions descriptions = ProcessorUtils.getDescription(dataSource.description());
-      if (descriptions != null)
-         metaData.setDescriptions(descriptions);
-      if (dataSource.url().length() > 0)
-         metaData.setUrl(dataSource.url());
-      if (dataSource.user().length() > 0)
-         metaData.setUser(dataSource.user());
-      if (dataSource.password().length() > 0)
-         metaData.setPassword(dataSource.password());
-      if (dataSource.databaseName().length() > 0)
-         metaData.setDatabaseName(dataSource.databaseName());
-      if (dataSource.portNumber() != -1)
-         metaData.setPortNumber(dataSource.portNumber());
-      if (!dataSource.serverName().equals("localhost"))
-         metaData.setServerName(dataSource.serverName());
-      if (dataSource.isolationLevel() != -1)
-      {
-         switch (dataSource.isolationLevel())
-         {
-         case Connection.TRANSACTION_NONE:
-            break;
-         case Connection.TRANSACTION_READ_UNCOMMITTED:
-            metaData.setIsolationLevel(IsolationLevelType.TRANSACTION_READ_UNCOMMITTED);
-            break;
-         case Connection.TRANSACTION_READ_COMMITTED:
-            metaData.setIsolationLevel(IsolationLevelType.TRANSACTION_READ_COMMITTED);
-            break;
-         case Connection.TRANSACTION_REPEATABLE_READ:
-            metaData.setIsolationLevel(IsolationLevelType.TRANSACTION_REPEATABLE_READ);
-            break;
-         case Connection.TRANSACTION_SERIALIZABLE:
-            metaData.setIsolationLevel(IsolationLevelType.TRANSACTION_SERIALIZABLE);
-            break;
-         default:
-            break;
-         }
-      }
-      metaData.setTransactional(dataSource.transactional());
-      if (dataSource.initialPoolSize() != -1)
-         metaData.setInitialPoolSize(dataSource.initialPoolSize());
-      if (dataSource.maxPoolSize() != -1)
-         metaData.setMaxPoolSize(dataSource.maxPoolSize());
-      if (dataSource.minPoolSize() != -1)
-         metaData.setMinPoolSize(dataSource.minPoolSize());
-      if (dataSource.maxIdleTime() != -1)
-         metaData.setMaxIdleTime(dataSource.maxIdleTime());
-      if (dataSource.maxStatements() != -1)
-         metaData.setMaxStatements(dataSource.maxStatements());
-      if (dataSource.properties().length > 0)
-      {
-         PropertiesMetaData properties = new PropertiesMetaData();
-         for (String propertyString : dataSource.properties())
-         {
-            int pos = propertyString.indexOf('=');
-            if (pos != -1)
-            {
-               PropertyMetaData property = new PropertyMetaData();
-               property.setName(propertyString.substring(0, pos));
-               property.setValue(propertyString.substring(pos + 1));
-               properties.add(property);
-            }
-         }
-         metaData.setProperties(properties);
-      }
-      if (dataSource.loginTimeout() != 0)
-         metaData.setLoginTimeout(dataSource.loginTimeout());
-      return metaData;
-      
-   }
-
-   public Collection<Class<? extends Annotation>> getAnnotationTypes()
-   {
-      return ProcessorUtils.createAnnotationSet(DataSourceDefinition.class);
-   }
-   
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/annotation/creator/DataSourceDefinitionProcessor.java (from rev 95787, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/annotation/creator/DataSourceDefinitionProcessor.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/annotation/creator/DataSourceDefinitionProcessor.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/annotation/creator/DataSourceDefinitionProcessor.java	2009-10-31 00:29:47 UTC (rev 95872)
@@ -0,0 +1,151 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.annotation.Annotation;
+import java.lang.reflect.AnnotatedElement;
+import java.sql.Connection;
+import java.util.Collection;
+
+import javax.annotation.sql.DataSourceDefinition;
+
+import org.jboss.annotation.javaee.Descriptions;
+import org.jboss.metadata.annotation.finder.AnnotationFinder;
+import org.jboss.metadata.javaee.spec.DataSourceMetaData;
+import org.jboss.metadata.javaee.spec.DataSourcesMetaData;
+import org.jboss.metadata.javaee.spec.IsolationLevelType;
+import org.jboss.metadata.javaee.spec.PropertiesMetaData;
+import org.jboss.metadata.javaee.spec.PropertyMetaData;
+
+/**
+ * Processor for @DataSourceDefinition
+ * @author Remy Maucherat
+ * @version $Revision: 67218 $
+ */
+public class DataSourceDefinitionProcessor extends AbstractFinderUser
+   implements Processor<DataSourcesMetaData, Class<?>>, Creator<Class<?>, DataSourceMetaData>
+{
+   public DataSourceDefinitionProcessor(AnnotationFinder<AnnotatedElement> finder)
+   {
+      super(finder);
+   }
+
+   public void process(DataSourcesMetaData metaData, Class<?> type)
+   {
+      DataSourceDefinition annotation = finder.getAnnotation(type, DataSourceDefinition.class);
+      if(annotation == null)
+         return;
+
+      process(metaData, type, annotation);
+   }
+   
+   public void process(DataSourcesMetaData metaData, Class<?> type, DataSourceDefinition annotation)
+   {
+      DataSourceMetaData dataSource = create(type);
+      metaData.add(dataSource);
+   }
+   
+   public DataSourceMetaData create(Class<?> element)
+   {
+      DataSourceDefinition dataSource = finder.getAnnotation(element, DataSourceDefinition.class);
+      if (dataSource == null)
+         return null;
+
+      DataSourceMetaData metaData = new DataSourceMetaData();
+      metaData.setName(dataSource.name());
+      metaData.setClassName(dataSource.className());
+      Descriptions descriptions = ProcessorUtils.getDescription(dataSource.description());
+      if (descriptions != null)
+         metaData.setDescriptions(descriptions);
+      if (dataSource.url().length() > 0)
+         metaData.setUrl(dataSource.url());
+      if (dataSource.user().length() > 0)
+         metaData.setUser(dataSource.user());
+      if (dataSource.password().length() > 0)
+         metaData.setPassword(dataSource.password());
+      if (dataSource.databaseName().length() > 0)
+         metaData.setDatabaseName(dataSource.databaseName());
+      if (dataSource.portNumber() != -1)
+         metaData.setPortNumber(dataSource.portNumber());
+      if (!dataSource.serverName().equals("localhost"))
+         metaData.setServerName(dataSource.serverName());
+      if (dataSource.isolationLevel() != -1)
+      {
+         switch (dataSource.isolationLevel())
+         {
+         case Connection.TRANSACTION_NONE:
+            break;
+         case Connection.TRANSACTION_READ_UNCOMMITTED:
+            metaData.setIsolationLevel(IsolationLevelType.TRANSACTION_READ_UNCOMMITTED);
+            break;
+         case Connection.TRANSACTION_READ_COMMITTED:
+            metaData.setIsolationLevel(IsolationLevelType.TRANSACTION_READ_COMMITTED);
+            break;
+         case Connection.TRANSACTION_REPEATABLE_READ:
+            metaData.setIsolationLevel(IsolationLevelType.TRANSACTION_REPEATABLE_READ);
+            break;
+         case Connection.TRANSACTION_SERIALIZABLE:
+            metaData.setIsolationLevel(IsolationLevelType.TRANSACTION_SERIALIZABLE);
+            break;
+         default:
+            break;
+         }
+      }
+      metaData.setTransactional(dataSource.transactional());
+      if (dataSource.initialPoolSize() != -1)
+         metaData.setInitialPoolSize(dataSource.initialPoolSize());
+      if (dataSource.maxPoolSize() != -1)
+         metaData.setMaxPoolSize(dataSource.maxPoolSize());
+      if (dataSource.minPoolSize() != -1)
+         metaData.setMinPoolSize(dataSource.minPoolSize());
+      if (dataSource.maxIdleTime() != -1)
+         metaData.setMaxIdleTime(dataSource.maxIdleTime());
+      if (dataSource.maxStatements() != -1)
+         metaData.setMaxStatements(dataSource.maxStatements());
+      if (dataSource.properties().length > 0)
+      {
+         PropertiesMetaData properties = new PropertiesMetaData();
+         for (String propertyString : dataSource.properties())
+         {
+            int pos = propertyString.indexOf('=');
+            if (pos != -1)
+            {
+               PropertyMetaData property = new PropertyMetaData();
+               property.setName(propertyString.substring(0, pos));
+               property.setValue(propertyString.substring(pos + 1));
+               properties.add(property);
+            }
+         }
+         metaData.setProperties(properties);
+      }
+      if (dataSource.loginTimeout() != 0)
+         metaData.setLoginTimeout(dataSource.loginTimeout());
+      return metaData;
+      
+   }
+
+   public Collection<Class<? extends Annotation>> getAnnotationTypes()
+   {
+      return ProcessorUtils.createAnnotationSet(DataSourceDefinition.class);
+   }
+   
+}

Deleted: projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/annotation/creator/DataSourceDefinitionsProcessor.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/annotation/creator/DataSourceDefinitionsProcessor.java	2009-10-29 17:09:06 UTC (rev 95770)
+++ projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/annotation/creator/DataSourceDefinitionsProcessor.java	2009-10-31 00:29:47 UTC (rev 95872)
@@ -1,65 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, 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.annotation.Annotation;
-import java.lang.reflect.AnnotatedElement;
-import java.util.Collection;
-
-import javax.annotation.sql.DataSourceDefinition;
-import javax.annotation.sql.DataSourceDefinitions;
-
-import org.jboss.metadata.annotation.finder.AnnotationFinder;
-import org.jboss.metadata.javaee.spec.DataSourcesMetaData;
-
-/**
- * Processor for DataSourceDefinitions
- * @author Remy Maucherat
- * @version $Revision: 67218 $
- */
-public class DataSourceDefinitionsProcessor extends DataSourceDefinitionProcessor
-{
-   public DataSourceDefinitionsProcessor(AnnotationFinder<AnnotatedElement> finder)
-   {
-      super(finder);
-   }
-
-   public void process(DataSourcesMetaData metaData, Class<?> type)
-   {
-      DataSourceDefinitions annotation = finder.getAnnotation(type, DataSourceDefinitions.class);
-      if(annotation == null)
-         return;
-
-      DataSourceDefinition[] dataSources = annotation.value();
-      if(dataSources != null)
-      {
-         for(DataSourceDefinition res : dataSources)
-            super.process(metaData, type, res);
-      }
-   }
-
-   public Collection<Class<? extends Annotation>> getAnnotationTypes()
-   {
-      return ProcessorUtils.createAnnotationSet(DataSourceDefinitions.class);
-   }
-   
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/annotation/creator/DataSourceDefinitionsProcessor.java (from rev 95787, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/annotation/creator/DataSourceDefinitionsProcessor.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/annotation/creator/DataSourceDefinitionsProcessor.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/annotation/creator/DataSourceDefinitionsProcessor.java	2009-10-31 00:29:47 UTC (rev 95872)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.annotation.Annotation;
+import java.lang.reflect.AnnotatedElement;
+import java.util.Collection;
+
+import javax.annotation.sql.DataSourceDefinition;
+import javax.annotation.sql.DataSourceDefinitions;
+
+import org.jboss.metadata.annotation.finder.AnnotationFinder;
+import org.jboss.metadata.javaee.spec.DataSourcesMetaData;
+
+/**
+ * Processor for @DataSourceDefinitions
+ * @author Remy Maucherat
+ * @version $Revision: 67218 $
+ */
+public class DataSourceDefinitionsProcessor extends DataSourceDefinitionProcessor
+   implements Processor<DataSourcesMetaData, Class<?>>
+{
+   public DataSourceDefinitionsProcessor(AnnotationFinder<AnnotatedElement> finder)
+   {
+      super(finder);
+   }
+
+   public void process(DataSourcesMetaData metaData, Class<?> type)
+   {
+      DataSourceDefinitions annotation = finder.getAnnotation(type, DataSourceDefinitions.class);
+      if(annotation == null)
+         return;
+
+      DataSourceDefinition[] dataSources = annotation.value();
+      if(dataSources != null)
+      {
+         for(DataSourceDefinition res : dataSources)
+            super.process(metaData, type, res);
+      }
+   }
+
+   public Collection<Class<? extends Annotation>> getAnnotationTypes()
+   {
+      return ProcessorUtils.createAnnotationSet(DataSourceDefinitions.class);
+   }
+   
+}

Deleted: projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/AnnotatedEJBReferencesMetaData.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/AnnotatedEJBReferencesMetaData.java	2009-10-29 17:09:06 UTC (rev 95770)
+++ projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/AnnotatedEJBReferencesMetaData.java	2009-10-31 00:29:47 UTC (rev 95872)
@@ -1,105 +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.JavaEEMetaDataUtil;
-
-/**
- * @EJB references metadata.
- * 
- * @author Scott.Stark at jboss.org
- * @version $Revision: 76290 $
- */
-public class AnnotatedEJBReferencesMetaData
-   extends AbstractMappedMetaData<AnnotatedEJBReferenceMetaData>
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = 1;
-
-   /**
-    * 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 AnnotatedEJBReferencesMetaData merge(AnnotatedEJBReferencesMetaData override,
-         AnnotatedEJBReferencesMetaData overriden,
-         String overridenFile, String overrideFile)
-   {
-      if (override == null && overriden == null)
-         return null;
-      
-      if (override == null)
-         return overriden;
-      
-      AnnotatedEJBReferencesMetaData merged = new AnnotatedEJBReferencesMetaData();
-      return JavaEEMetaDataUtil.merge(merged, overriden, override, "@EJB", overridenFile, overrideFile, false);
-   }
-   
-   /**
-    * Merge the annotated ejb refs with a xml desriptor
-    * 
-    * @param override the override references
-    * @param original the original references
-    * @return the merged references.
-    */
-   public static AnnotatedEJBReferencesMetaData merge(EJBReferencesMetaData override, AnnotatedEJBReferencesMetaData original)
-   {
-      if(override == null)
-         return original;
-      
-      if(original == null)
-         return null;
-      
-      AnnotatedEJBReferencesMetaData merged = new AnnotatedEJBReferencesMetaData();
-      for(AnnotatedEJBReferenceMetaData ref : original)
-      {
-         EJBReferenceMetaData ejbRef = override.get(ref.getKey());
-         if(ejbRef != null)
-         {
-            AnnotatedEJBReferenceMetaData newRef = new AnnotatedEJBReferenceMetaData();
-            newRef.merge(ejbRef, ref);
-            if(ref.getBeanInterface() != null)
-               newRef.setBeanInterface(ref.getBeanInterface());
-            
-            merged.add(newRef);
-         }
-         else
-         {
-            merged.add(ref);
-         }
-      }
-      return merged;
-   }
-
-   /**
-    * Create a new EJBLocalReferencesMetaData.
-    */
-   public AnnotatedEJBReferencesMetaData()
-   {
-      super("ejb local ref name");
-   }
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/AnnotatedEJBReferencesMetaData.java (from rev 95829, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/AnnotatedEJBReferencesMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/AnnotatedEJBReferencesMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/AnnotatedEJBReferencesMetaData.java	2009-10-31 00:29:47 UTC (rev 95872)
@@ -0,0 +1,132 @@
+/*
+* 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;
+
+/**
+ * @EJB references metadata.
+ * 
+ * @author Scott.Stark at jboss.org
+ * @version $Revision: 76290 $
+ */
+public class AnnotatedEJBReferencesMetaData
+   extends AbstractMappedMetaData<AnnotatedEJBReferenceMetaData>
+   implements AugmentableMetaData<AnnotatedEJBReferencesMetaData>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1;
+
+   /**
+    * 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 AnnotatedEJBReferencesMetaData merge(AnnotatedEJBReferencesMetaData override,
+         AnnotatedEJBReferencesMetaData overriden,
+         String overridenFile, String overrideFile)
+   {
+      if (override == null && overriden == null)
+         return null;
+      
+      if (override == null)
+         return overriden;
+      
+      AnnotatedEJBReferencesMetaData merged = new AnnotatedEJBReferencesMetaData();
+      return JavaEEMetaDataUtil.merge(merged, overriden, override, "@EJB", overridenFile, overrideFile, false);
+   }
+   
+   /**
+    * Merge the annotated ejb refs with a xml desriptor
+    * 
+    * @param override the override references
+    * @param original the original references
+    * @return the merged references.
+    */
+   public static AnnotatedEJBReferencesMetaData merge(EJBReferencesMetaData override, AnnotatedEJBReferencesMetaData original)
+   {
+      if(override == null)
+         return original;
+      
+      if(original == null)
+         return null;
+      
+      AnnotatedEJBReferencesMetaData merged = new AnnotatedEJBReferencesMetaData();
+      for(AnnotatedEJBReferenceMetaData ref : original)
+      {
+         EJBReferenceMetaData ejbRef = override.get(ref.getKey());
+         if(ejbRef != null)
+         {
+            AnnotatedEJBReferenceMetaData newRef = new AnnotatedEJBReferenceMetaData();
+            newRef.merge(ejbRef, ref);
+            if(ref.getBeanInterface() != null)
+               newRef.setBeanInterface(ref.getBeanInterface());
+            
+            merged.add(newRef);
+         }
+         else
+         {
+            merged.add(ref);
+         }
+      }
+      return merged;
+   }
+
+   /**
+    * Create a new EJBLocalReferencesMetaData.
+    */
+   public AnnotatedEJBReferencesMetaData()
+   {
+      super("ejb local ref name");
+   }
+   
+   public void augment(AnnotatedEJBReferencesMetaData augment, AnnotatedEJBReferencesMetaData main, boolean resolveConflicts)
+   {
+      for (AnnotatedEJBReferenceMetaData 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.Alpha8/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-29 17:09:06 UTC (rev 95770)
+++ projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationMetaData.java	2009-10-31 00:29:47 UTC (rev 95872)
@@ -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, 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());
-         }
-      }
-   }
-   
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationMetaData.java (from rev 95787, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/MessageDestinationMetaData.java	2009-10-31 00:29:47 UTC (rev 95872)
@@ -0,0 +1,202 @@
+/*
+* 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)
+      {
+         if (augment.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.Alpha8/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-29 17:09:06 UTC (rev 95770)
+++ projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java	2009-10-31 00:29:47 UTC (rev 95872)
@@ -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, 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);
-      }
-   }
-   
-}

Copied: projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java (from rev 95829, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha8/src/main/java/org/jboss/metadata/javaee/spec/RemoteEnvironmentRefsGroupMetaData.java	2009-10-31 00:29:47 UTC (rev 95872)
@@ -0,0 +1,620 @@
+/*
+* 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);
+      }
+      // EJB annotated references
+      // Note: Normally, this should be merged into regular EJB meta data, otherwise
+      // it will not respect the order. It should still work however, as it merely adds
+      // injection targets.
+      if (getAnnotatedEjbReferences() == null)
+      {
+         if (augment.getAnnotatedEjbReferences() != null)
+            setAnnotatedEjbReferences(augment.getAnnotatedEjbReferences());
+      }
+      else if (augment.getAnnotatedEjbReferences() != null)
+      {
+         getAnnotatedEjbReferences().augment(augment.getAnnotatedEjbReferences(), 
+               (main != null) ? main.getAnnotatedEjbReferences() : null, resolveConflicts);
+      }
+   }
+   
+}

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




More information about the jboss-cvs-commits mailing list