[jboss-cvs] JBossAS SVN: r89200 - in projects/jboss-man/tags: 2.1.0.GA and 8 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed May 20 12:45:04 EDT 2009


Author: scott.stark at jboss.org
Date: 2009-05-20 12:45:03 -0400 (Wed, 20 May 2009)
New Revision: 89200

Added:
   projects/jboss-man/tags/2.1.0.GA/
   projects/jboss-man/tags/2.1.0.GA/build/pom.xml
   projects/jboss-man/tags/2.1.0.GA/managed/.classpath
   projects/jboss-man/tags/2.1.0.GA/managed/pom.xml
   projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/Fields.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/ManagedOperation.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/ManagedProperty.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedComponentImpl.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedObjectImpl.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedPropertyImpl.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/support/adminview/
   projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/support/deployment/JmsDestination.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/support/deployment/QueueDestination.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/AbstractManagedObjectFactoryUnitTestCase.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/ManagementObjectUnitTestCase.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/ManagementPropertyUnitTestCase.java
   projects/jboss-man/tags/2.1.0.GA/metatype/.classpath
   projects/jboss-man/tags/2.1.0.GA/metatype/pom.xml
   projects/jboss-man/tags/2.1.0.GA/pom.xml
Removed:
   projects/jboss-man/tags/2.1.0.GA/build/pom.xml
   projects/jboss-man/tags/2.1.0.GA/managed/.classpath
   projects/jboss-man/tags/2.1.0.GA/managed/pom.xml
   projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/Fields.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/ManagedOperation.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/ManagedProperty.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedComponentImpl.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedObjectImpl.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedPropertyImpl.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/support/deployment/JmsDestination.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/support/deployment/QueueDestination.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/AbstractManagedObjectFactoryUnitTestCase.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/ManagementObjectUnitTestCase.java
   projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/ManagementPropertyUnitTestCase.java
   projects/jboss-man/tags/2.1.0.GA/metatype/.classpath
   projects/jboss-man/tags/2.1.0.GA/metatype/pom.xml
   projects/jboss-man/tags/2.1.0.GA/pom.xml
Log:
[maven-release-plugin]  copy for tag 2.1.0.GA

Copied: projects/jboss-man/tags/2.1.0.GA (from rev 89190, projects/jboss-man/branches/Branch_2_1)

Deleted: projects/jboss-man/tags/2.1.0.GA/build/pom.xml
===================================================================
--- projects/jboss-man/branches/Branch_2_1/build/pom.xml	2009-05-20 14:23:56 UTC (rev 89190)
+++ projects/jboss-man/tags/2.1.0.GA/build/pom.xml	2009-05-20 16:45:03 UTC (rev 89200)
@@ -1,54 +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">
-  <parent>
-    <groupId>org.jboss.man</groupId>
-    <artifactId>jboss-man-parent</artifactId>
-    <version>2.1.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.jboss.man</groupId>
-  <artifactId>jboss-man</artifactId>
-  <version>2.1.0-SNAPSHOT</version>
-  <packaging>pom</packaging>
-  <name>JBoss Managed Distribution</name>
-  <url>http://www.jboss.org/jbossmc</url>
-  <description>JBoss Managed Distribution Build</description>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.2-beta-2</version>
-        <executions>
-          <execution>
-            <id>make-assembly</id>
-            <phase>package</phase>
-            <goals>
-              <goal>attached</goal>
-            </goals>
-            <configuration>
-              <finalName>jboss-man-${project.version}</finalName>
-              <descriptors>
-                <descriptor>src/assembly/dist.xml</descriptor>
-                <descriptor>src/assembly/dist-with-deps.xml</descriptor>
-                <descriptor>src/assembly/src.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.jboss.man</groupId>
-      <artifactId>jboss-managed</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.man</groupId>
-      <artifactId>jboss-metatype</artifactId>
-    </dependency>
-  </dependencies>
-  
-</project>

Copied: projects/jboss-man/tags/2.1.0.GA/build/pom.xml (from rev 89199, projects/jboss-man/branches/Branch_2_1/build/pom.xml)
===================================================================
--- projects/jboss-man/tags/2.1.0.GA/build/pom.xml	                        (rev 0)
+++ projects/jboss-man/tags/2.1.0.GA/build/pom.xml	2009-05-20 16:45:03 UTC (rev 89200)
@@ -0,0 +1,54 @@
+<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">
+  <parent>
+    <groupId>org.jboss.man</groupId>
+    <artifactId>jboss-man-parent</artifactId>
+    <version>2.1.0.GA</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.jboss.man</groupId>
+  <artifactId>jboss-man</artifactId>
+  <version>2.1.0.GA</version>
+  <packaging>pom</packaging>
+  <name>JBoss Managed Distribution</name>
+  <url>http://www.jboss.org/jbossmc</url>
+  <description>JBoss Managed Distribution Build</description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <version>2.2-beta-2</version>
+        <executions>
+          <execution>
+            <id>make-assembly</id>
+            <phase>package</phase>
+            <goals>
+              <goal>attached</goal>
+            </goals>
+            <configuration>
+              <finalName>jboss-man-${project.version}</finalName>
+              <descriptors>
+                <descriptor>src/assembly/dist.xml</descriptor>
+                <descriptor>src/assembly/dist-with-deps.xml</descriptor>
+                <descriptor>src/assembly/src.xml</descriptor>
+              </descriptors>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.jboss.man</groupId>
+      <artifactId>jboss-managed</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.man</groupId>
+      <artifactId>jboss-metatype</artifactId>
+    </dependency>
+  </dependencies>
+  
+</project>

Deleted: projects/jboss-man/tags/2.1.0.GA/managed/.classpath
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/.classpath	2009-05-20 14:23:56 UTC (rev 89190)
+++ projects/jboss-man/tags/2.1.0.GA/managed/.classpath	2009-05-20 16:45:03 UTC (rev 89200)
@@ -1,23 +0,0 @@
-<classpath>
-  <classpathentry kind="src" path="src/main/java"/>
-  <classpathentry kind="src" path="src/test/java" output="target/tests-classes"/>
-  <classpathentry kind="src" path="src/test/resources" output="target/tests-classes" excluding="**/*.java"/>
-  <classpathentry kind="output" path="target/classes"/>
-  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.9.0.GA/javassist-3.9.0.GA.jar" sourcepath="M2_REPO/javassist/javassist/3.9.0.GA/javassist-3.9.0.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/sun-jaxb/jaxb-api/2.1.4/jaxb-api-2.1.4.jar" sourcepath="M2_REPO/sun-jaxb/jaxb-api/2.1.4/jaxb-api-2.1.4-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.9.GA/jboss-common-core-2.2.9.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.9.GA/jboss-common-core-2.2.9.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-mdr/2.0.1.GA/jboss-mdr-2.0.1.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-mdr/2.0.1.GA/jboss-mdr-2.0.1.GA-sources.jar"/>
-  <classpathentry kind="src" path="/jboss-metatype"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.0.GA/jboss-reflect-2.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-reflect/2.0.0.GA/jboss-reflect-2.0.0.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-server-manager/0.1.1.GA/jboss-server-manager-0.1.1.GA.jar" sourcepath="M2_REPO/org/jboss/jbossas/jboss-server-manager/0.1.1.GA/jboss-server-manager-0.1.1.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/test/jboss-test/1.1.1.GA/jboss-test-1.1.1.GA.jar" sourcepath="M2_REPO/org/jboss/test/jboss-test/1.1.1.GA/jboss-test-1.1.1.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
-</classpath>
\ No newline at end of file

Copied: projects/jboss-man/tags/2.1.0.GA/managed/.classpath (from rev 89193, projects/jboss-man/branches/Branch_2_1/managed/.classpath)
===================================================================
--- projects/jboss-man/tags/2.1.0.GA/managed/.classpath	                        (rev 0)
+++ projects/jboss-man/tags/2.1.0.GA/managed/.classpath	2009-05-20 16:45:03 UTC (rev 89200)
@@ -0,0 +1,23 @@
+<classpath>
+  <classpathentry kind="src" path="src/main/java"/>
+  <classpathentry kind="src" path="src/test/java" output="target/tests-classes"/>
+  <classpathentry kind="src" path="src/test/resources" output="target/tests-classes" excluding="**/*.java"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.10.0.GA/javassist-3.10.0.GA.jar"/>
+  <classpathentry kind="var" path="M2_REPO/sun-jaxb/jaxb-api/2.1.4/jaxb-api-2.1.4.jar" sourcepath="M2_REPO/sun-jaxb/jaxb-api/2.1.4/jaxb-api-2.1.4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.12.GA/jboss-common-core-2.2.12.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.12.GA/jboss-common-core-2.2.12.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-mdr/2.0.1.GA/jboss-mdr-2.0.1.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-mdr/2.0.1.GA/jboss-mdr-2.0.1.GA-sources.jar"/>
+  <classpathentry kind="src" path="/jboss-metatype"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.2.GA/jboss-reflect-2.0.2.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-reflect/2.0.2.GA/jboss-reflect-2.0.2.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-server-manager/0.1.1.GA/jboss-server-manager-0.1.1.GA.jar" sourcepath="M2_REPO/org/jboss/jbossas/jboss-server-manager/0.1.1.GA/jboss-server-manager-0.1.1.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/test/jboss-test/1.1.1.GA/jboss-test-1.1.1.GA.jar" sourcepath="M2_REPO/org/jboss/test/jboss-test/1.1.1.GA/jboss-test-1.1.1.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
+</classpath>
\ No newline at end of file

Deleted: projects/jboss-man/tags/2.1.0.GA/managed/pom.xml
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/pom.xml	2009-05-20 14:23:56 UTC (rev 89190)
+++ projects/jboss-man/tags/2.1.0.GA/managed/pom.xml	2009-05-20 16:45:03 UTC (rev 89200)
@@ -1,66 +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">
-  <parent>
-    <groupId>org.jboss.man</groupId>
-    <artifactId>jboss-man-parent</artifactId>
-    <version>2.1.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>jboss-managed</artifactId>
-  <packaging>jar</packaging>
-  <name>JBoss Managed</name>
-  <url>http://www.jboss.org/jbossmc</url>
-  <description>JBoss Managed</description>
-  
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <configuration>
-          <descriptors>
-            <descriptor>src/assembly/api.xml</descriptor>
-            <descriptor>src/assembly/plugins.xml</descriptor>
-          </descriptors>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  
-  <!-- Do not add version information here, use ../pom.xml instead -->
-  <dependencies>
-    <!-- Global dependencies -->
-    <dependency>
-      <groupId>org.jboss.man</groupId>
-      <artifactId>jboss-metatype</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-mdr</artifactId>
-    </dependency>
-    <!-- Test dependencies -->
-    <dependency>
-      <groupId>sun-jaxb</groupId>
-      <artifactId>jaxb-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.logging</groupId>
-      <artifactId>jboss-logging-log4j</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.test</groupId>
-      <artifactId>jboss-test</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>javassist</groupId>
-      <artifactId>javassist</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-</project>
\ No newline at end of file

Copied: projects/jboss-man/tags/2.1.0.GA/managed/pom.xml (from rev 89199, projects/jboss-man/branches/Branch_2_1/managed/pom.xml)
===================================================================
--- projects/jboss-man/tags/2.1.0.GA/managed/pom.xml	                        (rev 0)
+++ projects/jboss-man/tags/2.1.0.GA/managed/pom.xml	2009-05-20 16:45:03 UTC (rev 89200)
@@ -0,0 +1,66 @@
+<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">
+  <parent>
+    <groupId>org.jboss.man</groupId>
+    <artifactId>jboss-man-parent</artifactId>
+    <version>2.1.0.GA</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>jboss-managed</artifactId>
+  <packaging>jar</packaging>
+  <name>JBoss Managed</name>
+  <url>http://www.jboss.org/jbossmc</url>
+  <description>JBoss Managed</description>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <configuration>
+          <descriptors>
+            <descriptor>src/assembly/api.xml</descriptor>
+            <descriptor>src/assembly/plugins.xml</descriptor>
+          </descriptors>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  
+  <!-- Do not add version information here, use ../pom.xml instead -->
+  <dependencies>
+    <!-- Global dependencies -->
+    <dependency>
+      <groupId>org.jboss.man</groupId>
+      <artifactId>jboss-metatype</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-mdr</artifactId>
+    </dependency>
+    <!-- Test dependencies -->
+    <dependency>
+      <groupId>sun-jaxb</groupId>
+      <artifactId>jaxb-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-log4j</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.test</groupId>
+      <artifactId>jboss-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>javassist</groupId>
+      <artifactId>javassist</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file

Deleted: projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/Fields.java
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/Fields.java	2009-05-20 14:23:56 UTC (rev 89190)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/Fields.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -1,114 +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.managed.api;
-
-import java.io.Serializable;
-
-/**
- * Fields.
- * 
- * TODO the fields names should be annotation class names (where relevant)
- * when the annotations exist
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public interface Fields extends Serializable
-{
-   /** The name field name */
-   String NAME = "name";
-
-   /** The mapped name field name */
-   String MAPPED_NAME = "mappedName";
-
-   /** The description field name */
-   String DESCRIPTION = "description";
-
-   /** The meta type field name */
-   String META_TYPE = "metaType";
-
-   /** The value */
-   String VALUE = "value";
-
-   /** The legal values */
-   String LEGAL_VALUES = "legalValues";
-
-   /** The minimum value */
-   String DEFAULT_VALUE = "defaultValue";
-
-   /** The minimum value */
-   String MINIMUM_VALUE = "minValue";
-
-   /** The maximum value */
-   String MAXIMUM_VALUE = "maxValue";
-
-   /** The mandatory */
-   String MANDATORY = "mandatory";
-   
-   /** The PropertyInfo info for the ManagedObject attachment */
-   String PROPERTY_INFO = "propertyInfo";
-
-   /** The annotations associated with the property */
-   String ANNOTATIONS = "annotations";
-
-   /** The attachment */
-   String ATTACHMENT = "attachment";
-
-   /** The ViewUses */
-   String VIEW_USE = "viewUse";
-
-   /** The removed flag */
-   String REMOVED = "removed";
-
-   /** The modified flag */
-   String MODIFIED = "modified";
-
-   /** The read-only flag */
-   String READ_ONLY = "readOnly";
-
-   /** The activation-policy flag */
-   String ACTIVATION_POLICY = "activationPolicy";
-
-   // TODO other standard fields here
-
-   /**
-    * Get a field with the given name
-    * 
-    * @param name the name
-    * @return the field value
-    */
-   Object getField(String name);
-   
-   /**
-    * Set a field with the given name
-    * 
-    * @param name the name
-    * @param value the field value
-    */
-   void setField(String name, Object value);
-
-   /**
-    * Create a copy of the fields.
-    * @return a copy of the fields.
-    */
-   Fields copy();
-}

Copied: projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/Fields.java (from rev 89193, projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/Fields.java)
===================================================================
--- projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/Fields.java	                        (rev 0)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/Fields.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -0,0 +1,117 @@
+/*
+* 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.managed.api;
+
+import java.io.Serializable;
+
+/**
+ * Fields.
+ * 
+ * TODO the fields names should be annotation class names (where relevant)
+ * when the annotations exist
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author Scott.Stark at jboss.org
+ * @version $Revision$
+ */
+public interface Fields extends Serializable
+{
+   /** The name field name */
+   String NAME = "name";
+
+   /** The mapped name field name */
+   String MAPPED_NAME = "mappedName";
+
+   /** The description field name */
+   String DESCRIPTION = "description";
+
+   /** The meta type field name */
+   String META_TYPE = "metaType";
+
+   /** The value */
+   String VALUE = "value";
+
+   /** The legal values */
+   String LEGAL_VALUES = "legalValues";
+
+   /** The minimum value */
+   String DEFAULT_VALUE = "defaultValue";
+
+   /** The minimum value */
+   String MINIMUM_VALUE = "minValue";
+
+   /** The maximum value */
+   String MAXIMUM_VALUE = "maxValue";
+
+   /** The mandatory */
+   String MANDATORY = "mandatory";
+   
+   /** The PropertyInfo info for the ManagedObject attachment */
+   String PROPERTY_INFO = "propertyInfo";
+
+   /** The annotations associated with the property */
+   String ANNOTATIONS = "annotations";
+
+   /** The attachment */
+   String ATTACHMENT = "attachment";
+
+   /** The ViewUses */
+   String VIEW_USE = "viewUse";
+
+   /** The removed flag */
+   String REMOVED = "removed";
+
+   /** The modified flag */
+   String MODIFIED = "modified";
+
+   /** The read-only flag */
+   String READ_ONLY = "readOnly";
+
+   /** The activation-policy flag */
+   String ACTIVATION_POLICY = "activationPolicy";
+
+   /** The activation-policy flag */
+   String ADMIN_VIEWS = "adminViews";
+
+   // TODO other standard fields here
+
+   /**
+    * Get a field with the given name
+    * 
+    * @param name the name
+    * @return the field value
+    */
+   Object getField(String name);
+   
+   /**
+    * Set a field with the given name
+    * 
+    * @param name the name
+    * @param value the field value
+    */
+   void setField(String name, Object value);
+
+   /**
+    * Create a copy of the fields.
+    * @return a copy of the fields.
+    */
+   Fields copy();
+}

Deleted: projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/ManagedOperation.java
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedOperation.java	2009-05-20 14:23:56 UTC (rev 89190)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/ManagedOperation.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -1,95 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.managed.api;
-
-import java.io.Serializable;
-
-import org.jboss.metatype.api.types.MetaType;
-import org.jboss.metatype.api.values.MetaValue;
-
-/**
- * A representation of a managed operation.
- * 
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public interface ManagedOperation extends Serializable, TransientAttachments
-{
-   /**
-    * The side-effect impact of invoking an operation
-    */
-   public enum Impact {
-      /** There is not modification of the ManagedObject */
-      ReadOnly,
-      /** The impact may modify the ManagedObject */
-      ReadWrite,
-      /** The impact is to modify the ManagedObject */
-      WriteOnly,
-      /** The impact is not known */
-      Unknown
-   };
-
-   /**
-    * Get the operation description
-    * @return the operation description
-    */
-   public String getDescription();
-   /**
-    * Get the name of the operation
-    * @return the name of the operation
-    */
-   public String getName();
-
-   /**
-    * Get the impact of the operation
-    * @return the side-effect type invoking the operation has.
-    */
-   public Impact getImpact();
-
-   /**
-    * The MetaType for the operation return value.
-    * @return MetaType for the operation return value.
-    */
-   public MetaType getReturnType();
-
-   /**
-    * The parameter information for the operation arguments. An empty
-    * signature array is returned if the operation takes no arguments.
-    * @return parameter information for the operation arguments.
-    */
-   public ManagedParameter[] getParameters();
-
-   /**
-    * Get the operation signature 
-    * @return
-    */
-   public String[] getReflectionSignature();
-
-   /**
-    * Invoke the operation given its parameter values.
-    * 
-    * @param param the varags for the operation parameters.
-    * @return the MetaValue for the result.
-    */
-   public MetaValue invoke(MetaValue... param);
-
-}

Copied: projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/ManagedOperation.java (from rev 89197, projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedOperation.java)
===================================================================
--- projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/ManagedOperation.java	                        (rev 0)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/ManagedOperation.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -0,0 +1,97 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.managed.api;
+
+import java.io.Serializable;
+
+import org.jboss.metatype.api.types.MetaType;
+import org.jboss.metatype.api.values.MetaValue;
+
+/**
+ * A representation of a managed operation.
+ * 
+ * @author Scott.Stark at jboss.org
+ * @version $Revision$
+ */
+public interface ManagedOperation extends Serializable, TransientAttachments
+{
+   /**
+    * The side-effect impact of invoking an operation
+    */
+   public enum Impact {
+      /** There is not modification of the ManagedObject */
+      ReadOnly,
+      /** The impact may modify the ManagedObject */
+      ReadWrite,
+      /** The impact is to modify the ManagedObject */
+      WriteOnly,
+      /** The operation affects the component life-cycle/runtime state */
+      Lifecycle,
+      /** The impact is not known */
+      Unknown
+   };
+
+   /**
+    * Get the operation description
+    * @return the operation description
+    */
+   public String getDescription();
+   /**
+    * Get the name of the operation
+    * @return the name of the operation
+    */
+   public String getName();
+
+   /**
+    * Get the impact of the operation
+    * @return the side-effect type invoking the operation has.
+    */
+   public Impact getImpact();
+
+   /**
+    * The MetaType for the operation return value.
+    * @return MetaType for the operation return value.
+    */
+   public MetaType getReturnType();
+
+   /**
+    * The parameter information for the operation arguments. An empty
+    * signature array is returned if the operation takes no arguments.
+    * @return parameter information for the operation arguments.
+    */
+   public ManagedParameter[] getParameters();
+
+   /**
+    * Get the operation signature 
+    * @return
+    */
+   public String[] getReflectionSignature();
+
+   /**
+    * Invoke the operation given its parameter values.
+    * 
+    * @param param the varags for the operation parameters.
+    * @return the MetaValue for the result.
+    */
+   public MetaValue invoke(MetaValue... param);
+
+}

Deleted: projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/ManagedProperty.java
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedProperty.java	2009-05-20 14:23:56 UTC (rev 89190)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/ManagedProperty.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -1,239 +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.managed.api;
-
-import java.io.Serializable;
-import java.lang.annotation.Annotation;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.managed.api.annotation.ActivationPolicy;
-import org.jboss.managed.api.annotation.ManagementObjectRef;
-import org.jboss.managed.api.annotation.ViewUse;
-import org.jboss.metatype.api.types.MetaType;
-import org.jboss.metatype.api.values.MetaValue;
-
-/**
- * ManagedProperty.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @author Scott.Stark at jboss.org
- * @version $Revision: 1.1 $
- */
-public interface ManagedProperty extends Serializable, TransientAttachments
-{
-   /**
-    * Get the managed object the property is associated with.
-    * 
-    * @return the managed object
-    */
-   ManagedObject getManagedObject();
-   void setManagedObject(ManagedObject managedObject);
-
-   /**
-    * Get the ManagedObject 
-    * @see {@linkplain ManagementObjectRef}
-    * @return the ManagedObject the property references, null
-    *    if there is no reference or its unresolved.
-    */
-   ManagedObject getTargetManagedObject();
-   void setTargetManagedObject(ManagedObject target);
-
-   /**
-    * Get the fields
-    * 
-    * @return the fields
-    */
-   Fields getFields();
-
-   /**
-    * Create a copy of the managed property. This is a copy that whose fields
-    * are copies of the original property. Changes to the copies fields have
-    * not affect on the original.
-    * @return a copy of the managed property.
-    */
-   ManagedProperty copy();
-
-   /**
-    * Get a field
-    *
-    * @param <T> the expected type
-    * @param fieldName the field name
-    * @param expected the expected type
-    * @return the value
-    */
-   <T> T getField(String fieldName, Class<T> expected);
-   
-   /**
-    * Set a field
-    *
-    * @param fieldName the field name
-    * @param value the value
-    */
-   void setField(String fieldName, Serializable value);
-   
-   /**
-    * Get the property's name
-    * 
-    * @return the property's name
-    */
-   String getName();
-
-   /**
-    * Get the property's mapped name. This is an optional name
-    * that allows for an external name to be mapped to an
-    * internal one.
-    * 
-    * @return the mapped name if it exists, null if there is no
-    * mapped name.
-    */
-   String getMappedName();
-
-   /**
-    * Get the description
-    * 
-    * @return the description
-    */
-   String getDescription();
-
-   /**
-    * Get the type
-    * 
-    * @return the type
-    */
-   MetaType getMetaType();
-
-   /**
-    * Get the annotations associated with the property
-    * @return the annotations associated with the property
-    */
-   Map<String, Annotation> getAnnotations();
-
-   /**
-    * Does the property have the annotation referenced by key.
-    * @param key the key into {@link #getAnnotations()}
-    * @return true if the annotation exists, false otherwise.
-    */
-   boolean hasAnnotation(String key);
-
-   /**
-    * See if the property has the indicated ViewUse among its
-    * @ManagementProperty annotation uses.
-    * 
-    * @param use - the ViewUse to check for
-    * @return true if the ViewUse exists in the property uses, false otherwise
-    */
-   boolean hasViewUse(ViewUse use);
-
-   /**
-    * Get the activation policy for property value updates.
-    * @return the property activation policy
-    */
-   ActivationPolicy getActivationPolicy();
-
-   /**
-    * Get the value
-    * 
-    * @return the value
-    */
-   MetaValue getValue();
-
-   /**
-    * Set the value
-    * 
-    * @param value the value
-    */
-   void setValue(MetaValue value);
-
-   /**
-    * Get the legal values
-    * 
-    * @return the legal values
-    */
-   Set<MetaValue> getLegalValues();
-
-   /**
-    * Get the property default value if one exists.
-    * @return the default value if one exists, null otherwise.
-    */
-   MetaValue getDefaultValue();
-
-   /**
-    * Get the minimum value
-    * 
-    * @return the minimum value, a MetaValue implementing Comparable
-    */
-   Comparable<? extends MetaValue> getMinimumValue();
-
-   /**
-    * Get the maximum value
-    * 
-    * @return the maximum value, a MetaValue implementing Comparable
-    */
-   Comparable<? extends MetaValue> getMaximumValue();
-
-   /**
-    * Check whether this is a valid value
-    * 
-    * @param value the value
-    * @return null for a valid value, an error message otherwise
-    */
-   String checkValidValue(MetaValue value);
-   
-   /**
-    * Whether the property is mandatory
-    * 
-    * @return true when mandatory
-    */
-   boolean isMandatory();
-
-   /**
-    * Whether the property is read only
-    * @return true when read only
-    */
-   boolean isReadOnly();
-
-   /**
-    * Whether the property has been edited/modified.
-    * 
-    * @return true when modified
-    */
-   boolean isModified();
-
-   /**
-    * Set the modified state of the property value.
-    * @param flag - whether the property has been modified
-    */
-   public void setModified(boolean flag);
-
-   /**
-    * Whether the property has been marked as removed from its ManagedObject.
-    * @return true is the property has been removed.
-    */
-   boolean isRemoved();
-   /**
-    * Set whether a property has been marked as removed from its ManagedObject.
-    * @param flag - true is the property has been removed, false if not.
-    */
-   void setRemoved(boolean flag);
-
-}

Copied: projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/ManagedProperty.java (from rev 89193, projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedProperty.java)
===================================================================
--- projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/ManagedProperty.java	                        (rev 0)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/api/ManagedProperty.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -0,0 +1,246 @@
+/*
+* 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.managed.api;
+
+import java.io.Serializable;
+import java.lang.annotation.Annotation;
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.managed.api.annotation.ActivationPolicy;
+import org.jboss.managed.api.annotation.ManagementObjectRef;
+import org.jboss.managed.api.annotation.ViewUse;
+import org.jboss.metatype.api.types.MetaType;
+import org.jboss.metatype.api.values.MetaValue;
+
+/**
+ * ManagedProperty.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author Scott.Stark at jboss.org
+ * @version $Revision: 1.1 $
+ */
+public interface ManagedProperty extends Serializable, TransientAttachments
+{
+   /**
+    * Get the managed object the property is associated with.
+    * 
+    * @return the managed object
+    */
+   ManagedObject getManagedObject();
+   void setManagedObject(ManagedObject managedObject);
+
+   /**
+    * Get the ManagedObject 
+    * @see {@linkplain ManagementObjectRef}
+    * @return the ManagedObject the property references, null
+    *    if there is no reference or its unresolved.
+    */
+   ManagedObject getTargetManagedObject();
+   void setTargetManagedObject(ManagedObject target);
+
+   /**
+    * Get the fields
+    * 
+    * @return the fields
+    */
+   Fields getFields();
+
+   /**
+    * Create a copy of the managed property. This is a copy that whose fields
+    * are copies of the original property. Changes to the copies fields have
+    * not affect on the original.
+    * @return a copy of the managed property.
+    */
+   ManagedProperty copy();
+
+   /**
+    * Get a field
+    *
+    * @param <T> the expected type
+    * @param fieldName the field name
+    * @param expected the expected type
+    * @return the value
+    */
+   <T> T getField(String fieldName, Class<T> expected);
+   
+   /**
+    * Set a field
+    *
+    * @param fieldName the field name
+    * @param value the value
+    */
+   void setField(String fieldName, Serializable value);
+   
+   /**
+    * Get the property's name
+    * 
+    * @return the property's name
+    */
+   String getName();
+
+   /**
+    * Get the property's mapped name. This is an optional name
+    * that allows for an external name to be mapped to an
+    * internal one.
+    * 
+    * @return the mapped name if it exists, null if there is no
+    * mapped name.
+    */
+   String getMappedName();
+
+   /**
+    * Get the description
+    * 
+    * @return the description
+    */
+   String getDescription();
+
+   /**
+    * Get the type
+    * 
+    * @return the type
+    */
+   MetaType getMetaType();
+
+   /**
+    * Get the annotations associated with the property
+    * @return the annotations associated with the property
+    */
+   Map<String, Annotation> getAnnotations();
+
+   /**
+    * Does the property have the annotation referenced by key.
+    * @param key the key into {@link #getAnnotations()}
+    * @return true if the annotation exists, false otherwise.
+    */
+   boolean hasAnnotation(String key);
+
+   /**
+    * See if the property has the indicated ViewUse among its
+    * @ManagementProperty annotation uses.
+    * 
+    * @param use - the ViewUse to check for
+    * @return true if the ViewUse exists in the property uses, false otherwise
+    */
+   boolean hasViewUse(ViewUse use);
+
+   /**
+    * Return the admin view names associated with the property
+    * @return the potentially empty admin view names associated with the property
+    */
+   Collection<String> getAdminViewUses();
+
+   /**
+    * Get the activation policy for property value updates.
+    * @return the property activation policy
+    */
+   ActivationPolicy getActivationPolicy();
+
+   /**
+    * Get the value
+    * 
+    * @return the value
+    */
+   MetaValue getValue();
+
+   /**
+    * Set the value
+    * 
+    * @param value the value
+    */
+   void setValue(MetaValue value);
+
+   /**
+    * Get the legal values
+    * 
+    * @return the legal values
+    */
+   Set<MetaValue> getLegalValues();
+
+   /**
+    * Get the property default value if one exists.
+    * @return the default value if one exists, null otherwise.
+    */
+   MetaValue getDefaultValue();
+
+   /**
+    * Get the minimum value
+    * 
+    * @return the minimum value, a MetaValue implementing Comparable
+    */
+   Comparable<? extends MetaValue> getMinimumValue();
+
+   /**
+    * Get the maximum value
+    * 
+    * @return the maximum value, a MetaValue implementing Comparable
+    */
+   Comparable<? extends MetaValue> getMaximumValue();
+
+   /**
+    * Check whether this is a valid value
+    * 
+    * @param value the value
+    * @return null for a valid value, an error message otherwise
+    */
+   String checkValidValue(MetaValue value);
+   
+   /**
+    * Whether the property is mandatory
+    * 
+    * @return true when mandatory
+    */
+   boolean isMandatory();
+
+   /**
+    * Whether the property is read only
+    * @return true when read only
+    */
+   boolean isReadOnly();
+
+   /**
+    * Whether the property has been edited/modified.
+    * 
+    * @return true when modified
+    */
+   boolean isModified();
+
+   /**
+    * Set the modified state of the property value.
+    * @param flag - whether the property has been modified
+    */
+   public void setModified(boolean flag);
+
+   /**
+    * Whether the property has been marked as removed from its ManagedObject.
+    * @return true is the property has been removed.
+    */
+   boolean isRemoved();
+   /**
+    * Set whether a property has been marked as removed from its ManagedObject.
+    * @param flag - true is the property has been removed, false if not.
+    */
+   void setRemoved(boolean flag);
+
+}

Deleted: projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedComponentImpl.java
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/plugins/ManagedComponentImpl.java	2009-05-20 14:23:56 UTC (rev 89190)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedComponentImpl.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -1,201 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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.managed.plugins;
-
-import java.io.Serializable;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Constructor;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.managed.api.ComponentType;
-import org.jboss.managed.api.ManagedDeployment;
-import org.jboss.managed.api.ManagedObject;
-import org.jboss.managed.api.ManagedOperation;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.managed.api.MutableManagedComponent;
-import org.jboss.managed.api.MutableManagedObject;
-import org.jboss.managed.api.RunState;
-import org.jboss.managed.api.RunStateMapper;
-import org.jboss.managed.api.annotation.RunStateProperty;
-import org.jboss.metatype.api.values.MetaValue;
-
-/**
- * Managed component impl.
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class ManagedComponentImpl extends DelegateManagedCommonImpl
-   implements MutableManagedComponent, Serializable
-{
-   private static final long serialVersionUID = 1;
-   
-   private ManagedDeployment owner;
-   private ComponentType type;
-   private RunState runState = RunState.UNKNOWN;
-   private transient RunStateMapper stateMapper;
-   private transient ManagedProperty stateProperty;
-   
-   public ManagedComponentImpl(ComponentType type, ManagedDeployment owner, ManagedObject mo)
-   {
-      this(type, owner, mo, null);
-   }
-   public ManagedComponentImpl(ComponentType type, ManagedDeployment owner, ManagedObject mo,
-         RunStateMapper stateMapper)
-   {
-      super(mo);
-      this.type = type;
-      this.owner = owner;
-      this.stateMapper = stateMapper;
-      // Determine what the run state property is
-      Map<String, ManagedProperty> props = mo.getProperties();
-      if(props != null)
-      {
-         for(ManagedProperty prop : props.values())
-         {
-            if(prop.hasAnnotation(RunStateProperty.class.getName()))
-            {
-               stateProperty = prop;
-               if(stateMapper == null)
-               {
-                  // Try to create it from the RunStateProperty
-                  RunStateProperty rsp = (RunStateProperty) prop.getAnnotations().get(RunStateProperty.class.getName());
-                  String[] metaValues = rsp.metaValues();
-                  String[] enumValues = rsp.enumValues();
-                  try
-                  {
-                     Constructor<? extends RunStateMapper> ctor = rsp.value().getConstructor(metaValues.getClass(), enumValues.getClass());
-                     this.stateMapper = ctor.newInstance(metaValues, enumValues);
-                  }
-                  catch (Exception e)
-                  {
-                     try
-                     {
-                        this.stateMapper = rsp.value().newInstance();
-                     }
-                     catch (Exception e1)
-                     {
-                     }
-                  }
-               }
-               // Cache the run state
-               runState = updateRunState();
-               break;
-            }
-         }
-      }
-   }
-
-   public Map<String, Annotation> getAnnotations()
-   {
-      return getDelegate().getAnnotations();
-   }
-
-   public RunStateMapper getStateMapper()
-   {
-      return stateMapper;
-   }
-   public void setStateMapper(RunStateMapper stateMapper)
-   {
-      this.stateMapper = stateMapper;
-   }
-
-   public RunState getRunState()
-   {
-      return runState;
-   }
-   public void setRunState(RunState runState)
-   {
-      this.runState = runState;
-   }
-
-   public void setOperations(Set<ManagedOperation> operations)
-   {
-      ManagedObject mo = getDelegate();
-      if(mo instanceof MutableManagedObject)
-      {
-         MutableManagedObject mmo = MutableManagedObject.class.cast(mo);
-         mmo.setOperations(operations);
-      }
-   }
-   public void setProperties(Map<String, ManagedProperty> properties)
-   {
-      ManagedObject mo = getDelegate();
-      if(mo instanceof MutableManagedObject)
-      {
-         MutableManagedObject mmo = MutableManagedObject.class.cast(mo);
-         mmo.setProperties(properties);
-      }      
-   }
-
-   /**
-    * Update the cached run state
-    * @return the updated cache state
-    */
-   public RunState updateRunState()
-   {
-      RunState state = RunState.UNKNOWN;
-      if(stateMapper != null && stateProperty != null)
-      {
-         MetaValue value = stateProperty.getValue();
-         state = stateMapper.getRunState(stateProperty, value);
-         this.runState = state;
-      }
-      return runState;
-   }
-
-   /**
-    * Update the component statistic property values. This needs to be
-    * overriden by a subclass in the runtime environment to provide a useful
-    * implementation.
-    * @return false always.
-    */
-   public boolean update()
-   {
-      return false;
-   }
-
-   public ManagedDeployment getDeployment()
-   {
-      return owner;
-   }
-   
-   public ComponentType getType()
-   {
-      return type;
-   }
-   
-   public String toString()
-   {
-      StringBuilder tmp = new StringBuilder(super.toString());
-      tmp.append('{');
-      tmp.append("name=");
-      tmp.append(super.getName());
-      tmp.append(", type=");
-      tmp.append(type);
-      tmp.append(", owner=ManagedDeployment@");
-      tmp.append(System.identityHashCode(owner));
-      tmp.append('}');
-      return tmp.toString();
-   }
-}

Copied: projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedComponentImpl.java (from rev 89193, projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/plugins/ManagedComponentImpl.java)
===================================================================
--- projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedComponentImpl.java	                        (rev 0)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedComponentImpl.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -0,0 +1,205 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, 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.managed.plugins;
+
+import java.io.Serializable;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.managed.api.ComponentType;
+import org.jboss.managed.api.ManagedDeployment;
+import org.jboss.managed.api.ManagedObject;
+import org.jboss.managed.api.ManagedOperation;
+import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.api.MutableManagedComponent;
+import org.jboss.managed.api.MutableManagedObject;
+import org.jboss.managed.api.RunState;
+import org.jboss.managed.api.RunStateMapper;
+import org.jboss.managed.api.annotation.RunStateProperty;
+import org.jboss.metatype.api.values.MetaValue;
+
+/**
+ * Managed component impl.
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revision$
+ */
+public class ManagedComponentImpl extends DelegateManagedCommonImpl
+   implements MutableManagedComponent, Serializable
+{
+   private static final long serialVersionUID = 1;
+   
+   private ManagedDeployment owner;
+   private ComponentType type;
+   private RunState runState = RunState.UNKNOWN;
+   private transient RunStateMapper stateMapper;
+   private transient ManagedProperty stateProperty;
+   
+   public ManagedComponentImpl(ComponentType type, ManagedDeployment owner, ManagedObject mo)
+   {
+      this(type, owner, mo, null);
+   }
+   public ManagedComponentImpl(ComponentType type, ManagedDeployment owner, ManagedObject mo,
+         RunStateMapper stateMapper)
+   {
+      super(mo);
+      this.type = type;
+      this.owner = owner;
+      this.stateMapper = stateMapper;
+      if(mo.getName().indexOf("ServerInfo") > 0)
+      {
+         Thread.dumpStack();
+      }
+      // Determine what the run state property is
+      Map<String, ManagedProperty> props = mo.getProperties();
+      if(props != null)
+      {
+         for(ManagedProperty prop : props.values())
+         {
+            if(prop.hasAnnotation(RunStateProperty.class.getName()))
+            {
+               stateProperty = prop;
+               if(stateMapper == null)
+               {
+                  // Try to create it from the RunStateProperty
+                  RunStateProperty rsp = (RunStateProperty) prop.getAnnotations().get(RunStateProperty.class.getName());
+                  String[] metaValues = rsp.metaValues();
+                  String[] enumValues = rsp.enumValues();
+                  try
+                  {
+                     Constructor<? extends RunStateMapper> ctor = rsp.value().getConstructor(metaValues.getClass(), enumValues.getClass());
+                     this.stateMapper = ctor.newInstance(metaValues, enumValues);
+                  }
+                  catch (Exception e)
+                  {
+                     try
+                     {
+                        this.stateMapper = rsp.value().newInstance();
+                     }
+                     catch (Exception e1)
+                     {
+                     }
+                  }
+               }
+               // Cache the run state
+               runState = updateRunState();
+               break;
+            }
+         }
+      }
+   }
+
+   public Map<String, Annotation> getAnnotations()
+   {
+      return getDelegate().getAnnotations();
+   }
+
+   public RunStateMapper getStateMapper()
+   {
+      return stateMapper;
+   }
+   public void setStateMapper(RunStateMapper stateMapper)
+   {
+      this.stateMapper = stateMapper;
+   }
+
+   public RunState getRunState()
+   {
+      return runState;
+   }
+   public void setRunState(RunState runState)
+   {
+      this.runState = runState;
+   }
+
+   public void setOperations(Set<ManagedOperation> operations)
+   {
+      ManagedObject mo = getDelegate();
+      if(mo instanceof MutableManagedObject)
+      {
+         MutableManagedObject mmo = MutableManagedObject.class.cast(mo);
+         mmo.setOperations(operations);
+      }
+   }
+   public void setProperties(Map<String, ManagedProperty> properties)
+   {
+      ManagedObject mo = getDelegate();
+      if(mo instanceof MutableManagedObject)
+      {
+         MutableManagedObject mmo = MutableManagedObject.class.cast(mo);
+         mmo.setProperties(properties);
+      }      
+   }
+
+   /**
+    * Update the cached run state
+    * @return the updated cache state
+    */
+   public RunState updateRunState()
+   {
+      RunState state = RunState.UNKNOWN;
+      if(stateMapper != null && stateProperty != null)
+      {
+         MetaValue value = stateProperty.getValue();
+         state = stateMapper.getRunState(stateProperty, value);
+         this.runState = state;
+      }
+      return runState;
+   }
+
+   /**
+    * Update the component statistic property values. This needs to be
+    * overriden by a subclass in the runtime environment to provide a useful
+    * implementation.
+    * @return false always.
+    */
+   public boolean update()
+   {
+      return false;
+   }
+
+   public ManagedDeployment getDeployment()
+   {
+      return owner;
+   }
+   
+   public ComponentType getType()
+   {
+      return type;
+   }
+   
+   public String toString()
+   {
+      StringBuilder tmp = new StringBuilder(super.toString());
+      tmp.append('{');
+      tmp.append("name=");
+      tmp.append(super.getName());
+      tmp.append(", type=");
+      tmp.append(type);
+      tmp.append(", owner=ManagedDeployment@");
+      tmp.append(System.identityHashCode(owner));
+      tmp.append('}');
+      return tmp.toString();
+   }
+}

Deleted: projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedObjectImpl.java
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/plugins/ManagedObjectImpl.java	2009-05-20 14:23:56 UTC (rev 89190)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedObjectImpl.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -1,358 +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.managed.plugins;
-
-import java.io.Serializable;
-import java.lang.annotation.Annotation;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.managed.api.ManagedObject;
-import org.jboss.managed.api.ManagedOperation;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.managed.api.MutableManagedObject;
-
-/**
- * ManagedObjectImpl.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class ManagedObjectImpl implements MutableManagedObject
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = 2L;
-
-   /** The object name used for ManagementRef resolution */
-   private String name;
-   /** The name type/qualifier used for ManagementRef resolution */
-   private String nameType;
-   /** The attachment name */
-   private String attachmentName;
-
-   /** The attachment */
-   private transient Object attachment;
-   /** The object annotations <Class name, Annotation> */
-   private Map<String, Annotation> annotations = Collections.emptyMap();
-   /** The properties */
-   private Map<String, ManagedProperty> properties;
-   /** The operations */
-   private Set<ManagedOperation> operations;
-   /** The option parent of this ManagedObject */
-   private ManagedObject parent;
-   /** The runtime component name */
-   private transient Object componentName;
-   /** The transient attachments map */
-   private transient Map<String, Object> transientAttachments;
-
-   /**
-    * Create a new ManagedObjectImpl
-    * 
-    * @param name - The object name used for ManagementRef resolution
-    */
-   public ManagedObjectImpl(String name)
-   {
-      this(name, name, null, toMap(null), new HashSet<ManagedOperation>(), null);
-   }
-   
-   /**
-    * Create a new ManagedObjectImpl
-    * 
-    * @param name - The object name used for ManagementRef resolution
-    * @param properties the properties 
-    */
-   public ManagedObjectImpl(String name, Set<ManagedProperty> properties)
-   {
-      this(name, name, null, properties, new HashSet<ManagedOperation>(), null);
-   }
-
-   /**
-    * Create a new ManagedObjectImpl
-    * 
-    * @param name - The object name used for ManagementRef resolution
-    * @param properties the properties
-    * @param operations the operations
-    */
-   public ManagedObjectImpl(String name, Set<ManagedProperty> properties,
-         HashSet<ManagedOperation> operations)
-   {
-      this(name, name, null, properties, operations, null);
-   }
-
-   /**
-    * Create a new ManagedObjectImpl
-    * 
-    * @param name - The object name used for ManagementRef resolution
-    * @param nameType - The name type/qualifier used for ManagementRef resolution
-    * @param attachmentName the attachment name
-    * @param properties the properties
-    * @param operations the operations
-    * @param attachment the attachment
-    */
-   public ManagedObjectImpl(
-         String name,
-         String nameType,
-         String attachmentName,
-         Set<ManagedProperty> properties,
-         HashSet<ManagedOperation> operations,
-         Serializable attachment
-   )
-   {
-      this(name, nameType, attachmentName, toMap(properties), operations, attachment);
-   }
-
-   /**
-    * Create a new ManagedObjectImpl
-    *
-    * @param name - The object name used for ManagementRef resolution
-    * @param nameType - The name type/qualifier used for ManagementRef resolution
-    * @param attachmentName the attachment name
-    * @param properties the properties
-    * @param operations the operations
-    * @param attachment the attachment
-    */
-   public ManagedObjectImpl(
-         String name,
-         String nameType,
-         String attachmentName,
-         Map<String, ManagedProperty> properties,
-         HashSet<ManagedOperation> operations,
-         Serializable attachment
-   )
-   {
-      if (name == null)
-         throw new IllegalArgumentException("Null name");
-      if (properties == null)
-         throw new IllegalArgumentException("Null properties");
-      
-      this.name = name;
-      // todo - check for null?
-      this.nameType = nameType;
-      this.attachmentName = attachmentName;
-      this.properties = properties;
-      this.operations = operations;
-      setAttachment(attachment);
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-
-   public String getNameType()
-   {
-      return nameType;
-   }
-
-   public void setNameType(String nameType)
-   {
-      this.nameType = nameType;
-   }
-
-   public String getAttachmentName()
-   {
-      return attachmentName;
-   }
-
-   public void setAttachmentName(String attachmentName)
-   {
-      this.attachmentName = attachmentName;
-   }
-
-   /**
-    * Get the annotations associated with the property
-    * @return the annotations associated with the property
-    */
-   public Map<String, Annotation> getAnnotations()
-   {
-      return annotations;
-   }
-
-   public void setAnnotations(Map<String, Annotation> annotations)
-   {
-      if (this.annotations.isEmpty())
-         this.annotations = new HashMap<String, Annotation>();
-      else
-         this.annotations.clear();
-      this.annotations.putAll(annotations);
-   }
-
-   public Set<String> getPropertyNames()
-   {
-      return properties.keySet();
-   }
-   
-   public ManagedProperty getProperty(String name)
-   {
-      if (name == null)
-         throw new IllegalArgumentException("Null name");
-      
-      return properties.get(name);
-   }
-   
-   public Map<String, ManagedProperty> getProperties()
-   {
-      return properties;
-   }
-
-   public void setProperties(Map<String, ManagedProperty> properties)
-   {
-      this.properties = properties;
-   }
-
-   public Object getAttachment()
-   {
-      return attachment;
-   }
-
-   /**
-    * Set the attachment.
-    * 
-    * @param attachment the attachment.
-    */
-   public void setAttachment(Object attachment)
-   {
-      this.attachment = attachment;
-   }
-
-   /**
-    * get the ManagedOperations
-    * @return set of managed operations
-    */
-   public Set<ManagedOperation> getOperations()
-   {
-      return operations;
-   }
-
-   public void setOperations(Set<ManagedOperation> operations)
-   {
-      this.operations = operations;
-   }
-
-   
-   public ManagedObject getParent()
-   {
-      return parent;
-   }
-
-   public void setParent(ManagedObject parent)
-   {
-      this.parent = parent;
-   }
-
-   public Object getComponentName()
-   {
-      return componentName;
-   }
-
-   public void setComponentName(Object name)
-   {
-      this.componentName = name;
-   }
-
-   
-   public <T> T getTransientAttachment(Class<T> expectedType)
-   {
-      T tvalue = null;
-      Object value = getTransientAttachment(expectedType.getName());
-      if(value != null)
-         tvalue = expectedType.cast(value);
-      return tvalue;
-   }
-
-   public Object getTransientAttachment(String name)
-   {
-      Object value = null;
-      if(transientAttachments != null)
-         value = transientAttachments.get(name);
-      return value;
-   }
-
-   public synchronized void setTransientAttachment(String name, Object attachment)
-   {
-      if(transientAttachments == null)
-         transientAttachments = new HashMap<String, Object>();
-      transientAttachments.put(name, attachment);
-   }
-
-   @Override
-   public boolean equals(Object obj)
-   {
-      if (obj == this)
-         return true;
-      if (obj == null || obj instanceof ManagedObject == false)
-         return false;
-      
-      ManagedObject other = (ManagedObject) obj;
-      return getName().equals(other.getName()) && getProperties().equals(other.getProperties());
-   }
-   
-   @Override
-   public int hashCode()
-   {
-      return name.hashCode();
-   }
-   
-   @Override
-   public String toString()
-   {
-      return "ManagedObject{" + name + "}"; 
-   }
-
-   /**
-    * Append the name and props 
-    * @param sb the buffer to append the name and props to
-    */
-   protected void toString(StringBuilder sb)
-   {
-      sb.append("name=");
-      sb.append(name);
-      sb.append(", nameType=");
-      sb.append(nameType);
-      sb.append(", attachmentName=");
-      sb.append(attachmentName);
-      sb.append(", properties=");
-      sb.append(properties);
-   }
-
-   private static Map<String, ManagedProperty> toMap(Set<ManagedProperty> props)
-   {
-      HashMap<String, ManagedProperty> properties = new HashMap<String, ManagedProperty>();
-      if (props != null && props.isEmpty() == false)
-      {
-         for (ManagedProperty prop : props)
-         {
-            properties.put(prop.getName(), prop);
-         }
-      }
-      return properties;
-   }
-}

Copied: projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedObjectImpl.java (from rev 89195, projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/plugins/ManagedObjectImpl.java)
===================================================================
--- projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedObjectImpl.java	                        (rev 0)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedObjectImpl.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -0,0 +1,388 @@
+/*
+* 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.managed.plugins;
+
+import java.io.Serializable;
+import java.lang.annotation.Annotation;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.managed.api.ManagedObject;
+import org.jboss.managed.api.ManagedOperation;
+import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.api.MutableManagedObject;
+
+/**
+ * ManagedObjectImpl.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author Scott.Stark at jboss.org
+ * @version $Revision$
+ */
+public class ManagedObjectImpl implements MutableManagedObject
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 2L;
+
+   /** The object name used for ManagementRef resolution */
+   private String name;
+   /** The name type/qualifier used for ManagementRef resolution */
+   private String nameType;
+   /** The attachment name */
+   private String attachmentName;
+
+   /** The attachment */
+   private transient Object attachment;
+   /** The object annotations <Class name, Annotation> */
+   private Map<String, Annotation> annotations = Collections.emptyMap();
+   /** The properties */
+   private Map<String, ManagedProperty> properties;
+   /** The operations */
+   private Set<ManagedOperation> operations;
+   /** The option parent of this ManagedObject */
+   private ManagedObject parent;
+   /** The runtime component name */
+   private transient Object componentName;
+   /** The transient attachments map */
+   private transient Map<String, Object> transientAttachments;
+
+   /**
+    * Create a new ManagedObjectImpl
+    * 
+    * @param name - The object name used for ManagementRef resolution
+    */
+   public ManagedObjectImpl(String name)
+   {
+      this(name, name, null, toMap(null), new HashSet<ManagedOperation>(), null);
+   }
+   
+   /**
+    * Create a new ManagedObjectImpl
+    * 
+    * @param name - The object name used for ManagementRef resolution
+    * @param properties the properties 
+    */
+   public ManagedObjectImpl(String name, Set<ManagedProperty> properties)
+   {
+      this(name, name, null, properties, new HashSet<ManagedOperation>(), null);
+   }
+
+   /**
+    * Create a new ManagedObjectImpl
+    * 
+    * @param name - The object name used for ManagementRef resolution
+    * @param properties the properties
+    * @param operations the operations
+    */
+   public ManagedObjectImpl(String name, Set<ManagedProperty> properties,
+         Set<ManagedOperation> operations)
+   {
+      this(name, name, null, properties, operations, null);
+   }
+   @Deprecated
+   public ManagedObjectImpl(String name, Set<ManagedProperty> properties,
+         HashSet<ManagedOperation> operations)
+   {
+      this(name, name, null, properties, operations, null);
+   }
+
+   /**
+    * Create a new ManagedObjectImpl
+    * 
+    * @param name - The object name used for ManagementRef resolution
+    * @param nameType - The name type/qualifier used for ManagementRef resolution
+    * @param attachmentName the attachment name
+    * @param properties the properties
+    * @param operations the operations
+    * @param attachment the attachment
+    */
+   public ManagedObjectImpl(
+         String name,
+         String nameType,
+         String attachmentName,
+         Set<ManagedProperty> properties,
+         Set<ManagedOperation> operations,
+         Object attachment
+   )
+   {
+      this(name, nameType, attachmentName, toMap(properties), operations, attachment);
+   }
+   @Deprecated
+   public ManagedObjectImpl(
+         String name,
+         String nameType,
+         String attachmentName,
+         Set<ManagedProperty> properties,
+         HashSet<ManagedOperation> operations,
+         Serializable attachment
+   )
+   {
+      this(name, nameType, attachmentName, toMap(properties), operations, attachment);
+   }
+
+   /**
+    * Create a new ManagedObjectImpl
+    *
+    * @param name - The object name used for ManagementRef resolution
+    * @param nameType - The name type/qualifier used for ManagementRef resolution
+    * @param attachmentName the attachment name
+    * @param properties the properties
+    * @param operations the operations
+    * @param attachment the attachment
+    */
+   public ManagedObjectImpl(
+         String name,
+         String nameType,
+         String attachmentName,
+         Map<String, ManagedProperty> properties,
+         Set<ManagedOperation> operations,
+         Object attachment
+   )
+   {
+      if (name == null)
+         throw new IllegalArgumentException("Null name");
+      if (properties == null)
+         throw new IllegalArgumentException("Null properties");
+
+      this.name = name;
+      // todo - check for null?
+      this.nameType = nameType;
+      this.attachmentName = attachmentName;
+      this.properties = properties;
+      this.operations = operations;
+      setAttachment(attachment);
+   }
+   @Deprecated
+   public ManagedObjectImpl(
+         String name,
+         String nameType,
+         String attachmentName,
+         Map<String, ManagedProperty> properties,
+         HashSet<ManagedOperation> operations,
+         Serializable attachment
+   )
+   {
+      this(name, name, attachmentName, properties, (Set<ManagedOperation>)operations, attachment);      
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+   public String getNameType()
+   {
+      return nameType;
+   }
+
+   public void setNameType(String nameType)
+   {
+      this.nameType = nameType;
+   }
+
+   public String getAttachmentName()
+   {
+      return attachmentName;
+   }
+
+   public void setAttachmentName(String attachmentName)
+   {
+      this.attachmentName = attachmentName;
+   }
+
+   /**
+    * Get the annotations associated with the property
+    * @return the annotations associated with the property
+    */
+   public Map<String, Annotation> getAnnotations()
+   {
+      return annotations;
+   }
+
+   public void setAnnotations(Map<String, Annotation> annotations)
+   {
+      if (this.annotations.isEmpty())
+         this.annotations = new HashMap<String, Annotation>();
+      else
+         this.annotations.clear();
+      this.annotations.putAll(annotations);
+   }
+
+   public Set<String> getPropertyNames()
+   {
+      return properties.keySet();
+   }
+   
+   public ManagedProperty getProperty(String name)
+   {
+      if (name == null)
+         throw new IllegalArgumentException("Null name");
+      
+      return properties.get(name);
+   }
+   
+   public Map<String, ManagedProperty> getProperties()
+   {
+      return properties;
+   }
+
+   public void setProperties(Map<String, ManagedProperty> properties)
+   {
+      this.properties = properties;
+   }
+
+   public Object getAttachment()
+   {
+      return attachment;
+   }
+
+   /**
+    * Set the attachment.
+    * 
+    * @param attachment the attachment.
+    */
+   public void setAttachment(Object attachment)
+   {
+      this.attachment = attachment;
+   }
+
+   /**
+    * get the ManagedOperations
+    * @return set of managed operations
+    */
+   public Set<ManagedOperation> getOperations()
+   {
+      return operations;
+   }
+
+   public void setOperations(Set<ManagedOperation> operations)
+   {
+      this.operations = operations;
+   }
+
+   
+   public ManagedObject getParent()
+   {
+      return parent;
+   }
+
+   public void setParent(ManagedObject parent)
+   {
+      this.parent = parent;
+   }
+
+   public Object getComponentName()
+   {
+      return componentName;
+   }
+
+   public void setComponentName(Object name)
+   {
+      this.componentName = name;
+   }
+
+   
+   public <T> T getTransientAttachment(Class<T> expectedType)
+   {
+      T tvalue = null;
+      Object value = getTransientAttachment(expectedType.getName());
+      if(value != null)
+         tvalue = expectedType.cast(value);
+      return tvalue;
+   }
+
+   public Object getTransientAttachment(String name)
+   {
+      Object value = null;
+      if(transientAttachments != null)
+         value = transientAttachments.get(name);
+      return value;
+   }
+
+   public synchronized void setTransientAttachment(String name, Object attachment)
+   {
+      if(transientAttachments == null)
+         transientAttachments = new HashMap<String, Object>();
+      transientAttachments.put(name, attachment);
+   }
+
+   @Override
+   public boolean equals(Object obj)
+   {
+      if (obj == this)
+         return true;
+      if (obj == null || obj instanceof ManagedObject == false)
+         return false;
+      
+      ManagedObject other = (ManagedObject) obj;
+      return getName().equals(other.getName()) && getProperties().equals(other.getProperties());
+   }
+   
+   @Override
+   public int hashCode()
+   {
+      return name.hashCode();
+   }
+   
+   @Override
+   public String toString()
+   {
+      return "ManagedObject{" + name + "}"; 
+   }
+
+   /**
+    * Append the name and props 
+    * @param sb the buffer to append the name and props to
+    */
+   protected void toString(StringBuilder sb)
+   {
+      sb.append("name=");
+      sb.append(name);
+      sb.append(", nameType=");
+      sb.append(nameType);
+      sb.append(", attachmentName=");
+      sb.append(attachmentName);
+      sb.append(", properties=");
+      sb.append(properties);
+   }
+
+   private static Map<String, ManagedProperty> toMap(Set<ManagedProperty> props)
+   {
+      HashMap<String, ManagedProperty> properties = new HashMap<String, ManagedProperty>();
+      if (props != null && props.isEmpty() == false)
+      {
+         for (ManagedProperty prop : props)
+         {
+            properties.put(prop.getName(), prop);
+         }
+      }
+      return properties;
+   }
+}

Deleted: projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedPropertyImpl.java
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/plugins/ManagedPropertyImpl.java	2009-05-20 14:23:56 UTC (rev 89190)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedPropertyImpl.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -1,625 +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.managed.plugins;
-
-import java.io.IOException;
-import java.io.InvalidObjectException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import java.lang.annotation.Annotation;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.managed.api.Fields;
-import org.jboss.managed.api.ManagedObject;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.managed.api.annotation.ActivationPolicy;
-import org.jboss.managed.api.annotation.ManagementProperty;
-import org.jboss.managed.api.annotation.ViewUse;
-import org.jboss.metatype.api.types.MetaType;
-import org.jboss.metatype.api.values.MetaValue;
-import org.jboss.metatype.api.values.SimpleValue;
-
-/**
- * ManagedProperty.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class ManagedPropertyImpl implements ManagedProperty
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = 2;
-   /* writeObject format:
-    * - int version
-    * - Fields fields
-    * - ManagedObject managedObject
-    * - ManagedObject targetManagedObject
-    */
-   private static final int VERSION1 = 1;
-   /** The serialization version used by writeObject */
-   private static final int STREAM_VERSION = VERSION1;
-
-   /** The managed object */
-   private ManagedObject managedObject;
-   /** The managed object target for a ManagementObjectRef */
-   private ManagedObject targetManagedObject;
-   
-   /** The fields */
-   private Fields fields;
-
-   /** The property name */
-   private transient String name;
-   /** The transient attachments map */
-   private transient Map<String, Object> transientAttachments;
-
-   /**
-    * Create a new ManagedProperty that is not associated to
-    * a ManagedObject.
-    *
-    * @param name the managed property name
-    * @throws IllegalArgumentException for null fields or
-    *    missing Fields.NAME
-    */
-   public ManagedPropertyImpl(String name)
-   {
-      this(null, new DefaultFieldsImpl(name));
-   }
-
-   /**
-    * Create a new ManagedProperty that is not associated to
-    * a ManagedObject.
-    * 
-    * @param fields the fields
-    * @throws IllegalArgumentException for null fields or
-    *    missing Fields.NAME
-    */
-   public ManagedPropertyImpl(Fields fields)
-   {
-      this(null, fields);
-   }
-
-   /**
-    * Create a new ManagedProperty.
-    * 
-    * @param managedObject the managed object, may be null
-    * @param fields the fields
-    * @throws IllegalArgumentException for null fields or
-    *    missing Fields.NAME
-    */
-   public ManagedPropertyImpl(ManagedObject managedObject, Fields fields)
-   {
-      init(managedObject, fields);
-   }
-   
-   public ManagedObject getManagedObject()
-   {
-      return managedObject;
-   }
-
-   /**
-    * Set managed object
-    * 
-    * @param managedObject the managed object
-    */
-   public void setManagedObject(ManagedObject managedObject)
-   {
-      this.managedObject = managedObject;
-   }
-
-   public ManagedObject getTargetManagedObject()
-   {
-      return targetManagedObject;
-   }
-
-   public void setTargetManagedObject(ManagedObject target)
-   {
-      this.targetManagedObject = target;
-   }
-
-   public Fields getFields()
-   {
-      return fields;
-   }
-   
-   // TODO general reconstruction code for metatypes
-   @SuppressWarnings("unchecked")
-   public <T> T getField(String fieldName, Class<T> expected)
-   {
-      if (fieldName == null)
-         throw new IllegalArgumentException("Null field name");
-      if (expected == null)
-         throw new IllegalArgumentException("Null expected type");
-      
-      Object field = getFields().getField(fieldName);
-      
-      if (field == null)
-         return null;
-
-      if (expected.isInstance(field))
-         return expected.cast(field);
-      
-      if (field instanceof SimpleValue)
-      {
-         SimpleValue value = (SimpleValue) field;
-         Object result = value.getValue();
-         if (result == null)
-            return null;
-         return expected.cast(result);
-      }
-      
-      throw new IllegalStateException("Field " + fieldName + " with value " + field + " is not of the expected type: " + expected.getName());
-   }
-   
-   // TODO metaType stuff
-   public void setField(String fieldName, Serializable value)
-   {
-      if (fieldName == null)
-         throw new IllegalArgumentException("Null field name");
-      
-      getFields().setField(fieldName, value);
-   }
-   
-   public String getName()
-   {
-      return name;
-   }
-
-   public String getMappedName()
-   {
-      return getField(Fields.MAPPED_NAME, String.class);
-   }
-
-   public String getDescription()
-   {
-      return getField(Fields.DESCRIPTION, String.class);
-   }
-   
-   /**
-    * Set the description
-    * 
-    * @param description the description
-    */
-   public void setDescription(String description)
-   {
-      setField(Fields.DESCRIPTION, description);
-   }
-
-
-   /**
-    * Get the annotations associated with the property
-    * @return the annotations associated with the property
-    */
-   @SuppressWarnings("unchecked")
-   public Map<String, Annotation> getAnnotations()
-   {
-      Object set = getField(Fields.ANNOTATIONS, Object.class);
-      return (Map) set;
-   }
-
-   public void setAnnotations(Map<String, Annotation> annotations)
-   {
-      setField(Fields.ANNOTATIONS, (Serializable) annotations);      
-   }
-
-   
-   public boolean hasAnnotation(String key)
-   {
-      boolean hasAnnotation = false;
-      // Look to the ManagementProperty annotation
-      Map<String, Annotation> annotations = getAnnotations();
-      if(annotations != null)
-      {
-         hasAnnotation = annotations.containsKey(key);
-      }
-      return hasAnnotation;
-   }
-
-   /**
-    * See if the property has the indicated ViewUse among its
-    * @ManagementProperty annotation or VIEW_USE field uses.
-    * 
-    * @param use - the ViewUse to check for
-    * @return true if the ViewUse exists in the property uses, false otherwise
-    */
-   public boolean hasViewUse(ViewUse use)
-   {
-      boolean hasViewUse = false;
-      ViewUse[] uses = getViewUse();
-      if(uses != null)
-      {
-         for(ViewUse vu : uses)
-         {
-            hasViewUse |= vu == use;
-         }
-      }
-      return hasViewUse;
-   }
-
-   public MetaType getMetaType()
-   {
-      return getField(Fields.META_TYPE, MetaType.class);
-   }
-   
-   /**
-    * Set the meta type
-    * 
-    * @param type the meta type
-    */
-   public void setMetaType(MetaType type)
-   {
-      setField(Fields.META_TYPE, type);
-   }
-
-   public MetaValue getValue()
-   {
-      return getField(Fields.VALUE, MetaValue.class);
-   }
-
-   public void setValue(MetaValue value)
-   {
-      // Check for a change 
-      MetaValue oldValue = getValue();
-      if(oldValue != value)
-      {
-         boolean isModified = true;
-         if(value != null)
-            isModified = ! value.equals(oldValue);
-         setModified(isModified);
-      }
-      setField(Fields.VALUE, value);
-   }
-
-   public ViewUse[] getViewUse()
-   {
-      ViewUse[] use = {};
-      ViewUse[] useField = getField(Fields.VIEW_USE, ViewUse[].class);
-      // Also look to the ManagementProperty annotation
-      Map<String, Annotation> annotations = getAnnotations();
-      if(annotations != null)
-      {
-         ManagementProperty mp = (ManagementProperty) annotations.get(ManagementProperty.class.getName());
-         if(mp != null)
-         {
-            use = mp.use();
-            if(useField != null && useField.length > 0)
-            {
-               HashSet<ViewUse> uses = new HashSet<ViewUse>();
-               for(ViewUse vu : use)
-               {
-                  uses.add(vu);
-               }
-               for(ViewUse vu : useField)
-               {
-                  uses.add(vu);
-               }
-               use = new ViewUse[uses.size()];
-               uses.toArray(use);
-            }
-         }
-      }
-      else if(useField != null)
-      {
-         use = useField;
-      }
-      return use;
-   }
-   public void setViewUse(ViewUse[] use)
-   {
-      setField(Fields.VIEW_USE, use);
-   }
-
-   public ActivationPolicy getActivationPolicy()
-   {
-      ActivationPolicy activationPolicy = getField(Fields.ACTIVATION_POLICY, ActivationPolicy.class);
-      return activationPolicy;
-   }
-   public void setActivationPolicy(ActivationPolicy policy)
-   {
-      setField(Fields.ACTIVATION_POLICY, policy);
-   }
-
-   @SuppressWarnings("unchecked")
-   public Set<MetaValue> getLegalValues()
-   {
-      return getField(Fields.LEGAL_VALUES, Set.class);
-   }
-   
-   /**
-    * Set the legal values
-    * 
-    * @param values the values
-    */
-   public void setLegalValues(Set<MetaValue> values)
-   {
-      setField(Fields.LEGAL_VALUES, (Serializable)values);
-   }
-
-   public MetaValue getDefaultValue()
-   {
-      MetaValue field = getField(Fields.DEFAULT_VALUE, MetaValue.class);
-      return field;
-   }
-
-   public Comparable<MetaValue> getMinimumValue()
-   {
-      return getField(Fields.MINIMUM_VALUE, Comparable.class);
-   }
-   
-   /**
-    * Set the minimum value
-    * 
-    * @param value the value
-    */
-   public void setMinimumValue(Comparable<MetaValue> value)
-   {
-      setField(Fields.MINIMUM_VALUE, (Serializable)value);
-   }
-
-   public Comparable<MetaValue> getMaximumValue()
-   {
-      Comparable<MetaValue> field = getField(Fields.MAXIMUM_VALUE, Comparable.class);
-      return field;
-   }
-
-   /**
-    * Set the maximum value
-    * 
-    * @param value the value
-    */
-   public void setMaximumValue(Comparable<MetaValue> value)
-   {
-      setField(Fields.MAXIMUM_VALUE, (Serializable)value);
-   }
-
-   public String checkValidValue(MetaValue value)
-   {
-      Comparable<MetaValue> min = getMinimumValue();
-      if(min != null)
-      {
-         if(min.compareTo(value) > 0)
-            return "min("+min+") > "+value;
-      }
-      Comparable<MetaValue> max = getMaximumValue();
-      if(max != null)
-      {
-         if(max.compareTo(value) < 0)
-            return "max("+max+") < "+value;
-      }
-      Set<MetaValue> legalValues = getLegalValues();
-      if(legalValues != null && legalValues.size() > 0)
-      {
-         if(legalValues.contains(value) == false)
-            return legalValues+" does not contain: "+value;
-      }
-      return null;
-   }
-   
-   public boolean isMandatory()
-   {
-      Boolean result = getField(Fields.MANDATORY, Boolean.class);
-      if (result == null)
-         return false;
-      return result;
-   }
-
-   public boolean isReadOnly()
-   {
-      Boolean result = getField(Fields.READ_ONLY, Boolean.class);
-      if (result == null)
-         return false;
-      return result;
-   }
-   public void setReadOnly(boolean flag)
-   {
-      if (flag)
-         setField(Fields.READ_ONLY, flag);
-      else
-         setField(Fields.READ_ONLY, null);
-   }
-
-   public boolean isModified()
-   {
-      Boolean result = getField(Fields.MODIFIED, Boolean.class);
-      if (result == null)
-         return false;
-      return result;
-   }
-   public void setModified(boolean flag)
-   {
-      if (flag)
-         setField(Fields.MODIFIED, flag);
-      else
-         setField(Fields.MODIFIED, null);
-   }
-
-   /**
-    * Set whether the field is mandatory
-    * 
-    * @param flag true for mandatory
-    */
-   public void setMandatory(boolean flag)
-   {
-      if (flag)
-         setField(Fields.MANDATORY, flag);
-      else
-         setField(Fields.MANDATORY, null);
-   }
-
-   public boolean isRemoved()
-   {
-      Boolean result = getField(Fields.REMOVED, Boolean.class);
-      if (result == null)
-         return false;
-      return result;
-   }
-   
-   /**
-    * Set whether the property is removed
-    * 
-    * @param flag true for removed
-    */
-   public void setRemoved(boolean flag)
-   {
-      if (flag)
-         setField(Fields.REMOVED, flag);
-      else
-         setField(Fields.REMOVED, null);
-   }
-
-   public <T> T getTransientAttachment(Class<T> expectedType)
-   {
-      T tvalue = null;
-      Object value = getTransientAttachment(expectedType.getName());
-      if(value != null)
-         tvalue = expectedType.cast(value);
-      return tvalue;
-   }
-
-   public Object getTransientAttachment(String name)
-   {
-      Object value = null;
-      if(transientAttachments != null)
-         value = transientAttachments.get(name);
-      return value;
-   }
-
-   public synchronized void setTransientAttachment(String name, Object attachment)
-   {
-      if(transientAttachments == null)
-         transientAttachments = new HashMap<String, Object>();
-      transientAttachments.put(name, attachment);
-   }
-
-   @Override
-   public String toString()
-   {
-      StringBuilder tmp = new StringBuilder("ManagedProperty");
-      tmp.append('{');
-      tmp.append(name);
-      if( getMappedName() != null )
-      {
-         tmp.append(',');
-         tmp.append(getMappedName());
-      }
-      tmp.append(",metaType=");
-      tmp.append(this.getMetaType());
-      tmp.append('}');
-      return tmp.toString(); 
-   }
-
-   @Override
-   public int hashCode()
-   {
-      return name.hashCode(); 
-   }
-
-   @Override
-   public boolean equals(Object obj)
-   {
-      if (obj == this)
-         return true;
-      if (obj == null || obj instanceof ManagedProperty == false)
-         return false;
-      
-      ManagedProperty other = (ManagedProperty) obj;
-      return getName().equals(other.getName());
-   }
-   
-   public ManagedProperty copy()
-   {
-      Fields fieldsCopy = fields.copy();
-      ManagedProperty mp = new ManagedPropertyImpl(fieldsCopy);
-      return mp;
-   }
-
-   /**
-    * Initialise a ManagedPropertyImpl.
-    * 
-    * @param managedObject the managed object, may be null
-    * @param fields the fields
-    * @throws IllegalArgumentException for null fields or
-    *    missing Fields.NAME
-    */
-   private void init(ManagedObject managedObject, Fields fields)
-   {
-      if (fields == null)
-         throw new IllegalArgumentException("Null fields");
-      
-      this.managedObject = managedObject;
-      this.fields = fields;
-      
-      name = getField(Fields.NAME, String.class);
-      if (name == null)
-         throw new IllegalArgumentException("No " + Fields.NAME + " in fields");
-   }
-
-   /**
-    * Read from a stream
-    * 
-    * @param in the stream
-    * @throws IOException for IO problem
-    * @throws ClassNotFoundException for a classloading problem
-    */
-   private void readObject(ObjectInputStream in)
-      throws IOException, ClassNotFoundException
-   {
-      int version = in.readInt();
-      if( version == VERSION1 )
-         readVersion1(in);
-      else
-         throw new InvalidObjectException("Unknown version="+version);
-   }
-   /**
-    * Write out the property fields
-    * @param out
-    * @throws IOException
-    */
-   private void writeObject(ObjectOutputStream out)
-      throws IOException
-   {
-      out.writeInt(STREAM_VERSION);
-      out.writeObject(fields);
-      out.writeObject(managedObject);
-      out.writeObject(targetManagedObject);
-   }
-
-   /**
-    * The VERSION1 expected format: 
-    * - Fields fields
-    * - ManagedObject managedObject
-    */
-   private void readVersion1(ObjectInputStream in)
-      throws IOException, ClassNotFoundException
-   {
-      fields = (Fields) in.readObject();
-      name = getField(Fields.NAME, String.class);
-      if (name == null)
-         throw new IOException("No " + Fields.NAME + " in fields");
-      managedObject = (ManagedObject) in.readObject();      
-      targetManagedObject = (ManagedObject) in.readObject();      
-   }
-}

Copied: projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedPropertyImpl.java (from rev 89193, projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/plugins/ManagedPropertyImpl.java)
===================================================================
--- projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedPropertyImpl.java	                        (rev 0)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/main/java/org/jboss/managed/plugins/ManagedPropertyImpl.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -0,0 +1,659 @@
+/*
+* 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.managed.plugins;
+
+import java.io.IOException;
+import java.io.InvalidObjectException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.lang.annotation.Annotation;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.managed.api.Fields;
+import org.jboss.managed.api.ManagedObject;
+import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.api.annotation.ActivationPolicy;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.managed.api.annotation.ViewUse;
+import org.jboss.metatype.api.types.MetaType;
+import org.jboss.metatype.api.values.MetaValue;
+import org.jboss.metatype.api.values.SimpleValue;
+
+/**
+ * ManagedProperty.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author Scott.Stark at jboss.org
+ * @version $Revision$
+ */
+public class ManagedPropertyImpl implements ManagedProperty
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 2;
+   /* writeObject format:
+    * - int version
+    * - Fields fields
+    * - ManagedObject managedObject
+    * - ManagedObject targetManagedObject
+    */
+   private static final int VERSION1 = 1;
+   /** The serialization version used by writeObject */
+   private static final int STREAM_VERSION = VERSION1;
+
+   /** The managed object */
+   private ManagedObject managedObject;
+   /** The managed object target for a ManagementObjectRef */
+   private ManagedObject targetManagedObject;
+   
+   /** The fields */
+   private Fields fields;
+
+   /** The property name */
+   private transient String name;
+   /** The transient attachments map */
+   private transient Map<String, Object> transientAttachments;
+
+   /**
+    * Create a new ManagedProperty that is not associated to
+    * a ManagedObject.
+    *
+    * @param name the managed property name
+    * @throws IllegalArgumentException for null fields or
+    *    missing Fields.NAME
+    */
+   public ManagedPropertyImpl(String name)
+   {
+      this(null, new DefaultFieldsImpl(name));
+   }
+
+   /**
+    * Create a new ManagedProperty that is not associated to
+    * a ManagedObject.
+    * 
+    * @param fields the fields
+    * @throws IllegalArgumentException for null fields or
+    *    missing Fields.NAME
+    */
+   public ManagedPropertyImpl(Fields fields)
+   {
+      this(null, fields);
+   }
+
+   /**
+    * Create a new ManagedProperty.
+    * 
+    * @param managedObject the managed object, may be null
+    * @param fields the fields
+    * @throws IllegalArgumentException for null fields or
+    *    missing Fields.NAME
+    */
+   public ManagedPropertyImpl(ManagedObject managedObject, Fields fields)
+   {
+      init(managedObject, fields);
+   }
+   
+   public ManagedObject getManagedObject()
+   {
+      return managedObject;
+   }
+
+   /**
+    * Set managed object
+    * 
+    * @param managedObject the managed object
+    */
+   public void setManagedObject(ManagedObject managedObject)
+   {
+      this.managedObject = managedObject;
+   }
+
+   public ManagedObject getTargetManagedObject()
+   {
+      return targetManagedObject;
+   }
+
+   public void setTargetManagedObject(ManagedObject target)
+   {
+      this.targetManagedObject = target;
+   }
+
+   public Fields getFields()
+   {
+      return fields;
+   }
+   
+   // TODO general reconstruction code for metatypes
+   @SuppressWarnings("unchecked")
+   public <T> T getField(String fieldName, Class<T> expected)
+   {
+      if (fieldName == null)
+         throw new IllegalArgumentException("Null field name");
+      if (expected == null)
+         throw new IllegalArgumentException("Null expected type");
+      
+      Object field = getFields().getField(fieldName);
+      
+      if (field == null)
+         return null;
+
+      if (expected.isInstance(field))
+         return expected.cast(field);
+      
+      if (field instanceof SimpleValue)
+      {
+         SimpleValue value = (SimpleValue) field;
+         Object result = value.getValue();
+         if (result == null)
+            return null;
+         return expected.cast(result);
+      }
+      
+      throw new IllegalStateException("Field " + fieldName + " with value " + field + " is not of the expected type: " + expected.getName());
+   }
+   
+   // TODO metaType stuff
+   public void setField(String fieldName, Serializable value)
+   {
+      if (fieldName == null)
+         throw new IllegalArgumentException("Null field name");
+      
+      getFields().setField(fieldName, value);
+   }
+   
+   public String getName()
+   {
+      return name;
+   }
+
+   public String getMappedName()
+   {
+      return getField(Fields.MAPPED_NAME, String.class);
+   }
+
+   public String getDescription()
+   {
+      return getField(Fields.DESCRIPTION, String.class);
+   }
+   
+   /**
+    * Set the description
+    * 
+    * @param description the description
+    */
+   public void setDescription(String description)
+   {
+      setField(Fields.DESCRIPTION, description);
+   }
+
+
+   /**
+    * Get the annotations associated with the property
+    * @return the annotations associated with the property
+    */
+   @SuppressWarnings("unchecked")
+   public Map<String, Annotation> getAnnotations()
+   {
+      Object set = getField(Fields.ANNOTATIONS, Object.class);
+      return (Map) set;
+   }
+
+   public void setAnnotations(Map<String, Annotation> annotations)
+   {
+      setField(Fields.ANNOTATIONS, (Serializable) annotations);      
+   }
+
+   
+   public boolean hasAnnotation(String key)
+   {
+      boolean hasAnnotation = false;
+      // Look to the ManagementProperty annotation
+      Map<String, Annotation> annotations = getAnnotations();
+      if(annotations != null)
+      {
+         hasAnnotation = annotations.containsKey(key);
+      }
+      return hasAnnotation;
+   }
+
+   /**
+    * See if the property has the indicated ViewUse among its
+    * @ManagementProperty annotation or VIEW_USE field uses.
+    * 
+    * @param use - the ViewUse to check for
+    * @return true if the ViewUse exists in the property uses, false otherwise
+    */
+   public boolean hasViewUse(ViewUse use)
+   {
+      boolean hasViewUse = false;
+      ViewUse[] uses = getViewUse();
+      if(uses != null)
+      {
+         for(ViewUse vu : uses)
+         {
+            hasViewUse |= vu == use;
+         }
+      }
+      return hasViewUse;
+   }
+
+   public MetaType getMetaType()
+   {
+      return getField(Fields.META_TYPE, MetaType.class);
+   }
+   
+   /**
+    * Set the meta type
+    * 
+    * @param type the meta type
+    */
+   public void setMetaType(MetaType type)
+   {
+      setField(Fields.META_TYPE, type);
+   }
+
+   public MetaValue getValue()
+   {
+      return getField(Fields.VALUE, MetaValue.class);
+   }
+
+   public void setValue(MetaValue value)
+   {
+      // Check for a change 
+      MetaValue oldValue = getValue();
+      if(oldValue != value)
+      {
+         boolean isModified = true;
+         if(value != null)
+            isModified = ! value.equals(oldValue);
+         setModified(isModified);
+      }
+      setField(Fields.VALUE, value);
+   }
+
+   public ViewUse[] getViewUse()
+   {
+      ViewUse[] use = {};
+      ViewUse[] useField = getField(Fields.VIEW_USE, ViewUse[].class);
+      // Also look to the ManagementProperty annotation
+      Map<String, Annotation> annotations = getAnnotations();
+      if(annotations != null)
+      {
+         ManagementProperty mp = (ManagementProperty) annotations.get(ManagementProperty.class.getName());
+         if(mp != null)
+         {
+            use = mp.use();
+            if(useField != null && useField.length > 0)
+            {
+               HashSet<ViewUse> uses = new HashSet<ViewUse>();
+               for(ViewUse vu : use)
+               {
+                  uses.add(vu);
+               }
+               for(ViewUse vu : useField)
+               {
+                  uses.add(vu);
+               }
+               use = new ViewUse[uses.size()];
+               uses.toArray(use);
+            }
+         }
+      }
+      else if(useField != null)
+      {
+         use = useField;
+      }
+      return use;
+   }
+   public void setViewUse(ViewUse[] use)
+   {
+      setField(Fields.VIEW_USE, use);
+   }
+
+   public Collection<String> getAdminViewUses()
+   {
+      Collection<String> adminViews = getField(Fields.ADMIN_VIEWS, Collection.class);
+      // Also look to the ManagementProperty annotation
+      Map<String, Annotation> annotations = getAnnotations();
+      if(annotations != null)
+      {
+         ManagementProperty mp = (ManagementProperty) annotations.get(ManagementProperty.class.getName());
+         if(mp != null)
+         {
+            HashSet<String> views = new HashSet<String>();
+            if(adminViews != null)
+            {
+               views.addAll(adminViews);
+            }
+            String[] mpViews = mp.adminViews();
+            for(String view : mpViews)
+               views.add(view);
+            adminViews = views;
+         }
+      }
+      if(adminViews == null)
+         adminViews = Collections.emptySet();
+      return adminViews; 
+   }
+   public void setAdminViewUses(Collection<String> viewUses)
+   {
+      setField(Fields.ADMIN_VIEWS, (Serializable) viewUses);
+   }
+
+   public ActivationPolicy getActivationPolicy()
+   {
+      ActivationPolicy activationPolicy = getField(Fields.ACTIVATION_POLICY, ActivationPolicy.class);
+      return activationPolicy;
+   }
+   public void setActivationPolicy(ActivationPolicy policy)
+   {
+      setField(Fields.ACTIVATION_POLICY, policy);
+   }
+
+   @SuppressWarnings("unchecked")
+   public Set<MetaValue> getLegalValues()
+   {
+      return getField(Fields.LEGAL_VALUES, Set.class);
+   }
+   
+   /**
+    * Set the legal values
+    * 
+    * @param values the values
+    */
+   public void setLegalValues(Set<MetaValue> values)
+   {
+      setField(Fields.LEGAL_VALUES, (Serializable)values);
+   }
+
+   public MetaValue getDefaultValue()
+   {
+      MetaValue field = getField(Fields.DEFAULT_VALUE, MetaValue.class);
+      return field;
+   }
+
+   public Comparable<MetaValue> getMinimumValue()
+   {
+      return getField(Fields.MINIMUM_VALUE, Comparable.class);
+   }
+   
+   /**
+    * Set the minimum value
+    * 
+    * @param value the value
+    */
+   public void setMinimumValue(Comparable<MetaValue> value)
+   {
+      setField(Fields.MINIMUM_VALUE, (Serializable)value);
+   }
+
+   public Comparable<MetaValue> getMaximumValue()
+   {
+      Comparable<MetaValue> field = getField(Fields.MAXIMUM_VALUE, Comparable.class);
+      return field;
+   }
+
+   /**
+    * Set the maximum value
+    * 
+    * @param value the value
+    */
+   public void setMaximumValue(Comparable<MetaValue> value)
+   {
+      setField(Fields.MAXIMUM_VALUE, (Serializable)value);
+   }
+
+   public String checkValidValue(MetaValue value)
+   {
+      Comparable<MetaValue> min = getMinimumValue();
+      if(min != null)
+      {
+         if(min.compareTo(value) > 0)
+            return "min("+min+") > "+value;
+      }
+      Comparable<MetaValue> max = getMaximumValue();
+      if(max != null)
+      {
+         if(max.compareTo(value) < 0)
+            return "max("+max+") < "+value;
+      }
+      Set<MetaValue> legalValues = getLegalValues();
+      if(legalValues != null && legalValues.size() > 0)
+      {
+         if(legalValues.contains(value) == false)
+            return legalValues+" does not contain: "+value;
+      }
+      return null;
+   }
+   
+   public boolean isMandatory()
+   {
+      Boolean result = getField(Fields.MANDATORY, Boolean.class);
+      if (result == null)
+         return false;
+      return result;
+   }
+
+   public boolean isReadOnly()
+   {
+      Boolean result = getField(Fields.READ_ONLY, Boolean.class);
+      if (result == null)
+         return false;
+      return result;
+   }
+   public void setReadOnly(boolean flag)
+   {
+      if (flag)
+         setField(Fields.READ_ONLY, flag);
+      else
+         setField(Fields.READ_ONLY, null);
+   }
+
+   public boolean isModified()
+   {
+      Boolean result = getField(Fields.MODIFIED, Boolean.class);
+      if (result == null)
+         return false;
+      return result;
+   }
+   public void setModified(boolean flag)
+   {
+      if (flag)
+         setField(Fields.MODIFIED, flag);
+      else
+         setField(Fields.MODIFIED, null);
+   }
+
+   /**
+    * Set whether the field is mandatory
+    * 
+    * @param flag true for mandatory
+    */
+   public void setMandatory(boolean flag)
+   {
+      if (flag)
+         setField(Fields.MANDATORY, flag);
+      else
+         setField(Fields.MANDATORY, null);
+   }
+
+   public boolean isRemoved()
+   {
+      Boolean result = getField(Fields.REMOVED, Boolean.class);
+      if (result == null)
+         return false;
+      return result;
+   }
+   
+   /**
+    * Set whether the property is removed
+    * 
+    * @param flag true for removed
+    */
+   public void setRemoved(boolean flag)
+   {
+      if (flag)
+         setField(Fields.REMOVED, flag);
+      else
+         setField(Fields.REMOVED, null);
+   }
+
+   public <T> T getTransientAttachment(Class<T> expectedType)
+   {
+      T tvalue = null;
+      Object value = getTransientAttachment(expectedType.getName());
+      if(value != null)
+         tvalue = expectedType.cast(value);
+      return tvalue;
+   }
+
+   public Object getTransientAttachment(String name)
+   {
+      Object value = null;
+      if(transientAttachments != null)
+         value = transientAttachments.get(name);
+      return value;
+   }
+
+   public synchronized void setTransientAttachment(String name, Object attachment)
+   {
+      if(transientAttachments == null)
+         transientAttachments = new HashMap<String, Object>();
+      transientAttachments.put(name, attachment);
+   }
+
+   @Override
+   public String toString()
+   {
+      StringBuilder tmp = new StringBuilder("ManagedProperty");
+      tmp.append('{');
+      tmp.append(name);
+      if( getMappedName() != null )
+      {
+         tmp.append(',');
+         tmp.append(getMappedName());
+      }
+      tmp.append(",metaType=");
+      tmp.append(this.getMetaType());
+      tmp.append('}');
+      return tmp.toString(); 
+   }
+
+   @Override
+   public int hashCode()
+   {
+      return name.hashCode(); 
+   }
+
+   @Override
+   public boolean equals(Object obj)
+   {
+      if (obj == this)
+         return true;
+      if (obj == null || obj instanceof ManagedProperty == false)
+         return false;
+      
+      ManagedProperty other = (ManagedProperty) obj;
+      return getName().equals(other.getName());
+   }
+   
+   public ManagedProperty copy()
+   {
+      Fields fieldsCopy = fields.copy();
+      ManagedProperty mp = new ManagedPropertyImpl(fieldsCopy);
+      return mp;
+   }
+
+   /**
+    * Initialise a ManagedPropertyImpl.
+    * 
+    * @param managedObject the managed object, may be null
+    * @param fields the fields
+    * @throws IllegalArgumentException for null fields or
+    *    missing Fields.NAME
+    */
+   private void init(ManagedObject managedObject, Fields fields)
+   {
+      if (fields == null)
+         throw new IllegalArgumentException("Null fields");
+      
+      this.managedObject = managedObject;
+      this.fields = fields;
+      
+      name = getField(Fields.NAME, String.class);
+      if (name == null)
+         throw new IllegalArgumentException("No " + Fields.NAME + " in fields");
+   }
+
+   /**
+    * Read from a stream
+    * 
+    * @param in the stream
+    * @throws IOException for IO problem
+    * @throws ClassNotFoundException for a classloading problem
+    */
+   private void readObject(ObjectInputStream in)
+      throws IOException, ClassNotFoundException
+   {
+      int version = in.readInt();
+      if( version == VERSION1 )
+         readVersion1(in);
+      else
+         throw new InvalidObjectException("Unknown version="+version);
+   }
+   /**
+    * Write out the property fields
+    * @param out
+    * @throws IOException
+    */
+   private void writeObject(ObjectOutputStream out)
+      throws IOException
+   {
+      out.writeInt(STREAM_VERSION);
+      out.writeObject(fields);
+      out.writeObject(managedObject);
+      out.writeObject(targetManagedObject);
+   }
+
+   /**
+    * The VERSION1 expected format: 
+    * - Fields fields
+    * - ManagedObject managedObject
+    */
+   private void readVersion1(ObjectInputStream in)
+      throws IOException, ClassNotFoundException
+   {
+      fields = (Fields) in.readObject();
+      name = getField(Fields.NAME, String.class);
+      if (name == null)
+         throw new IOException("No " + Fields.NAME + " in fields");
+      managedObject = (ManagedObject) in.readObject();      
+      targetManagedObject = (ManagedObject) in.readObject();      
+   }
+}

Copied: projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/support/adminview (from rev 89193, projects/jboss-man/branches/Branch_2_1/managed/src/test/java/org/jboss/test/managed/factory/support/adminview)

Deleted: projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/support/deployment/JmsDestination.java
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/src/test/java/org/jboss/test/managed/factory/support/deployment/JmsDestination.java	2009-05-20 14:23:56 UTC (rev 89190)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/support/deployment/JmsDestination.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -1,102 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.managed.factory.support.deployment;
-
-import java.io.Serializable;
-
-import javax.management.ObjectName;
-
-import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.annotation.ManagementProperty;
-import org.jboss.managed.api.annotation.RunStateProperty;
-import org.jboss.managed.api.annotation.ViewUse;
-import org.jboss.managed.plugins.factory.StringRunStateMapper;
-import org.jboss.metatype.api.annotations.MetaMapping;
-import org.jboss.metatype.plugins.values.mappers.StringObjectNameMetaMapper;
-
-/**
- * @author Scott.Stark at jboss.org
- * @version $Revision:$
- */
- at ManagementObject
-public class JmsDestination
-   implements Serializable
-{
-   private static final long serialVersionUID = 1;
-   private String jndiName;
-   private SecDomainMD domain;
-   private String state;
-   private ObjectName expiryQueue;
-
-   
-   @ManagementProperty(description="The expiry queue",
-         use={ViewUse.RUNTIME}, includeInTemplate=true)
-   @MetaMapping(StringObjectNameMetaMapper.class)
-   protected ObjectName getExpiryQueue()
-   {
-      return expiryQueue;
-   }
-   protected void setExpiryQueue(ObjectName expiryQueue)
-   {
-      this.expiryQueue = expiryQueue;
-   }
-
-   @ManagementProperty(description="The destination state",
-         use={ViewUse.STATISTIC}, includeInTemplate=false)
-   @RunStateProperty(value=StringRunStateMapper.class,
-         metaValues={"State0", "State1", "ErrorState"},
-         enumValues={"RUNNING", "STOPPED", "FAILED"}
-   )
-   public String getState()
-   {
-      return state;
-   }
-   public void setState(String state)
-   {
-      this.state = state;
-   }
-
-   @ManagementProperty(description="JNDI binding location of destination", includeInTemplate=true)
-   public String getJndiName()
-   {
-      return jndiName;
-   }
-   public void setJndiName(String jndiName)
-   {
-      this.jndiName = jndiName;
-   }
-
-   @ManagementProperty(use={ViewUse.STATISTIC}, includeInTemplate=false)
-   public int getMsgCount()
-   {
-      return 0;
-   }
-   @ManagementProperty(description="Security domain information", managed=true)
-   public SecDomainMD getDomain()
-   {
-      return domain;
-   }
-   public void setDomain(SecDomainMD domain)
-   {
-      this.domain = domain;
-   }
-}

Copied: projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/support/deployment/JmsDestination.java (from rev 89197, projects/jboss-man/branches/Branch_2_1/managed/src/test/java/org/jboss/test/managed/factory/support/deployment/JmsDestination.java)
===================================================================
--- projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/support/deployment/JmsDestination.java	                        (rev 0)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/support/deployment/JmsDestination.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -0,0 +1,115 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.managed.factory.support.deployment;
+
+import java.io.Serializable;
+
+import javax.management.ObjectName;
+
+import org.jboss.managed.api.ManagedOperation.Impact;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementOperation;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.managed.api.annotation.RunStateProperty;
+import org.jboss.managed.api.annotation.ViewUse;
+import org.jboss.managed.plugins.factory.StringRunStateMapper;
+import org.jboss.metatype.api.annotations.MetaMapping;
+import org.jboss.metatype.plugins.values.mappers.StringObjectNameMetaMapper;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+ at ManagementObject
+public class JmsDestination
+   implements Serializable
+{
+   private static final long serialVersionUID = 1;
+   private String jndiName;
+   private SecDomainMD domain;
+   private String state;
+   private ObjectName expiryQueue;
+
+   
+   @ManagementProperty(description="The expiry queue",
+         use={ViewUse.RUNTIME}, includeInTemplate=true)
+   @MetaMapping(StringObjectNameMetaMapper.class)
+   protected ObjectName getExpiryQueue()
+   {
+      return expiryQueue;
+   }
+   protected void setExpiryQueue(ObjectName expiryQueue)
+   {
+      this.expiryQueue = expiryQueue;
+   }
+
+   @ManagementProperty(description="The destination state",
+         use={ViewUse.STATISTIC}, includeInTemplate=false)
+   @RunStateProperty(value=StringRunStateMapper.class,
+         metaValues={"State0", "State1", "ErrorState"},
+         enumValues={"RUNNING", "STOPPED", "FAILED"}
+   )
+   public String getState()
+   {
+      return state;
+   }
+   public void setState(String state)
+   {
+      this.state = state;
+   }
+
+   @ManagementProperty(description="JNDI binding location of destination", includeInTemplate=true)
+   public String getJndiName()
+   {
+      return jndiName;
+   }
+   public void setJndiName(String jndiName)
+   {
+      this.jndiName = jndiName;
+   }
+
+   @ManagementProperty(use={ViewUse.STATISTIC}, includeInTemplate=false)
+   public int getMsgCount()
+   {
+      return 0;
+   }
+   @ManagementProperty(description="Security domain information", managed=true)
+   public SecDomainMD getDomain()
+   {
+      return domain;
+   }
+   public void setDomain(SecDomainMD domain)
+   {
+      this.domain = domain;
+   }
+
+   @ManagementOperation(description="start the destination", impact=Impact.Lifecycle)
+   public void start()
+   {
+      
+   }
+   @ManagementOperation(description="stop the destination", impact=Impact.Lifecycle)
+   public void stop()
+   {
+      
+   }
+}

Deleted: projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/support/deployment/QueueDestination.java
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/src/test/java/org/jboss/test/managed/factory/support/deployment/QueueDestination.java	2009-05-20 14:23:56 UTC (rev 89190)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/support/deployment/QueueDestination.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.managed.factory.support.deployment;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.management.ObjectName;
-
-import org.jboss.managed.api.annotation.ManagementComponent;
-import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.annotation.ManagementOperation;
-import org.jboss.metatype.api.annotations.MetaMapping;
-import org.jboss.metatype.plugins.values.mappers.StringObjectNameMetaMapper;
-
-/**
- * @author Scott.Stark at jboss.org
- * @version $Revision:$
- */
- at ManagementObject(componentType=@ManagementComponent(type="JMSDestination", subtype="Queue"))
-public class QueueDestination extends JmsDestination
-   implements Serializable
-{
-   private static final long serialVersionUID = 1;
-
-   @ManagementOperation(description="List all undelivered msgs")
-   @MetaMapping(MessageListMapper.class)
-   public List listAllMessages()
-   {
-      ArrayList<JBMessage> msgs = new ArrayList<JBMessage>();
-      msgs.add(new JBMessage());
-      return msgs;
-   }
-
-   @ManagementOperation(description="List all undelivered msgs")
-   @MetaMapping(MessageListMapper.class)
-   public List listAllMessages(@MetaMapping(StringObjectNameMetaMapper.class) ObjectName x)
-   {
-      ArrayList<JBMessage> msgs = new ArrayList<JBMessage>();
-      msgs.add(new JBMessage());
-      return msgs;
-   }
-}

Copied: projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/support/deployment/QueueDestination.java (from rev 89197, projects/jboss-man/branches/Branch_2_1/managed/src/test/java/org/jboss/test/managed/factory/support/deployment/QueueDestination.java)
===================================================================
--- projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/support/deployment/QueueDestination.java	                        (rev 0)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/support/deployment/QueueDestination.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.managed.factory.support.deployment;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.management.ObjectName;
+
+import org.jboss.managed.api.ManagedOperation.Impact;
+import org.jboss.managed.api.annotation.ManagementComponent;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementOperation;
+import org.jboss.metatype.api.annotations.MetaMapping;
+import org.jboss.metatype.plugins.values.mappers.StringObjectNameMetaMapper;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+ at ManagementObject(componentType=@ManagementComponent(type="JMSDestination", subtype="Queue"))
+public class QueueDestination extends JmsDestination
+   implements Serializable
+{
+   private static final long serialVersionUID = 1;
+
+   @ManagementOperation(description="List all undelivered msgs", impact=Impact.ReadOnly)
+   @MetaMapping(MessageListMapper.class)
+   public List listAllMessages()
+   {
+      ArrayList<JBMessage> msgs = new ArrayList<JBMessage>();
+      msgs.add(new JBMessage());
+      return msgs;
+   }
+
+   @ManagementOperation(description="List all undelivered msgs", impact=Impact.ReadOnly)
+   @MetaMapping(MessageListMapper.class)
+   public List listAllMessages(@MetaMapping(StringObjectNameMetaMapper.class) ObjectName x)
+   {
+      ArrayList<JBMessage> msgs = new ArrayList<JBMessage>();
+      msgs.add(new JBMessage());
+      return msgs;
+   }
+}

Deleted: projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/AbstractManagedObjectFactoryUnitTestCase.java
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/src/test/java/org/jboss/test/managed/factory/test/AbstractManagedObjectFactoryUnitTestCase.java	2009-05-20 14:23:56 UTC (rev 89190)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/AbstractManagedObjectFactoryUnitTestCase.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -1,583 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.managed.factory.test;
-
-import java.lang.annotation.Annotation;
-import java.math.BigDecimal;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.jboss.annotation.factory.AnnotationCreator;
-import org.jboss.managed.api.ManagedObject;
-import org.jboss.managed.api.ManagedOperation;
-import org.jboss.managed.api.ManagedParameter;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.managed.api.annotation.ManagementComponent;
-import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.factory.ManagedObjectFactory;
-import org.jboss.managed.plugins.ManagedOperationMatcher;
-import org.jboss.managed.plugins.factory.AbstractInstanceClassFactory;
-import org.jboss.managed.plugins.factory.AbstractManagedObjectFactory;
-import org.jboss.managed.plugins.factory.DefaultInstanceClassFactory;
-import org.jboss.managed.spi.factory.InstanceClassFactory;
-import org.jboss.metadata.plugins.loader.memory.MemoryMetaDataLoader;
-import org.jboss.metadata.spi.MetaData;
-import org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge;
-import org.jboss.metatype.api.types.CollectionMetaType;
-import org.jboss.metatype.api.types.MapCompositeMetaType;
-import org.jboss.metatype.api.types.MetaType;
-import org.jboss.metatype.api.types.SimpleMetaType;
-import org.jboss.metatype.api.values.CollectionValue;
-import org.jboss.metatype.api.values.CompositeValue;
-import org.jboss.metatype.api.values.GenericValue;
-import org.jboss.metatype.api.values.MetaValue;
-import org.jboss.metatype.api.values.SimpleValue;
-import org.jboss.metatype.api.values.SimpleValueSupport;
-import org.jboss.metatype.plugins.values.mappers.StringObjectNameMetaMapper;
-import org.jboss.metatype.spi.values.MetaMapper;
-import org.jboss.test.managed.factory.AbstractManagedObjectFactoryTest;
-import org.jboss.test.managed.factory.support.ManagementObjectChangedName;
-import org.jboss.test.managed.factory.support.ManagementPropertySimpleManaged;
-import org.jboss.test.managed.factory.support.Simple;
-import org.jboss.test.managed.factory.support.SimpleUnannotated;
-import org.jboss.test.managed.factory.support.amof.CustomName;
-import org.jboss.test.managed.factory.support.amof.ManagementObjectWithRuntimeRef;
-import org.jboss.test.managed.factory.support.amof.ManagementObjectWithRuntimeRefICF;
-import org.jboss.test.managed.factory.support.amof.TestICF;
-import org.jboss.test.managed.factory.support.amof.TestMOP;
-import org.jboss.test.managed.factory.support.amof.TestSimpleICF;
-import org.jboss.test.managed.factory.support.beans.ABeanMetaData;
-import org.jboss.test.managed.factory.support.beans.AKernelDeployment;
-import org.jboss.test.managed.factory.support.beans.APropertyMetaData;
-import org.jboss.test.managed.factory.support.beans.BeanMetaDataICF;
-import org.jboss.test.managed.factory.support.beans.IBeanMetaData;
-import org.jboss.test.managed.factory.support.beans.IBeanMetaDataFactory;
-import org.jboss.test.managed.factory.support.deployment.JmsDestination;
-import org.jboss.test.managed.factory.support.deployment.JmsDestinationICF;
-import org.jboss.test.managed.factory.support.deployment.JmsDestinations;
-import org.jboss.test.managed.factory.support.deployment.MessageListMapper;
-import org.jboss.test.managed.factory.support.deployment.QueueDestination;
-import org.jboss.test.managed.factory.support.deployment.SecurityDomain;
-import org.jboss.test.managed.factory.support.mcf.ConnectionFactoryProperty;
-import org.jboss.test.managed.factory.support.mcf.DBMSMetaData;
-import org.jboss.test.managed.factory.support.mcf.DataSourceConnectionPropertyMetaData;
-import org.jboss.test.managed.factory.support.mcf.LocalDSInstanceClassFactory;
-import org.jboss.test.managed.factory.support.mcf.LocalDataSourceDeploymentMetaData;
-import org.jboss.test.managed.factory.support.mcf.ManagedConnectionFactoryDeploymentGroup;
-import org.jboss.test.managed.factory.support.mcf.ManagedConnectionFactoryDeploymentMetaData;
-import org.jboss.test.managed.factory.support.mcf.ManagedConnectionFactoryPropertyMetaData;
-import org.jboss.test.managed.factory.support.mcf.NoTxConnectionFactoryDeploymentMetaData;
-import org.jboss.test.managed.factory.support.mcf.NoTxICF;
-import org.jboss.test.managed.factory.support.mcf.SecurityMetaData;
-
-/**
- * Test of behavior of the AbstractManagedObjectFactory
- * 
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class AbstractManagedObjectFactoryUnitTestCase extends AbstractManagedObjectFactoryTest
-{
-   private ManagedObjectFactory testMOF;
-
-   public static Test suite()
-   {
-      return new TestSuite(AbstractManagedObjectFactoryUnitTestCase.class);
-   }
-
-   public AbstractManagedObjectFactoryUnitTestCase(String name)
-   {
-      super(name);
-   }
-
-   /**
-    * Test overriding the AbstractManagedObjectFactory.defaultInstanceFactory 
-    */
-   public void testDefaultInstanceFactory()
-   {
-      AbstractManagedObjectFactory mof = new AbstractManagedObjectFactory();
-      mof.setDefaultInstanceFactory(new TestICF());
-      TestSimpleICF icf = new TestSimpleICF();
-      mof.setInstanceClassFactory(Simple.class, icf);
-      testMOF = mof;
-
-      BigDecimal bigDecimal = new BigDecimal(10);
-      Simple simple = new Simple();
-      simple.setBigDecimalValue(bigDecimal);
-
-      ManagedObject managedObject = initManagedObject(simple);
-      checkManagedObjectDefaults(Simple.class, managedObject);
-      checkDefaultManagedProperties(managedObject, Simple.class);
-
-      checkPropertyDefaults(managedObject, "bigDecimalValue", BigDecimal.class, bigDecimal);
-      assertTrue("TestBigDecimalICF.isGetValueCalled", icf.isGetValueCalled());
-
-      //
-      managedObject = super.createManagedObject(ManagementPropertySimpleManaged.class);
-      checkManagedObjectDefaults(ManagementPropertySimpleManaged.class, managedObject);
-      checkDefaultManagedProperties(managedObject, ManagementPropertySimpleManaged.class);
-   }
-
-   /**
-    * Test that the setDefaultManagedObjectPopulator overrides the MOF
-    * default ManagedObjectPopulator
-    */
-   public void testDefaultManagedObjectPopulator()
-   {
-      AbstractManagedObjectFactory mof = new AbstractManagedObjectFactory();
-      TestMOP mop = new TestMOP(mof.getConfiguration(), new TestSimpleICF(), mof.getInstanceFactories());
-      mof.setDefaultManagedObjectPopulator(mop);
-      testMOF = mof;
-
-      BigDecimal bigDecimal = new BigDecimal(10);
-      Simple simple = new Simple();
-      simple.setBigDecimalValue(bigDecimal);
-
-      ManagedObject managedObject = initManagedObject(simple);
-      checkManagedObjectDefaults(Simple.class, managedObject);
-      checkDefaultManagedProperties(managedObject, Simple.class);
-      checkPropertyDefaults(managedObject, "bigDecimalValue", BigDecimal.class, bigDecimal);
-      assertTrue("isPopulateManagedObjectCalled", mop.isPopulateManagedObjectCalled());
-      //
-      managedObject = createManagedObject(ManagementPropertySimpleManaged.class);
-      checkManagedObjectDefaults(ManagementPropertySimpleManaged.class, managedObject);
-      checkDefaultManagedProperties(managedObject, ManagementPropertySimpleManaged.class);
-      assertTrue("isCreateObjectCalled", mop.isCreateObjectCalled());
- 
-   }
-
-   public void testInstanceClassFactoryAddition()
-   {
-      AbstractManagedObjectFactory mof = new AbstractManagedObjectFactory();
-      testMOF = mof;
-
-      BeanMetaDataICF bicf = new BeanMetaDataICF();
-      mof.addInstanceClassFactory(bicf);
-      LocalDSInstanceClassFactory dsicf = new LocalDSInstanceClassFactory();
-      mof.addInstanceClassFactory(dsicf);
-      NoTxICF nticf = new NoTxICF();
-      mof.addInstanceClassFactory(nticf);
-
-      InstanceClassFactory icf = mof.getInstanceClassFactory(IBeanMetaData.class);
-      assertEquals("IBeanMetaData ICF", bicf, icf);
-      icf = mof.getInstanceClassFactory(LocalDataSourceDeploymentMetaData.class);
-      assertEquals("LocalDataSourceDeploymentMetaData ICF", dsicf, icf);
-      icf = mof.getInstanceClassFactory(NoTxConnectionFactoryDeploymentMetaData.class);
-      assertEquals("NoTxConnectionFactoryDeploymentMetaData ICF", nticf, icf);
-   }
-
-   /**
-    * Test that the MetaData repository annotations override/augment the class
-    * annotations.
-    */
-   public void testMetaDataRepositoryOverride()
-      throws Exception
-   {
-      MemoryMetaDataLoader memory = new MemoryMetaDataLoader();
-      String annotationExpr = "@org.jboss.managed.api.annotation.ManagementObject(name=\"testMetaDataRepositoryOverride\",componentType=@org.jboss.managed.api.annotation.ManagementComponent(type=\"MCBean\", subtype=\"MetaDataTest\"))";
-      ManagementObject override = (ManagementObject) AnnotationCreator.createAnnotation(annotationExpr, ManagementObject.class);
-      memory.addAnnotation(override);
-      MetaData metaData = new MetaDataRetrievalToMetaDataBridge(memory);
-
-      BigDecimal bigDecimal = new BigDecimal(10);
-      SimpleUnannotated simple = new SimpleUnannotated();
-      simple.setBigDecimalValue(bigDecimal);
-
-      ManagedObjectFactory mof = getMOF();
-      ManagedObject managedObject = mof.initManagedObject(simple, metaData);
-      assertEquals("testMetaDataRepositoryOverride", managedObject.getName());
-      Map<String, Annotation> moAnnotations = managedObject.getAnnotations();
-      assertEquals("MO annotations == 2;", 2, moAnnotations.size());
-      ManagementObject moAnn = (ManagementObject) moAnnotations.get(ManagementObject.class.getName());
-      ManagementComponent componentType = moAnn.componentType();
-      assertEquals("componentType.type", "MCBean", componentType.type());
-      assertEquals("componentType.subtype", "MetaDataTest", componentType.subtype());
-      checkPropertyDefaults(managedObject, "bigDecimalValue", BigDecimal.class, bigDecimal);
-      checkDefaultManagedProperties(managedObject, SimpleUnannotated.class);
-   }
-
-   @SuppressWarnings("unchecked")
-   public void testGenericValueUpdate()
-   {
-      super.enableTrace("org.jboss.managed");
-      AbstractManagedObjectFactory mof = new AbstractManagedObjectFactory();
-      mof.setInstanceClassFactory(JmsDestination.class, new JmsDestinationICF(mof));
-      testMOF = mof;
-
-      JmsDestinations destinations = new JmsDestinations();
-      List<JmsDestination> queues = new ArrayList<JmsDestination>();
-      QueueDestination q1 = new QueueDestination();
-      q1.setJndiName("queues/Q1");
-      q1.setDomain(new SecurityDomain("java:/jaas/JMS"));
-      queues.add(q1);
-      destinations.setDestinations(queues);
-
-      ManagedObject managedObject = initManagedObject(destinations);
-      checkManagedObjectDefaults(JmsDestinations.class, managedObject);
-
-      ManagedProperty destinationsMP = managedObject.getProperty("destinations");
-      assertNotNull(destinationsMP);
-      CollectionValue destinationsValue = (CollectionValue) destinationsMP.getValue();
-      assertNotNull(destinationsValue);
-      assertEquals(1, destinationsValue.getSize());
-      GenericValue q1GV = (GenericValue) destinationsValue.getElements()[0];
-      assertNotNull(q1GV);
-
-      ManagedObject q1MO = (ManagedObject) q1GV.getValue();
-      assertNotNull(q1MO);
-      ManagedProperty domain = q1MO.getProperty("domain");
-      getLog().info(domain);
-      GenericValue domainGV = (GenericValue) domain.getValue();
-      assertNotNull(domainGV);
-      ManagedObject domainMO = (ManagedObject) domainGV.getValue();
-      assertNotNull(domainMO);
-
-      ManagedProperty domainName = domainMO.getProperty("domain");
-      assertEquals(SimpleValueSupport.wrap("java:/jaas/JMS"), domainName.getValue());
-
-      ManagedObject domainUpdateMO = initManagedObject(new SecurityDomain("java:/jaas/JMS2"));
-      DefaultInstanceClassFactory icf = new DefaultInstanceClassFactory(mof);
-      GenericValue domainUpdateGV = icf.getManagedObjectValue(domain, domainUpdateMO);
-      assertNotNull(domainUpdateGV.getValue());
-      domain.setValue(domainUpdateGV);
-      // Validate this has been written through
-      assertEquals("java:/jaas/JMS2", q1.getDomain().getDomain());
-   }
-   
-   public void testManagedObjectReturnType()
-   {
-      QueueDestination q1 = new QueueDestination();
-      q1.setJndiName("queues/Q1");
-      q1.setDomain(new SecurityDomain("java:/jaas/JMS"));
-
-      ManagedObject q1MO = initManagedObject(q1);
-      Set<ManagedOperation> ops = q1MO.getOperations();
-      ManagedOperation listAllMessages = ManagedOperationMatcher.findOperation(ops, "listAllMessages");
-      assertNotNull(listAllMessages);
-      MetaType returnType = listAllMessages.getReturnType();
-      assertEquals(MessageListMapper.TYPE, returnType);
-      MetaMapper returnTypeMapper = listAllMessages.getTransientAttachment(MetaMapper.class);
-      assertNotNull(returnTypeMapper);
-      assertTrue(returnTypeMapper instanceof MessageListMapper);
-   }
-
-   public void testManagedObjectParamsType()
-   {
-      QueueDestination q1 = new QueueDestination();
-      q1.setJndiName("queues/Q1");
-      q1.setDomain(new SecurityDomain("java:/jaas/JMS"));
-
-      ManagedObject q1MO = initManagedObject(q1);
-      Set<ManagedOperation> ops = q1MO.getOperations();
-      ManagedOperation listAllMessages = ManagedOperationMatcher.findOperation(ops, "listAllMessages", SimpleMetaType.STRING);
-      assertNotNull(listAllMessages);
-      MetaType returnType = listAllMessages.getReturnType();
-      assertEquals(MessageListMapper.TYPE, returnType);
-      ManagedParameter[] params = listAllMessages.getParameters();
-      assertEquals(1, params.length);
-      assertEquals(SimpleMetaType.STRING, params[0].getMetaType());
-      MetaMapper mapper = params[0].getTransientAttachment(MetaMapper.class);
-      assertNotNull(mapper);
-      assertTrue(mapper instanceof StringObjectNameMetaMapper);
-   }
-
-   /**
-    * Test the transformer value of the ManagementRuntimeRef annotation when
-    * there is a custom ICF
-    */
-   public void testTransformer()
-   {
-      AbstractManagedObjectFactory mof = new AbstractManagedObjectFactory();
-      mof.setInstanceClassFactory(ManagementObjectWithRuntimeRef.class, new ManagementObjectWithRuntimeRefICF());
-      testMOF = mof;
-
-      ManagementObjectWithRuntimeRef mowref = new ManagementObjectWithRuntimeRef();
-      mowref.setRefName(new CustomName("jboss:test=testTransformer"));
-      ManagedObject managedObject = initManagedObject(mowref);
-      createManagedObject(ManagementObjectChangedName.class);
-      assertEquals("jboss:test=testTransformer", managedObject.getComponentName());
-   }
-
-   /**
-    * Test the 
-    * @throws Exception
-    */
-   public void testMCFHierarchy()
-      throws Exception
-   {
-      ManagedConnectionFactoryDeploymentGroup mcf = initMCFDG();
-      ManagedObjectFactory mof = getMOF();
-      ManagedObject mcfMO = mof.initManagedObject(mcf, "ManagedConnectionFactoryDeploymentGroup", null);
-      ManagedProperty deployments = mcfMO.getProperty("deployments");
-      Object dvalue = deployments.getValue();
-      assertTrue(dvalue.getClass()+"", dvalue instanceof CollectionValue);
-      CollectionValue cv = (CollectionValue) dvalue;
-      assertEquals(1, cv.getSize());
-      Object cv0 = cv.iterator().next();
-      assertTrue(cv0 instanceof GenericValue);
-      GenericValue gv0 = (GenericValue) cv0;
-      assertTrue(gv0.getValue() instanceof ManagedObject);
-      ManagedObject mo = (ManagedObject) gv0.getValue();
-      assertEquals(LocalDataSourceDeploymentMetaData.class.getName(), mo.getAttachmentName());
-      assertEquals(mcfMO, mo.getParent());
-
-      // Validate the security-domain
-      ManagedProperty secDomain = mo.getProperty("security-domain");
-      assertNotNull("security-domain", secDomain);
-      GenericValue sdGV = (GenericValue) secDomain.getValue();
-      assertNotNull("security-domain.GV", sdGV);
-      ManagedObject secDomainMO = (ManagedObject) sdGV.getValue();
-
-      assertNotNull("security-domain.MO", secDomainMO);
-      assertEquals(mo, secDomainMO.getParent());
-      ManagedProperty domainName = secDomainMO.getProperty("domain");
-      assertNotNull("security-domain.MO.domain", domainName);
-      assertEquals(SimpleValueSupport.wrap("java:/jaas/SomeDomain"), domainName.getValue());
-   }
-
-   /**
-    * Test the custom ConnectionFactoryProperty used for the config-property of
-    * ManagedConnectionFactoryDeploymentMetaData
-    * @throws Exception
-    */
-   public void testManagedConnectionFactoryPropertyMetaData()
-      throws Exception
-   {
-      ManagedConnectionFactoryDeploymentGroup mcf = initMCFDG();
-      ManagedObjectFactory mof = getMOF();
-      LocalDSInstanceClassFactory dsicf = new LocalDSInstanceClassFactory();
-      mof.addInstanceClassFactory(dsicf);
-      ManagedObject mcfMO = mof.initManagedObject(mcf, "ManagedConnectionFactoryDeploymentGroup", null);
-      ManagedProperty deployments = mcfMO.getProperty("deployments");
-      Object dvalue = deployments.getValue();
-      assertTrue(dvalue.getClass()+"", dvalue instanceof CollectionValue);
-      CollectionValue cv = (CollectionValue) dvalue;
-      assertEquals(1, cv.getSize());
-      Object cv0 = cv.iterator().next();
-      assertTrue(cv0 instanceof GenericValue);
-      GenericValue gv0 = (GenericValue) cv0;
-      assertTrue(gv0.getValue() instanceof ManagedObject);
-      ManagedObject mo = (ManagedObject) gv0.getValue();
-      assertEquals(LocalDataSourceDeploymentMetaData.class.getName(), mo.getAttachmentName());
-
-      ManagedProperty cpMP = mo.getProperty("config-property");
-      assertNotNull("config-property", cpMP);
-      assertTrue("config-property("+cpMP+") isa ConnectionFactoryProperty", cpMP instanceof ConnectionFactoryProperty);
-      MetaType type = cpMP.getMetaType();
-      assertTrue("config-property type("+type+") is MapCompositeMetaType", type instanceof MapCompositeMetaType);
-      MetaValue value = cpMP.getValue();
-      assertTrue("config-property("+value+") MapCompositeMetaType.isValue", value instanceof CompositeValue);
-      CompositeValue cvalue = (CompositeValue) value;
-      SimpleValue connectionPropertiesValue = (SimpleValue) cvalue.get("value");
-      assertEquals("cp1-name=cp1-value\ncp2-name=cp2-value", connectionPropertiesValue.getValue().toString().trim());
-      assertEquals(SimpleValueSupport.wrap("java.lang.String"), cvalue.get("type"));
-   }
-
-   public void testKernelDeployment()
-   {
-      AbstractManagedObjectFactory mof = new AbstractManagedObjectFactory();
-      BeanMetaDataICF icf = new BeanMetaDataICF();
-      icf.setDelegateICF(new DefaultInstanceClassFactory(mof));
-      mof.setInstanceClassFactory(IBeanMetaData.class, icf);
-      testMOF = mof;
-
-      AKernelDeployment ad = new AKernelDeployment();
-      ABeanMetaData bean1 = new ABeanMetaData();
-      bean1.setBean(Simple.class.getName());
-      bean1.setName("SimpleBean#1");
-      ABeanMetaData bean2 = new ABeanMetaData();
-      bean2.setBean(Simple.class.getName());
-      bean2.setName("SimpleBean#2");
-      ABeanMetaData bean3 = new ABeanMetaData();
-      bean3.setBean(SimpleUnannotated.class.getName());
-      bean3.setName("SimpleUnannotated#3");
-      APropertyMetaData bean3P1 = new APropertyMetaData();
-      bean3P1.setName("properties");
-      bean3P1.setDescription("The bean properties");
-      bean3P1.setPropertyType("java.util.Set<IPropertyMetaData>");
-      bean3.addProperty(bean3P1);
-
-      Simple simple1 = new Simple();
-      simple1.setBigDecimalValue(new BigDecimal(123456));
-      Simple simple2 = new Simple();
-      simple2.setBigDecimalValue(new BigDecimal(222222));
-      SimpleUnannotated simple3 = new SimpleUnannotated();
-      simple3.setBigDecimalValue(new BigDecimal(333333));
-      // Setup the bean name mappings
-      BeanMetaDataICF.setBean("SimpleBean#1", simple1);
-      BeanMetaDataICF.setBean("SimpleBean#2", simple2);
-      BeanMetaDataICF.setBean("SimpleUnannotated#3", simple3);
-      List<IBeanMetaDataFactory> beanFactories = new ArrayList<IBeanMetaDataFactory>();
-      beanFactories.add(bean1);
-      beanFactories.add(bean2);
-      beanFactories.add(bean3);
-      ad.setBeanFactories(beanFactories);
-
-      ManagedObject mo = mof.initManagedObject(ad, "KernelDeployment", null);
-      ManagedProperty beanFactoriesMP = mo.getProperty("beanFactories");
-      assertNotNull("beanFactories MP", beanFactoriesMP);
-      Object beanFactoriesMPValue = beanFactoriesMP.getValue();
-      getLog().debug("beanFactories MP value: "+beanFactoriesMPValue);
-      assertTrue(beanFactoriesMPValue instanceof CollectionValue);
-      // The beanFactories 
-      CollectionValue cv = CollectionValue.class.cast(beanFactoriesMPValue);
-      MetaValue[] cvs = cv.getElements();
-
-      
-      assertEquals(3, cv.getSize());
-      // ABeanMetaData ManagedObject for SimpleBean#1
-      MetaValue mv0 = cvs[0];
-      assertTrue(mv0 instanceof GenericValue);
-      GenericValue gv0 = GenericValue.class.cast(mv0);
-      Object gv0Value = gv0.getValue();
-      assertTrue(gv0Value instanceof ManagedObject);
-      ManagedObject mo0 = ManagedObject.class.cast(gv0Value);
-      assertEquals(bean1, mo0.getAttachment());
-      ManagedProperty bigDecimalValueMP = mo0.getProperty("bigDecimalValue");
-      assertNotNull(bigDecimalValueMP);
-      assertEquals(SimpleValueSupport.wrap(new BigDecimal(123456)), bigDecimalValueMP.getValue());
-      bigDecimalValueMP.setValue(SimpleValueSupport.wrap(new BigDecimal(987654)));
-      assertEquals(new BigDecimal(987654), simple1.getBigDecimalValue());
-
-      // ABeanMetaData ManagedObject for SimpleBean#2
-      MetaValue mv1 = cvs[1];
-      assertTrue(mv1 instanceof GenericValue);
-      GenericValue gv1 = GenericValue.class.cast(mv1);
-      Object gv1Value = gv1.getValue();
-      assertTrue(gv1Value instanceof ManagedObject);
-      ManagedObject mo1 = ManagedObject.class.cast(gv1Value);
-      ManagedProperty bigDecimalValueMP1 = mo1.getProperty("bigDecimalValue");
-      assertNotNull(bigDecimalValueMP1);
-      assertEquals(SimpleValueSupport.wrap(new BigDecimal(222222)), bigDecimalValueMP1.getValue());
-      bigDecimalValueMP1.setValue(SimpleValueSupport.wrap(new BigDecimal(12222221)));
-      assertEquals(new BigDecimal(12222221), simple2.getBigDecimalValue());
-      
-      // ABeanMetaData ManagedObject for SimpleUnannotated#3
-      MetaValue mv2 = cvs[2];
-      assertTrue(mv2 instanceof GenericValue);
-      GenericValue gv2 = GenericValue.class.cast(mv2);
-      Object gv2Value = gv2.getValue();
-      assertTrue(gv2Value instanceof ManagedObject);
-      ManagedObject mo2 = ManagedObject.class.cast(gv2Value);
-      ManagedProperty properties = mo2.getProperty("properties");
-      assertNotNull(properties);
-      assertTrue(properties.getMetaType().isCollection());
-      CollectionMetaType amt = (CollectionMetaType) properties.getMetaType();
-      MetaType etype = amt.getElementType();
-      if (etype == AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE)
-      {
-         CollectionValue avalue = (CollectionValue) properties.getValue();
-         assertNotNull(avalue);
-         MetaValue[] elements = avalue.getElements();
-         for(int n = 0; n < avalue.getSize(); n ++)
-         {
-            GenericValue gv = (GenericValue) elements[n];
-            ManagedObject propMO = (ManagedObject) gv.getValue();
-            //...
-         }
-      }
-
-      
-   }
-
-   /**
-    * Override to allow test specific ManagedObjectFactory
-    */
-   @Override
-   protected ManagedObjectFactory getMOF()
-   {
-      ManagedObjectFactory mof = testMOF;
-      if (mof == null)
-         mof = super.getMOF();
-      return mof;
-   }
-
-   protected ManagedConnectionFactoryDeploymentGroup initMCFDG()
-      throws Exception
-   {
-      ManagedConnectionFactoryDeploymentGroup mcfs = new ManagedConnectionFactoryDeploymentGroup();
-      LocalDataSourceDeploymentMetaData lds = new LocalDataSourceDeploymentMetaData();
-      lds.setBackgroundValidation(true);
-      lds.setBackgroundValidationMillis(5000);
-      lds.setBlockingTimeoutMilliSeconds(5000);
-      lds.setCheckValidConnectionSQL("select something from somewhere");
-      lds.setConnectionDefinition("conn def");
-      lds.setConnectionUrl("jdbc:xyz:a=b");
-      DataSourceConnectionPropertyMetaData cp1 = new DataSourceConnectionPropertyMetaData();
-      cp1.setName("cp1-name");
-      cp1.setValue("cp1-value");
-      DataSourceConnectionPropertyMetaData cp2 = new DataSourceConnectionPropertyMetaData();
-      cp2.setName("cp2-name");
-      cp2.setValue("cp2-value");
-      DataSourceConnectionPropertyMetaData[] cps = {
-        cp1, cp2    
-      };
-      lds.setDataSourceConnectionProperties(Arrays.asList(cps));
-      List<ManagedConnectionFactoryPropertyMetaData> mcps = new ArrayList<ManagedConnectionFactoryPropertyMetaData>();
-      ManagedConnectionFactoryPropertyMetaData mcp1 = new ManagedConnectionFactoryPropertyMetaData();
-      mcp1.setName("mcp1-name");
-      mcp1.setValue("mcp1-value");
-      mcp1.setType("java.lang.String");
-      mcps.add(mcp1);
-      ManagedConnectionFactoryPropertyMetaData mcp2 = new ManagedConnectionFactoryPropertyMetaData();
-      mcp2.setName("mcp2-name");
-      mcp2.setValue("mcp2-value");
-      mcp2.setType("java.lang.String");
-      mcps.add(mcp2);
-      lds.setManagedConnectionFactoryProperties(mcps);
-      lds.setDriverClass("org.jboss.jdbc.SomeDriver");
-      lds.setExceptionSorterClassName("org.jboss.jdbc.SomeExceptionSorter");
-      String[] depends = {"jboss:service=Naming", "jboss:service=Hypersonic,database=localDB"};
-      lds.setDependsNames(Arrays.asList(depends));
-      lds.setIdleTimeoutMinutes(15);
-      lds.setInterleaving(false);
-      lds.setMaxSize(100);
-      lds.setMinSize(1);
-      DBMSMetaData md = new DBMSMetaData();
-      md.setTypeMapping("Hypersonic SQL");
-      lds.setDBMSMetaData(md);
-      lds.setNewConnectionSQL("run this on a new conn");
-      lds.setPassWord("password");
-      lds.setPrefill(true);
-      lds.setPreparedStatementCacheSize(50);
-      lds.setQueryTimeout(30000);
-      lds.setUserName("user");
-      // Set a SecurityMetaData to validate its MO
-      SecurityMetaData smd = new SecurityMetaData();
-      smd.setDomain("java:/jaas/SomeDomain");
-      lds.setSecurityMetaData(smd);
-
-      ManagedConnectionFactoryDeploymentMetaData[] mds = {lds};
-      mcfs.setDeployments(Arrays.asList(mds));
-      mcfs.setUrl(new URL("file:/deploy/some-ds.xml"));
-      return mcfs;
-   }
-
-}

Copied: projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/AbstractManagedObjectFactoryUnitTestCase.java (from rev 89197, projects/jboss-man/branches/Branch_2_1/managed/src/test/java/org/jboss/test/managed/factory/test/AbstractManagedObjectFactoryUnitTestCase.java)
===================================================================
--- projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/AbstractManagedObjectFactoryUnitTestCase.java	                        (rev 0)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/AbstractManagedObjectFactoryUnitTestCase.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -0,0 +1,603 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.managed.factory.test;
+
+import java.lang.annotation.Annotation;
+import java.math.BigDecimal;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.jboss.annotation.factory.AnnotationCreator;
+import org.jboss.managed.api.ManagedObject;
+import org.jboss.managed.api.ManagedOperation;
+import org.jboss.managed.api.ManagedParameter;
+import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.api.ManagedOperation.Impact;
+import org.jboss.managed.api.annotation.ManagementComponent;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.factory.ManagedObjectFactory;
+import org.jboss.managed.plugins.ManagedOperationMatcher;
+import org.jboss.managed.plugins.factory.AbstractInstanceClassFactory;
+import org.jboss.managed.plugins.factory.AbstractManagedObjectFactory;
+import org.jboss.managed.plugins.factory.DefaultInstanceClassFactory;
+import org.jboss.managed.spi.factory.InstanceClassFactory;
+import org.jboss.metadata.plugins.loader.memory.MemoryMetaDataLoader;
+import org.jboss.metadata.spi.MetaData;
+import org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge;
+import org.jboss.metatype.api.types.CollectionMetaType;
+import org.jboss.metatype.api.types.MapCompositeMetaType;
+import org.jboss.metatype.api.types.MetaType;
+import org.jboss.metatype.api.types.SimpleMetaType;
+import org.jboss.metatype.api.values.CollectionValue;
+import org.jboss.metatype.api.values.CompositeValue;
+import org.jboss.metatype.api.values.GenericValue;
+import org.jboss.metatype.api.values.MetaValue;
+import org.jboss.metatype.api.values.SimpleValue;
+import org.jboss.metatype.api.values.SimpleValueSupport;
+import org.jboss.metatype.plugins.values.mappers.StringObjectNameMetaMapper;
+import org.jboss.metatype.spi.values.MetaMapper;
+import org.jboss.test.managed.factory.AbstractManagedObjectFactoryTest;
+import org.jboss.test.managed.factory.support.ManagementObjectChangedName;
+import org.jboss.test.managed.factory.support.ManagementPropertySimpleManaged;
+import org.jboss.test.managed.factory.support.Simple;
+import org.jboss.test.managed.factory.support.SimpleUnannotated;
+import org.jboss.test.managed.factory.support.amof.CustomName;
+import org.jboss.test.managed.factory.support.amof.ManagementObjectWithRuntimeRef;
+import org.jboss.test.managed.factory.support.amof.ManagementObjectWithRuntimeRefICF;
+import org.jboss.test.managed.factory.support.amof.TestICF;
+import org.jboss.test.managed.factory.support.amof.TestMOP;
+import org.jboss.test.managed.factory.support.amof.TestSimpleICF;
+import org.jboss.test.managed.factory.support.beans.ABeanMetaData;
+import org.jboss.test.managed.factory.support.beans.AKernelDeployment;
+import org.jboss.test.managed.factory.support.beans.APropertyMetaData;
+import org.jboss.test.managed.factory.support.beans.BeanMetaDataICF;
+import org.jboss.test.managed.factory.support.beans.IBeanMetaData;
+import org.jboss.test.managed.factory.support.beans.IBeanMetaDataFactory;
+import org.jboss.test.managed.factory.support.deployment.JmsDestination;
+import org.jboss.test.managed.factory.support.deployment.JmsDestinationICF;
+import org.jboss.test.managed.factory.support.deployment.JmsDestinations;
+import org.jboss.test.managed.factory.support.deployment.MessageListMapper;
+import org.jboss.test.managed.factory.support.deployment.QueueDestination;
+import org.jboss.test.managed.factory.support.deployment.SecurityDomain;
+import org.jboss.test.managed.factory.support.mcf.ConnectionFactoryProperty;
+import org.jboss.test.managed.factory.support.mcf.DBMSMetaData;
+import org.jboss.test.managed.factory.support.mcf.DataSourceConnectionPropertyMetaData;
+import org.jboss.test.managed.factory.support.mcf.LocalDSInstanceClassFactory;
+import org.jboss.test.managed.factory.support.mcf.LocalDataSourceDeploymentMetaData;
+import org.jboss.test.managed.factory.support.mcf.ManagedConnectionFactoryDeploymentGroup;
+import org.jboss.test.managed.factory.support.mcf.ManagedConnectionFactoryDeploymentMetaData;
+import org.jboss.test.managed.factory.support.mcf.ManagedConnectionFactoryPropertyMetaData;
+import org.jboss.test.managed.factory.support.mcf.NoTxConnectionFactoryDeploymentMetaData;
+import org.jboss.test.managed.factory.support.mcf.NoTxICF;
+import org.jboss.test.managed.factory.support.mcf.SecurityMetaData;
+
+/**
+ * Test of behavior of the AbstractManagedObjectFactory
+ * 
+ * @author Scott.Stark at jboss.org
+ * @version $Revision$
+ */
+public class AbstractManagedObjectFactoryUnitTestCase extends AbstractManagedObjectFactoryTest
+{
+   private ManagedObjectFactory testMOF;
+
+   public static Test suite()
+   {
+      return new TestSuite(AbstractManagedObjectFactoryUnitTestCase.class);
+   }
+
+   public AbstractManagedObjectFactoryUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   /**
+    * Test overriding the AbstractManagedObjectFactory.defaultInstanceFactory 
+    */
+   public void testDefaultInstanceFactory()
+   {
+      AbstractManagedObjectFactory mof = new AbstractManagedObjectFactory();
+      mof.setDefaultInstanceFactory(new TestICF());
+      TestSimpleICF icf = new TestSimpleICF();
+      mof.setInstanceClassFactory(Simple.class, icf);
+      testMOF = mof;
+
+      BigDecimal bigDecimal = new BigDecimal(10);
+      Simple simple = new Simple();
+      simple.setBigDecimalValue(bigDecimal);
+
+      ManagedObject managedObject = initManagedObject(simple);
+      checkManagedObjectDefaults(Simple.class, managedObject);
+      checkDefaultManagedProperties(managedObject, Simple.class);
+
+      checkPropertyDefaults(managedObject, "bigDecimalValue", BigDecimal.class, bigDecimal);
+      assertTrue("TestBigDecimalICF.isGetValueCalled", icf.isGetValueCalled());
+
+      //
+      managedObject = super.createManagedObject(ManagementPropertySimpleManaged.class);
+      checkManagedObjectDefaults(ManagementPropertySimpleManaged.class, managedObject);
+      checkDefaultManagedProperties(managedObject, ManagementPropertySimpleManaged.class);
+   }
+
+   /**
+    * Test that the setDefaultManagedObjectPopulator overrides the MOF
+    * default ManagedObjectPopulator
+    */
+   public void testDefaultManagedObjectPopulator()
+   {
+      AbstractManagedObjectFactory mof = new AbstractManagedObjectFactory();
+      TestMOP mop = new TestMOP(mof.getConfiguration(), new TestSimpleICF(), mof.getInstanceFactories());
+      mof.setDefaultManagedObjectPopulator(mop);
+      testMOF = mof;
+
+      BigDecimal bigDecimal = new BigDecimal(10);
+      Simple simple = new Simple();
+      simple.setBigDecimalValue(bigDecimal);
+
+      ManagedObject managedObject = initManagedObject(simple);
+      checkManagedObjectDefaults(Simple.class, managedObject);
+      checkDefaultManagedProperties(managedObject, Simple.class);
+      checkPropertyDefaults(managedObject, "bigDecimalValue", BigDecimal.class, bigDecimal);
+      assertTrue("isPopulateManagedObjectCalled", mop.isPopulateManagedObjectCalled());
+      //
+      managedObject = createManagedObject(ManagementPropertySimpleManaged.class);
+      checkManagedObjectDefaults(ManagementPropertySimpleManaged.class, managedObject);
+      checkDefaultManagedProperties(managedObject, ManagementPropertySimpleManaged.class);
+      assertTrue("isCreateObjectCalled", mop.isCreateObjectCalled());
+ 
+   }
+
+   public void testInstanceClassFactoryAddition()
+   {
+      AbstractManagedObjectFactory mof = new AbstractManagedObjectFactory();
+      testMOF = mof;
+
+      BeanMetaDataICF bicf = new BeanMetaDataICF();
+      mof.addInstanceClassFactory(bicf);
+      LocalDSInstanceClassFactory dsicf = new LocalDSInstanceClassFactory();
+      mof.addInstanceClassFactory(dsicf);
+      NoTxICF nticf = new NoTxICF();
+      mof.addInstanceClassFactory(nticf);
+
+      InstanceClassFactory icf = mof.getInstanceClassFactory(IBeanMetaData.class);
+      assertEquals("IBeanMetaData ICF", bicf, icf);
+      icf = mof.getInstanceClassFactory(LocalDataSourceDeploymentMetaData.class);
+      assertEquals("LocalDataSourceDeploymentMetaData ICF", dsicf, icf);
+      icf = mof.getInstanceClassFactory(NoTxConnectionFactoryDeploymentMetaData.class);
+      assertEquals("NoTxConnectionFactoryDeploymentMetaData ICF", nticf, icf);
+   }
+
+   /**
+    * Test that the MetaData repository annotations override/augment the class
+    * annotations.
+    */
+   public void testMetaDataRepositoryOverride()
+      throws Exception
+   {
+      MemoryMetaDataLoader memory = new MemoryMetaDataLoader();
+      String annotationExpr = "@org.jboss.managed.api.annotation.ManagementObject(name=\"testMetaDataRepositoryOverride\",componentType=@org.jboss.managed.api.annotation.ManagementComponent(type=\"MCBean\", subtype=\"MetaDataTest\"))";
+      ManagementObject override = (ManagementObject) AnnotationCreator.createAnnotation(annotationExpr, ManagementObject.class);
+      memory.addAnnotation(override);
+      MetaData metaData = new MetaDataRetrievalToMetaDataBridge(memory);
+
+      BigDecimal bigDecimal = new BigDecimal(10);
+      SimpleUnannotated simple = new SimpleUnannotated();
+      simple.setBigDecimalValue(bigDecimal);
+
+      ManagedObjectFactory mof = getMOF();
+      ManagedObject managedObject = mof.initManagedObject(simple, metaData);
+      assertEquals("testMetaDataRepositoryOverride", managedObject.getName());
+      Map<String, Annotation> moAnnotations = managedObject.getAnnotations();
+      assertEquals("MO annotations == 2;", 2, moAnnotations.size());
+      ManagementObject moAnn = (ManagementObject) moAnnotations.get(ManagementObject.class.getName());
+      ManagementComponent componentType = moAnn.componentType();
+      assertEquals("componentType.type", "MCBean", componentType.type());
+      assertEquals("componentType.subtype", "MetaDataTest", componentType.subtype());
+      checkPropertyDefaults(managedObject, "bigDecimalValue", BigDecimal.class, bigDecimal);
+      checkDefaultManagedProperties(managedObject, SimpleUnannotated.class);
+   }
+
+   @SuppressWarnings("unchecked")
+   public void testGenericValueUpdate()
+   {
+      super.enableTrace("org.jboss.managed");
+      AbstractManagedObjectFactory mof = new AbstractManagedObjectFactory();
+      mof.setInstanceClassFactory(JmsDestination.class, new JmsDestinationICF(mof));
+      testMOF = mof;
+
+      JmsDestinations destinations = new JmsDestinations();
+      List<JmsDestination> queues = new ArrayList<JmsDestination>();
+      QueueDestination q1 = new QueueDestination();
+      q1.setJndiName("queues/Q1");
+      q1.setDomain(new SecurityDomain("java:/jaas/JMS"));
+      queues.add(q1);
+      destinations.setDestinations(queues);
+
+      ManagedObject managedObject = initManagedObject(destinations);
+      checkManagedObjectDefaults(JmsDestinations.class, managedObject);
+
+      ManagedProperty destinationsMP = managedObject.getProperty("destinations");
+      assertNotNull(destinationsMP);
+      CollectionValue destinationsValue = (CollectionValue) destinationsMP.getValue();
+      assertNotNull(destinationsValue);
+      assertEquals(1, destinationsValue.getSize());
+      GenericValue q1GV = (GenericValue) destinationsValue.getElements()[0];
+      assertNotNull(q1GV);
+
+      ManagedObject q1MO = (ManagedObject) q1GV.getValue();
+      assertNotNull(q1MO);
+      ManagedProperty domain = q1MO.getProperty("domain");
+      getLog().info(domain);
+      GenericValue domainGV = (GenericValue) domain.getValue();
+      assertNotNull(domainGV);
+      ManagedObject domainMO = (ManagedObject) domainGV.getValue();
+      assertNotNull(domainMO);
+
+      ManagedProperty domainName = domainMO.getProperty("domain");
+      assertEquals(SimpleValueSupport.wrap("java:/jaas/JMS"), domainName.getValue());
+
+      ManagedObject domainUpdateMO = initManagedObject(new SecurityDomain("java:/jaas/JMS2"));
+      DefaultInstanceClassFactory icf = new DefaultInstanceClassFactory(mof);
+      GenericValue domainUpdateGV = icf.getManagedObjectValue(domain, domainUpdateMO);
+      assertNotNull(domainUpdateGV.getValue());
+      domain.setValue(domainUpdateGV);
+      // Validate this has been written through
+      assertEquals("java:/jaas/JMS2", q1.getDomain().getDomain());
+   }
+   
+   public void testManagedOperationReturnType()
+   {
+      QueueDestination q1 = new QueueDestination();
+      q1.setJndiName("queues/Q1");
+      q1.setDomain(new SecurityDomain("java:/jaas/JMS"));
+
+      ManagedObject q1MO = initManagedObject(q1);
+      Set<ManagedOperation> ops = q1MO.getOperations();
+      ManagedOperation listAllMessages = ManagedOperationMatcher.findOperation(ops, "listAllMessages");
+      assertNotNull(listAllMessages);
+      MetaType returnType = listAllMessages.getReturnType();
+      assertEquals(MessageListMapper.TYPE, returnType);
+      MetaMapper returnTypeMapper = listAllMessages.getTransientAttachment(MetaMapper.class);
+      assertNotNull(returnTypeMapper);
+      assertTrue(returnTypeMapper instanceof MessageListMapper);
+   }
+
+   public void testManagedOperationParamsType()
+   {
+      QueueDestination q1 = new QueueDestination();
+      q1.setJndiName("queues/Q1");
+      q1.setDomain(new SecurityDomain("java:/jaas/JMS"));
+
+      ManagedObject q1MO = initManagedObject(q1);
+      Set<ManagedOperation> ops = q1MO.getOperations();
+      ManagedOperation listAllMessages = ManagedOperationMatcher.findOperation(ops, "listAllMessages", SimpleMetaType.STRING);
+      assertNotNull(listAllMessages);
+      MetaType returnType = listAllMessages.getReturnType();
+      assertEquals(MessageListMapper.TYPE, returnType);
+      ManagedParameter[] params = listAllMessages.getParameters();
+      assertEquals(1, params.length);
+      assertEquals(SimpleMetaType.STRING, params[0].getMetaType());
+      MetaMapper mapper = params[0].getTransientAttachment(MetaMapper.class);
+      assertNotNull(mapper);
+      assertTrue(mapper instanceof StringObjectNameMetaMapper);
+   }
+
+   public void testManagedOperationImpact()
+   {
+      QueueDestination q1 = new QueueDestination();
+      q1.setJndiName("queues/Q1");
+      q1.setDomain(new SecurityDomain("java:/jaas/JMS"));
+
+      ManagedObject q1MO = initManagedObject(q1);
+      Set<ManagedOperation> ops = q1MO.getOperations();
+      ManagedOperation listAllMessages = ManagedOperationMatcher.findOperation(ops, "listAllMessages", SimpleMetaType.STRING);
+      assertNotNull(listAllMessages);
+      Impact lamImpact = listAllMessages.getImpact();
+      assertEquals(Impact.ReadOnly, lamImpact);
+
+      ManagedOperation start = ManagedOperationMatcher.findOperation(ops, "start");
+      assertNotNull(start);
+      Impact startImpact = start.getImpact();
+      assertEquals(Impact.Lifecycle, startImpact);      
+   }
+
+   /**
+    * Test the transformer value of the ManagementRuntimeRef annotation when
+    * there is a custom ICF
+    */
+   public void testTransformer()
+   {
+      AbstractManagedObjectFactory mof = new AbstractManagedObjectFactory();
+      mof.setInstanceClassFactory(ManagementObjectWithRuntimeRef.class, new ManagementObjectWithRuntimeRefICF());
+      testMOF = mof;
+
+      ManagementObjectWithRuntimeRef mowref = new ManagementObjectWithRuntimeRef();
+      mowref.setRefName(new CustomName("jboss:test=testTransformer"));
+      ManagedObject managedObject = initManagedObject(mowref);
+      createManagedObject(ManagementObjectChangedName.class);
+      assertEquals("jboss:test=testTransformer", managedObject.getComponentName());
+   }
+
+   /**
+    * Test the 
+    * @throws Exception
+    */
+   public void testMCFHierarchy()
+      throws Exception
+   {
+      ManagedConnectionFactoryDeploymentGroup mcf = initMCFDG();
+      ManagedObjectFactory mof = getMOF();
+      ManagedObject mcfMO = mof.initManagedObject(mcf, "ManagedConnectionFactoryDeploymentGroup", null);
+      ManagedProperty deployments = mcfMO.getProperty("deployments");
+      Object dvalue = deployments.getValue();
+      assertTrue(dvalue.getClass()+"", dvalue instanceof CollectionValue);
+      CollectionValue cv = (CollectionValue) dvalue;
+      assertEquals(1, cv.getSize());
+      Object cv0 = cv.iterator().next();
+      assertTrue(cv0 instanceof GenericValue);
+      GenericValue gv0 = (GenericValue) cv0;
+      assertTrue(gv0.getValue() instanceof ManagedObject);
+      ManagedObject mo = (ManagedObject) gv0.getValue();
+      assertEquals(LocalDataSourceDeploymentMetaData.class.getName(), mo.getAttachmentName());
+      assertEquals(mcfMO, mo.getParent());
+
+      // Validate the security-domain
+      ManagedProperty secDomain = mo.getProperty("security-domain");
+      assertNotNull("security-domain", secDomain);
+      GenericValue sdGV = (GenericValue) secDomain.getValue();
+      assertNotNull("security-domain.GV", sdGV);
+      ManagedObject secDomainMO = (ManagedObject) sdGV.getValue();
+
+      assertNotNull("security-domain.MO", secDomainMO);
+      assertEquals(mo, secDomainMO.getParent());
+      ManagedProperty domainName = secDomainMO.getProperty("domain");
+      assertNotNull("security-domain.MO.domain", domainName);
+      assertEquals(SimpleValueSupport.wrap("java:/jaas/SomeDomain"), domainName.getValue());
+   }
+
+   /**
+    * Test the custom ConnectionFactoryProperty used for the config-property of
+    * ManagedConnectionFactoryDeploymentMetaData
+    * @throws Exception
+    */
+   public void testManagedConnectionFactoryPropertyMetaData()
+      throws Exception
+   {
+      ManagedConnectionFactoryDeploymentGroup mcf = initMCFDG();
+      ManagedObjectFactory mof = getMOF();
+      LocalDSInstanceClassFactory dsicf = new LocalDSInstanceClassFactory();
+      mof.addInstanceClassFactory(dsicf);
+      ManagedObject mcfMO = mof.initManagedObject(mcf, "ManagedConnectionFactoryDeploymentGroup", null);
+      ManagedProperty deployments = mcfMO.getProperty("deployments");
+      Object dvalue = deployments.getValue();
+      assertTrue(dvalue.getClass()+"", dvalue instanceof CollectionValue);
+      CollectionValue cv = (CollectionValue) dvalue;
+      assertEquals(1, cv.getSize());
+      Object cv0 = cv.iterator().next();
+      assertTrue(cv0 instanceof GenericValue);
+      GenericValue gv0 = (GenericValue) cv0;
+      assertTrue(gv0.getValue() instanceof ManagedObject);
+      ManagedObject mo = (ManagedObject) gv0.getValue();
+      assertEquals(LocalDataSourceDeploymentMetaData.class.getName(), mo.getAttachmentName());
+
+      ManagedProperty cpMP = mo.getProperty("config-property");
+      assertNotNull("config-property", cpMP);
+      assertTrue("config-property("+cpMP+") isa ConnectionFactoryProperty", cpMP instanceof ConnectionFactoryProperty);
+      MetaType type = cpMP.getMetaType();
+      assertTrue("config-property type("+type+") is MapCompositeMetaType", type instanceof MapCompositeMetaType);
+      MetaValue value = cpMP.getValue();
+      assertTrue("config-property("+value+") MapCompositeMetaType.isValue", value instanceof CompositeValue);
+      CompositeValue cvalue = (CompositeValue) value;
+      SimpleValue connectionPropertiesValue = (SimpleValue) cvalue.get("value");
+      assertEquals("cp1-name=cp1-value\ncp2-name=cp2-value", connectionPropertiesValue.getValue().toString().trim());
+      assertEquals(SimpleValueSupport.wrap("java.lang.String"), cvalue.get("type"));
+   }
+
+   public void testKernelDeployment()
+   {
+      AbstractManagedObjectFactory mof = new AbstractManagedObjectFactory();
+      BeanMetaDataICF icf = new BeanMetaDataICF();
+      icf.setDelegateICF(new DefaultInstanceClassFactory(mof));
+      mof.setInstanceClassFactory(IBeanMetaData.class, icf);
+      testMOF = mof;
+
+      AKernelDeployment ad = new AKernelDeployment();
+      ABeanMetaData bean1 = new ABeanMetaData();
+      bean1.setBean(Simple.class.getName());
+      bean1.setName("SimpleBean#1");
+      ABeanMetaData bean2 = new ABeanMetaData();
+      bean2.setBean(Simple.class.getName());
+      bean2.setName("SimpleBean#2");
+      ABeanMetaData bean3 = new ABeanMetaData();
+      bean3.setBean(SimpleUnannotated.class.getName());
+      bean3.setName("SimpleUnannotated#3");
+      APropertyMetaData bean3P1 = new APropertyMetaData();
+      bean3P1.setName("properties");
+      bean3P1.setDescription("The bean properties");
+      bean3P1.setPropertyType("java.util.Set<IPropertyMetaData>");
+      bean3.addProperty(bean3P1);
+
+      Simple simple1 = new Simple();
+      simple1.setBigDecimalValue(new BigDecimal(123456));
+      Simple simple2 = new Simple();
+      simple2.setBigDecimalValue(new BigDecimal(222222));
+      SimpleUnannotated simple3 = new SimpleUnannotated();
+      simple3.setBigDecimalValue(new BigDecimal(333333));
+      // Setup the bean name mappings
+      BeanMetaDataICF.setBean("SimpleBean#1", simple1);
+      BeanMetaDataICF.setBean("SimpleBean#2", simple2);
+      BeanMetaDataICF.setBean("SimpleUnannotated#3", simple3);
+      List<IBeanMetaDataFactory> beanFactories = new ArrayList<IBeanMetaDataFactory>();
+      beanFactories.add(bean1);
+      beanFactories.add(bean2);
+      beanFactories.add(bean3);
+      ad.setBeanFactories(beanFactories);
+
+      ManagedObject mo = mof.initManagedObject(ad, "KernelDeployment", null);
+      ManagedProperty beanFactoriesMP = mo.getProperty("beanFactories");
+      assertNotNull("beanFactories MP", beanFactoriesMP);
+      Object beanFactoriesMPValue = beanFactoriesMP.getValue();
+      getLog().debug("beanFactories MP value: "+beanFactoriesMPValue);
+      assertTrue(beanFactoriesMPValue instanceof CollectionValue);
+      // The beanFactories 
+      CollectionValue cv = CollectionValue.class.cast(beanFactoriesMPValue);
+      MetaValue[] cvs = cv.getElements();
+
+      
+      assertEquals(3, cv.getSize());
+      // ABeanMetaData ManagedObject for SimpleBean#1
+      MetaValue mv0 = cvs[0];
+      assertTrue(mv0 instanceof GenericValue);
+      GenericValue gv0 = GenericValue.class.cast(mv0);
+      Object gv0Value = gv0.getValue();
+      assertTrue(gv0Value instanceof ManagedObject);
+      ManagedObject mo0 = ManagedObject.class.cast(gv0Value);
+      assertEquals(bean1, mo0.getAttachment());
+      ManagedProperty bigDecimalValueMP = mo0.getProperty("bigDecimalValue");
+      assertNotNull(bigDecimalValueMP);
+      assertEquals(SimpleValueSupport.wrap(new BigDecimal(123456)), bigDecimalValueMP.getValue());
+      bigDecimalValueMP.setValue(SimpleValueSupport.wrap(new BigDecimal(987654)));
+      assertEquals(new BigDecimal(987654), simple1.getBigDecimalValue());
+
+      // ABeanMetaData ManagedObject for SimpleBean#2
+      MetaValue mv1 = cvs[1];
+      assertTrue(mv1 instanceof GenericValue);
+      GenericValue gv1 = GenericValue.class.cast(mv1);
+      Object gv1Value = gv1.getValue();
+      assertTrue(gv1Value instanceof ManagedObject);
+      ManagedObject mo1 = ManagedObject.class.cast(gv1Value);
+      ManagedProperty bigDecimalValueMP1 = mo1.getProperty("bigDecimalValue");
+      assertNotNull(bigDecimalValueMP1);
+      assertEquals(SimpleValueSupport.wrap(new BigDecimal(222222)), bigDecimalValueMP1.getValue());
+      bigDecimalValueMP1.setValue(SimpleValueSupport.wrap(new BigDecimal(12222221)));
+      assertEquals(new BigDecimal(12222221), simple2.getBigDecimalValue());
+      
+      // ABeanMetaData ManagedObject for SimpleUnannotated#3
+      MetaValue mv2 = cvs[2];
+      assertTrue(mv2 instanceof GenericValue);
+      GenericValue gv2 = GenericValue.class.cast(mv2);
+      Object gv2Value = gv2.getValue();
+      assertTrue(gv2Value instanceof ManagedObject);
+      ManagedObject mo2 = ManagedObject.class.cast(gv2Value);
+      ManagedProperty properties = mo2.getProperty("properties");
+      assertNotNull(properties);
+      assertTrue(properties.getMetaType().isCollection());
+      CollectionMetaType amt = (CollectionMetaType) properties.getMetaType();
+      MetaType etype = amt.getElementType();
+      if (etype == AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE)
+      {
+         CollectionValue avalue = (CollectionValue) properties.getValue();
+         assertNotNull(avalue);
+         MetaValue[] elements = avalue.getElements();
+         for(int n = 0; n < avalue.getSize(); n ++)
+         {
+            GenericValue gv = (GenericValue) elements[n];
+            ManagedObject propMO = (ManagedObject) gv.getValue();
+            //...
+         }
+      }
+
+      
+   }
+
+   /**
+    * Override to allow test specific ManagedObjectFactory
+    */
+   @Override
+   protected ManagedObjectFactory getMOF()
+   {
+      ManagedObjectFactory mof = testMOF;
+      if (mof == null)
+         mof = super.getMOF();
+      return mof;
+   }
+
+   protected ManagedConnectionFactoryDeploymentGroup initMCFDG()
+      throws Exception
+   {
+      ManagedConnectionFactoryDeploymentGroup mcfs = new ManagedConnectionFactoryDeploymentGroup();
+      LocalDataSourceDeploymentMetaData lds = new LocalDataSourceDeploymentMetaData();
+      lds.setBackgroundValidation(true);
+      lds.setBackgroundValidationMillis(5000);
+      lds.setBlockingTimeoutMilliSeconds(5000);
+      lds.setCheckValidConnectionSQL("select something from somewhere");
+      lds.setConnectionDefinition("conn def");
+      lds.setConnectionUrl("jdbc:xyz:a=b");
+      DataSourceConnectionPropertyMetaData cp1 = new DataSourceConnectionPropertyMetaData();
+      cp1.setName("cp1-name");
+      cp1.setValue("cp1-value");
+      DataSourceConnectionPropertyMetaData cp2 = new DataSourceConnectionPropertyMetaData();
+      cp2.setName("cp2-name");
+      cp2.setValue("cp2-value");
+      DataSourceConnectionPropertyMetaData[] cps = {
+        cp1, cp2    
+      };
+      lds.setDataSourceConnectionProperties(Arrays.asList(cps));
+      List<ManagedConnectionFactoryPropertyMetaData> mcps = new ArrayList<ManagedConnectionFactoryPropertyMetaData>();
+      ManagedConnectionFactoryPropertyMetaData mcp1 = new ManagedConnectionFactoryPropertyMetaData();
+      mcp1.setName("mcp1-name");
+      mcp1.setValue("mcp1-value");
+      mcp1.setType("java.lang.String");
+      mcps.add(mcp1);
+      ManagedConnectionFactoryPropertyMetaData mcp2 = new ManagedConnectionFactoryPropertyMetaData();
+      mcp2.setName("mcp2-name");
+      mcp2.setValue("mcp2-value");
+      mcp2.setType("java.lang.String");
+      mcps.add(mcp2);
+      lds.setManagedConnectionFactoryProperties(mcps);
+      lds.setDriverClass("org.jboss.jdbc.SomeDriver");
+      lds.setExceptionSorterClassName("org.jboss.jdbc.SomeExceptionSorter");
+      String[] depends = {"jboss:service=Naming", "jboss:service=Hypersonic,database=localDB"};
+      lds.setDependsNames(Arrays.asList(depends));
+      lds.setIdleTimeoutMinutes(15);
+      lds.setInterleaving(false);
+      lds.setMaxSize(100);
+      lds.setMinSize(1);
+      DBMSMetaData md = new DBMSMetaData();
+      md.setTypeMapping("Hypersonic SQL");
+      lds.setDBMSMetaData(md);
+      lds.setNewConnectionSQL("run this on a new conn");
+      lds.setPassWord("password");
+      lds.setPrefill(true);
+      lds.setPreparedStatementCacheSize(50);
+      lds.setQueryTimeout(30000);
+      lds.setUserName("user");
+      // Set a SecurityMetaData to validate its MO
+      SecurityMetaData smd = new SecurityMetaData();
+      smd.setDomain("java:/jaas/SomeDomain");
+      lds.setSecurityMetaData(smd);
+
+      ManagedConnectionFactoryDeploymentMetaData[] mds = {lds};
+      mcfs.setDeployments(Arrays.asList(mds));
+      mcfs.setUrl(new URL("file:/deploy/some-ds.xml"));
+      return mcfs;
+   }
+
+}

Deleted: projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/ManagementObjectUnitTestCase.java
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/src/test/java/org/jboss/test/managed/factory/test/ManagementObjectUnitTestCase.java	2009-05-20 14:23:56 UTC (rev 89190)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/ManagementObjectUnitTestCase.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -1,66 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2007, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.managed.factory.test;
-
-import junit.framework.Test;
-
-import org.jboss.managed.api.ManagedObject;
-import org.jboss.test.managed.factory.AbstractManagedObjectFactoryTest;
-import org.jboss.test.managed.factory.support.ManagementObjectChangedName;
-
-/**
- * ManagementObjectUnitTestCase.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class ManagementObjectUnitTestCase extends AbstractManagedObjectFactoryTest
-{
-   /**
-    * Create a testsuite for this test
-    * 
-    * @return the testsuite
-    */
-   public static Test suite()
-   {
-      return suite(ManagementObjectUnitTestCase.class);
-   }
-
-   /**
-    * Create a new ManagementObjectUnitTestCase.
-    * 
-    * @param name the test name
-    */
-   public ManagementObjectUnitTestCase(String name)
-   {
-      super(name);
-   }
-   
-   /**
-    * Test the changed name
-    */
-   public void testChangedName()
-   {
-      ManagedObject managedObject = createManagedObject(ManagementObjectChangedName.class);
-      checkManagedObject(ManagementObjectChangedName.class, managedObject, "changed", null);
-   }
-}
\ No newline at end of file

Copied: projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/ManagementObjectUnitTestCase.java (from rev 89195, projects/jboss-man/branches/Branch_2_1/managed/src/test/java/org/jboss/test/managed/factory/test/ManagementObjectUnitTestCase.java)
===================================================================
--- projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/ManagementObjectUnitTestCase.java	                        (rev 0)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/ManagementObjectUnitTestCase.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -0,0 +1,91 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2007, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.managed.factory.test;
+
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.Test;
+
+import org.jboss.managed.api.ManagedObject;
+import org.jboss.managed.api.ManagedOperation;
+import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.plugins.ManagedObjectImpl;
+import org.jboss.test.managed.factory.AbstractManagedObjectFactoryTest;
+import org.jboss.test.managed.factory.support.ManagementObjectChangedName;
+
+/**
+ * ManagementObjectUnitTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class ManagementObjectUnitTestCase extends AbstractManagedObjectFactoryTest
+{
+   /**
+    * Create a testsuite for this test
+    * 
+    * @return the testsuite
+    */
+   public static Test suite()
+   {
+      return suite(ManagementObjectUnitTestCase.class);
+   }
+
+   /**
+    * Create a new ManagementObjectUnitTestCase.
+    * 
+    * @param name the test name
+    */
+   public ManagementObjectUnitTestCase(String name)
+   {
+      super(name);
+   }
+   
+   /**
+    * Test the changed name
+    */
+   public void testChangedName()
+   {
+      ManagedObject managedObject = createManagedObject(ManagementObjectChangedName.class);
+      checkManagedObject(ManagementObjectChangedName.class, managedObject, "changed", null);
+   }
+
+   /**
+    * JBMAN-79
+    */
+   public void testDeprecatedCtor()
+   {
+      String name = "testDeprecatedCtor";
+      String nameType = null;
+      String attachmentName = "testDeprecatedCtor.attachment";
+      Set<ManagedProperty> props = null;
+      HashSet<ManagedOperation> ops = null;
+      Serializable attachment = null;
+      ManagedObjectImpl mo = new ManagedObjectImpl(name, nameType, attachmentName, props, ops, attachment);
+      
+      Set<ManagedOperation> ops2 = ops;
+      Object attachment2 = attachment;
+      ManagedObjectImpl mo2 = new ManagedObjectImpl(name, nameType, attachmentName, props, ops2, attachment2);
+   }
+}

Deleted: projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/ManagementPropertyUnitTestCase.java
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/src/test/java/org/jboss/test/managed/factory/test/ManagementPropertyUnitTestCase.java	2009-05-20 14:23:56 UTC (rev 89190)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/ManagementPropertyUnitTestCase.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -1,271 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2007, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.managed.factory.test;
-
-import java.lang.annotation.Annotation;
-import java.util.HashMap;
-import java.util.Map;
-
-import junit.framework.Test;
-
-import org.jboss.managed.api.ManagedObject;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.managed.api.annotation.ActivationPolicy;
-import org.jboss.managed.api.annotation.ManagementObjectID;
-import org.jboss.managed.api.annotation.ManagementProperty;
-import org.jboss.managed.api.annotation.Masked;
-import org.jboss.managed.api.annotation.ViewUse;
-import org.jboss.managed.plugins.ManagedPropertyImpl;
-import org.jboss.metatype.api.types.SimpleMetaType;
-import org.jboss.metatype.api.values.SimpleValueSupport;
-import org.jboss.test.managed.factory.AbstractManagedObjectFactoryTest;
-import org.jboss.test.managed.factory.support.ManagementPropertyActivationPolicy;
-import org.jboss.test.managed.factory.support.ManagementPropertyAnnotations;
-import org.jboss.test.managed.factory.support.ManagementPropertyDescription;
-import org.jboss.test.managed.factory.support.ManagementPropertyMandatory;
-import org.jboss.test.managed.factory.support.ManagementPropertyMasked;
-import org.jboss.test.managed.factory.support.ManagementPropertyReadOnly;
-import org.jboss.test.managed.factory.support.ManagementPropertySimpleManaged;
-
-/**
- * ManagementPropertyUnitTestCase.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class ManagementPropertyUnitTestCase extends AbstractManagedObjectFactoryTest
-{
-   /**
-    * Create a testsuite for this test
-    * 
-    * @return the testsuite
-    */
-   public static Test suite()
-   {
-      return suite(ManagementPropertyUnitTestCase.class);
-   }
-
-   /**
-    * Create a new ManagementPropertyUnitTestCase.
-    * 
-    * @param name the test name
-    */
-   public ManagementPropertyUnitTestCase(String name)
-   {
-      super(name);
-   }
-   
-   /**
-    * Test the overridden description
-    */
-   public void testDescription()
-   {
-      ManagedObject managedObject = createAndCheckDefaultManagedObject(ManagementPropertyDescription.class);
-      checkProperty(managedObject, "property", String.class, "changed", false, null);
-   }
-   
-   /**
-    * Test the overridden mandatory
-    */
-   public void testMandatory()
-   {
-      ManagedObject managedObject = createAndCheckDefaultManagedObject(ManagementPropertyMandatory.class);
-      checkProperty(managedObject, "property", String.class, "property", true, null);
-   }
-   
-   /**
-    * Test the overridden and accessor based read only
-    */
-   public void testReadOnly()
-   {
-      ManagedObject managedObject = createAndCheckDefaultManagedObject(ManagementPropertyReadOnly.class);
-      checkProperty(managedObject, "readOnly", String.class, "readOnly", false, "readOnly");
-      checkProperty(managedObject, "readOnly2", String.class, "readOnly2", false, "readOnly2");
-      checkProperty(managedObject, "readWrite", String.class, "readWrite", false, "readWrite");
-      checkProperty(managedObject, "readWrite2", String.class, "readWrite2", false, "readWrite2");
-      ManagedProperty readOnly = managedObject.getProperty("readOnly");
-      assertTrue(readOnly.isReadOnly());
-      ManagedProperty readOnly2 = managedObject.getProperty("readOnly");
-      assertTrue(readOnly2.isReadOnly());
-      ManagedProperty readWrite = managedObject.getProperty("readWrite");
-      assertFalse(readWrite.isReadOnly());
-      ManagedProperty readWrite2 = managedObject.getProperty("readWrite2");
-      assertFalse(readWrite2.isReadOnly());
-   }
-
-   /**
-    * Test the overidden property to managed object
-    */
-   public void testSimpleManaged()
-   {
-      ManagementPropertySimpleManaged test = new ManagementPropertySimpleManaged();
-      ManagedObject managedObject = checkManagedObject(test);
-      checkPropertyIsManagedObject(managedObject, "property", "property", false, test.getProperty());
-   }
-
-   /**
-    * Test property annotations
-    */
-   public void testAnnotations()
-   {
-      ManagedObject managedObject = createAndCheckDefaultManagedObject(ManagementPropertyAnnotations.class);
-      ManagedProperty managedProperty = managedObject.getProperty("runtime");
-      assertNotNull(managedProperty);
-      Map<String, Annotation> annotations = managedProperty.getAnnotations();
-      assertEquals(2, annotations.size());
-      assertTrue(annotations.containsKey(ManagementProperty.class.getName()));
-      assertTrue(annotations.containsKey(ManagementObjectID.class.getName()));
-   }
-
-   /**
-    * Test property ViewUse
-    */
-   public void testViewUse()
-   {
-      ManagedObject managedObject = createAndCheckDefaultManagedObject(ManagementPropertyAnnotations.class);
-      ManagedProperty runtime = managedObject.getProperty("runtime");
-      assertNotNull(runtime);
-      assertTrue("has ViewUse.RUNTIME", runtime.hasViewUse(ViewUse.RUNTIME));
-      assertTrue("!has ViewUse.CONFIGURATION", !runtime.hasViewUse(ViewUse.CONFIGURATION));
-      assertTrue("!has ViewUse.STATISTIC", !runtime.hasViewUse(ViewUse.STATISTIC));
-
-      ManagedProperty configuration = managedObject.getProperty("configuration");
-      assertTrue("has ViewUse.CONFIGURATION", configuration.hasViewUse(ViewUse.CONFIGURATION));
-
-      ManagedProperty stat = managedObject.getProperty("stat");
-      assertTrue("has ViewUse.STATISTIC", stat.hasViewUse(ViewUse.STATISTIC));
-   }
-
-   /**
-    * Test the 
-    */
-   @ManagementProperty(name="runtime-stat", use={ViewUse.STATISTIC})
-   public void testViewUseField()
-      throws Exception
-   {
-      ManagedPropertyImpl mp = new ManagedPropertyImpl("runtime");
-      mp.setMetaType(SimpleMetaType.LONG);
-      mp.setValue(SimpleValueSupport.wrap(1000));
-      mp.setViewUse(new ViewUse[]{ViewUse.RUNTIME});
-      assertTrue("has ViewUse.RUNTIME", mp.hasViewUse(ViewUse.RUNTIME));
-
-      ManagedPropertyImpl mp2 = new ManagedPropertyImpl("runtime-stat");
-      mp2.setMetaType(SimpleMetaType.LONG);
-      mp2.setValue(SimpleValueSupport.wrap(1000));
-      mp2.setViewUse(new ViewUse[]{ViewUse.RUNTIME, ViewUse.STATISTIC});
-      assertTrue("has ViewUse.RUNTIME", mp2.hasViewUse(ViewUse.RUNTIME));
-      assertTrue("has ViewUse.STATISTIC", mp2.hasViewUse(ViewUse.STATISTIC));
-
-      ManagedPropertyImpl mp3 = new ManagedPropertyImpl("runtime-stat");
-      mp3.setMetaType(SimpleMetaType.LONG);
-      mp3.setValue(SimpleValueSupport.wrap(1000));
-      mp3.setViewUse(new ViewUse[]{ViewUse.RUNTIME});
-      HashMap<String, Annotation> annotations = new HashMap<String, Annotation>();
-      ManagementProperty mpa = getClass().getMethod("testViewUseField", null).getAnnotation(ManagementProperty.class);
-      annotations.put(ManagementProperty.class.getName(), mpa);
-      mp3.setAnnotations(annotations);
-      assertTrue("has ViewUse.RUNTIME", mp3.hasViewUse(ViewUse.RUNTIME));
-      assertTrue("has ViewUse.STATISTIC", mp3.hasViewUse(ViewUse.STATISTIC));
-   }
-
-   /**
-    * Tests of the activationPolicy()
-    * @throws Exception
-    */
-   public void testActivationPolicy()
-      throws Exception
-   {
-      ManagedObject managedObject = createAndCheckDefaultManagedObject(ManagementPropertyActivationPolicy.class);
-      ManagedProperty defaultProp = managedObject.getProperty("defaultProp");
-      assertNotNull(defaultProp);
-      assertEquals(ActivationPolicy.IMMEDIATE, defaultProp.getActivationPolicy());
-      ManagedProperty compRestartProp = managedObject.getProperty("compRestartProp");
-      assertNotNull(compRestartProp);
-      assertEquals(ActivationPolicy.COMPONENT_RESTART, compRestartProp.getActivationPolicy());
-      ManagedProperty immediateProp = managedObject.getProperty("immediateProp");
-      assertNotNull(immediateProp);
-      assertEquals(ActivationPolicy.IMMEDIATE, immediateProp.getActivationPolicy());
-      ManagedProperty deployRestartProp = managedObject.getProperty("deployRestartProp");
-      assertNotNull(deployRestartProp);
-      assertEquals(ActivationPolicy.DEPLOYMENT_RESTART, deployRestartProp.getActivationPolicy());
-      ManagedProperty serverRestartProp = managedObject.getProperty("serverRestartProp");
-      assertNotNull(serverRestartProp);
-      assertEquals(ActivationPolicy.SERVER_RESTART, serverRestartProp.getActivationPolicy());
-   }
-
-   /**
-    * Tests of isModified()/setModified()
-    */
-   public void testIsModified()
-      throws Exception
-   {
-      ManagedObject managedObject = createAndCheckDefaultManagedObject(ManagementPropertyReadOnly.class);
-      ManagedProperty readOnly = managedObject.getProperty("readOnly");
-      assertNotNull(readOnly);
-      assertFalse(readOnly.isModified());
-      try
-      {
-         readOnly.setValue(SimpleValueSupport.wrap("readOnly-update"));
-      }
-      catch(Exception e)
-      {
-         e.printStackTrace();
-      }
-      assertFalse(readOnly.isModified());
-      // 
-      ManagedProperty readWrite = managedObject.getProperty("readWrite");
-      assertNotNull(readWrite);
-      assertFalse(readWrite.isModified());
-      readWrite.setValue(SimpleValueSupport.wrap("readWrite-update"));
-      assertTrue("isModified", readWrite.isModified());
-
-      // Validate that clearing/rewriting the same value does not set isModified
-      readWrite.setModified(false);
-      assertFalse(readWrite.isModified());
-      readWrite.setValue(SimpleValueSupport.wrap("readWrite-update"));
-      assertFalse(readWrite.isModified());
-   }
-   
-   public void testMasked()
-      throws Exception
-   {
-      ManagedObject managedObject = createAndCheckDefaultManagedObject(ManagementPropertyMasked.class);
-      log.info(managedObject.getPropertyNames());
-      ManagedProperty masked1 = managedObject.getProperty("masked1");
-      assertNotNull(masked1);
-      String maskedKey = Masked.class.getName();
-      log.info(masked1.getAnnotations().keySet());
-      assertTrue(masked1.hasAnnotation(maskedKey));
-      Masked masked1Ann = (Masked) masked1.getAnnotations().get(maskedKey);
-      assertNotNull(masked1Ann);
-      String[] masked1Opts = masked1Ann.options();
-      assertEquals(2, masked1Opts.length);
-      assertEquals("hashAlgorithm", masked1Opts[0]);
-      assertEquals("MD5", masked1Opts[1]);
-      
-      ManagedProperty masked2 = managedObject.getProperty("masked2");
-      assertNotNull(masked2);
-      assertTrue(masked2.hasAnnotation(maskedKey));
-      Masked masked2Ann = (Masked) masked2.getAnnotations().get(maskedKey);
-      assertNotNull(masked2Ann);
-   }
-}

Copied: projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/ManagementPropertyUnitTestCase.java (from rev 89193, projects/jboss-man/branches/Branch_2_1/managed/src/test/java/org/jboss/test/managed/factory/test/ManagementPropertyUnitTestCase.java)
===================================================================
--- projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/ManagementPropertyUnitTestCase.java	                        (rev 0)
+++ projects/jboss-man/tags/2.1.0.GA/managed/src/test/java/org/jboss/test/managed/factory/test/ManagementPropertyUnitTestCase.java	2009-05-20 16:45:03 UTC (rev 89200)
@@ -0,0 +1,332 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2007, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.managed.factory.test;
+
+import java.lang.annotation.Annotation;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import junit.framework.Test;
+
+import org.jboss.managed.api.ManagedObject;
+import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.api.annotation.ActivationPolicy;
+import org.jboss.managed.api.annotation.ManagementObjectID;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.managed.api.annotation.Masked;
+import org.jboss.managed.api.annotation.ViewUse;
+import org.jboss.managed.plugins.ManagedPropertyImpl;
+import org.jboss.metatype.api.types.SimpleMetaType;
+import org.jboss.metatype.api.values.SimpleValueSupport;
+import org.jboss.test.managed.factory.AbstractManagedObjectFactoryTest;
+import org.jboss.test.managed.factory.support.ManagementPropertyActivationPolicy;
+import org.jboss.test.managed.factory.support.ManagementPropertyAnnotations;
+import org.jboss.test.managed.factory.support.ManagementPropertyDescription;
+import org.jboss.test.managed.factory.support.ManagementPropertyMandatory;
+import org.jboss.test.managed.factory.support.ManagementPropertyMasked;
+import org.jboss.test.managed.factory.support.ManagementPropertyReadOnly;
+import org.jboss.test.managed.factory.support.ManagementPropertySimpleManaged;
+import org.jboss.test.managed.factory.support.adminview.PortAdminViewBean;
+import org.jboss.test.managed.factory.support.adminview.ServerBean;
+
+/**
+ * ManagementPropertyUnitTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class ManagementPropertyUnitTestCase extends AbstractManagedObjectFactoryTest
+{
+   /**
+    * Create a testsuite for this test
+    * 
+    * @return the testsuite
+    */
+   public static Test suite()
+   {
+      return suite(ManagementPropertyUnitTestCase.class);
+   }
+
+   /**
+    * Create a new ManagementPropertyUnitTestCase.
+    * 
+    * @param name the test name
+    */
+   public ManagementPropertyUnitTestCase(String name)
+   {
+      super(name);
+   }
+   
+   /**
+    * Test the overridden description
+    */
+   public void testDescription()
+   {
+      ManagedObject managedObject = createAndCheckDefaultManagedObject(ManagementPropertyDescription.class);
+      checkProperty(managedObject, "property", String.class, "changed", false, null);
+   }
+   
+   /**
+    * Test the overridden mandatory
+    */
+   public void testMandatory()
+   {
+      ManagedObject managedObject = createAndCheckDefaultManagedObject(ManagementPropertyMandatory.class);
+      checkProperty(managedObject, "property", String.class, "property", true, null);
+   }
+   
+   /**
+    * Test the overridden and accessor based read only
+    */
+   public void testReadOnly()
+   {
+      ManagedObject managedObject = createAndCheckDefaultManagedObject(ManagementPropertyReadOnly.class);
+      checkProperty(managedObject, "readOnly", String.class, "readOnly", false, "readOnly");
+      checkProperty(managedObject, "readOnly2", String.class, "readOnly2", false, "readOnly2");
+      checkProperty(managedObject, "readWrite", String.class, "readWrite", false, "readWrite");
+      checkProperty(managedObject, "readWrite2", String.class, "readWrite2", false, "readWrite2");
+      ManagedProperty readOnly = managedObject.getProperty("readOnly");
+      assertTrue(readOnly.isReadOnly());
+      ManagedProperty readOnly2 = managedObject.getProperty("readOnly");
+      assertTrue(readOnly2.isReadOnly());
+      ManagedProperty readWrite = managedObject.getProperty("readWrite");
+      assertFalse(readWrite.isReadOnly());
+      ManagedProperty readWrite2 = managedObject.getProperty("readWrite2");
+      assertFalse(readWrite2.isReadOnly());
+   }
+
+   /**
+    * Test the overidden property to managed object
+    */
+   public void testSimpleManaged()
+   {
+      ManagementPropertySimpleManaged test = new ManagementPropertySimpleManaged();
+      ManagedObject managedObject = checkManagedObject(test);
+      checkPropertyIsManagedObject(managedObject, "property", "property", false, test.getProperty());
+   }
+
+   /**
+    * Test property annotations
+    */
+   public void testAnnotations()
+   {
+      ManagedObject managedObject = createAndCheckDefaultManagedObject(ManagementPropertyAnnotations.class);
+      ManagedProperty managedProperty = managedObject.getProperty("runtime");
+      assertNotNull(managedProperty);
+      Map<String, Annotation> annotations = managedProperty.getAnnotations();
+      assertEquals(2, annotations.size());
+      assertTrue(annotations.containsKey(ManagementProperty.class.getName()));
+      assertTrue(annotations.containsKey(ManagementObjectID.class.getName()));
+   }
+
+   /**
+    * Test property ViewUse
+    */
+   public void testViewUse()
+   {
+      ManagedObject managedObject = createAndCheckDefaultManagedObject(ManagementPropertyAnnotations.class);
+      ManagedProperty runtime = managedObject.getProperty("runtime");
+      assertNotNull(runtime);
+      assertTrue("has ViewUse.RUNTIME", runtime.hasViewUse(ViewUse.RUNTIME));
+      assertTrue("!has ViewUse.CONFIGURATION", !runtime.hasViewUse(ViewUse.CONFIGURATION));
+      assertTrue("!has ViewUse.STATISTIC", !runtime.hasViewUse(ViewUse.STATISTIC));
+
+      ManagedProperty configuration = managedObject.getProperty("configuration");
+      assertTrue("has ViewUse.CONFIGURATION", configuration.hasViewUse(ViewUse.CONFIGURATION));
+
+      ManagedProperty stat = managedObject.getProperty("stat");
+      assertTrue("has ViewUse.STATISTIC", stat.hasViewUse(ViewUse.STATISTIC));
+   }
+
+   /**
+    * Test the 
+    */
+   @ManagementProperty(name="runtime-stat", use={ViewUse.STATISTIC})
+   public void testViewUseField()
+      throws Exception
+   {
+      ManagedPropertyImpl mp = new ManagedPropertyImpl("runtime");
+      mp.setMetaType(SimpleMetaType.LONG);
+      mp.setValue(SimpleValueSupport.wrap(1000));
+      mp.setViewUse(new ViewUse[]{ViewUse.RUNTIME});
+      assertTrue("has ViewUse.RUNTIME", mp.hasViewUse(ViewUse.RUNTIME));
+
+      ManagedPropertyImpl mp2 = new ManagedPropertyImpl("runtime-stat");
+      mp2.setMetaType(SimpleMetaType.LONG);
+      mp2.setValue(SimpleValueSupport.wrap(1000));
+      mp2.setViewUse(new ViewUse[]{ViewUse.RUNTIME, ViewUse.STATISTIC});
+      assertTrue("has ViewUse.RUNTIME", mp2.hasViewUse(ViewUse.RUNTIME));
+      assertTrue("has ViewUse.STATISTIC", mp2.hasViewUse(ViewUse.STATISTIC));
+
+      ManagedPropertyImpl mp3 = new ManagedPropertyImpl("runtime-stat");
+      mp3.setMetaType(SimpleMetaType.LONG);
+      mp3.setValue(SimpleValueSupport.wrap(1000));
+      mp3.setViewUse(new ViewUse[]{ViewUse.RUNTIME});
+      HashMap<String, Annotation> annotations = new HashMap<String, Annotation>();
+      ManagementProperty mpa = getClass().getMethod("testViewUseField", null).getAnnotation(ManagementProperty.class);
+      annotations.put(ManagementProperty.class.getName(), mpa);
+      mp3.setAnnotations(annotations);
+      assertTrue("has ViewUse.RUNTIME", mp3.hasViewUse(ViewUse.RUNTIME));
+      assertTrue("has ViewUse.STATISTIC", mp3.hasViewUse(ViewUse.STATISTIC));
+   }
+
+   /**
+    * Tests of the activationPolicy()
+    * @throws Exception
+    */
+   public void testActivationPolicy()
+      throws Exception
+   {
+      ManagedObject managedObject = createAndCheckDefaultManagedObject(ManagementPropertyActivationPolicy.class);
+      ManagedProperty defaultProp = managedObject.getProperty("defaultProp");
+      assertNotNull(defaultProp);
+      assertEquals(ActivationPolicy.IMMEDIATE, defaultProp.getActivationPolicy());
+      ManagedProperty compRestartProp = managedObject.getProperty("compRestartProp");
+      assertNotNull(compRestartProp);
+      assertEquals(ActivationPolicy.COMPONENT_RESTART, compRestartProp.getActivationPolicy());
+      ManagedProperty immediateProp = managedObject.getProperty("immediateProp");
+      assertNotNull(immediateProp);
+      assertEquals(ActivationPolicy.IMMEDIATE, immediateProp.getActivationPolicy());
+      ManagedProperty deployRestartProp = managedObject.getProperty("deployRestartProp");
+      assertNotNull(deployRestartProp);
+      assertEquals(ActivationPolicy.DEPLOYMENT_RESTART, deployRestartProp.getActivationPolicy());
+      ManagedProperty serverRestartProp = managedObject.getProperty("serverRestartProp");
+      assertNotNull(serverRestartProp);
+      assertEquals(ActivationPolicy.SERVER_RESTART, serverRestartProp.getActivationPolicy());
+   }
+
+   /**
+    * Tests of isModified()/setModified()
+    */
+   public void testIsModified()
+      throws Exception
+   {
+      ManagedObject managedObject = createAndCheckDefaultManagedObject(ManagementPropertyReadOnly.class);
+      ManagedProperty readOnly = managedObject.getProperty("readOnly");
+      assertNotNull(readOnly);
+      assertFalse(readOnly.isModified());
+      try
+      {
+         readOnly.setValue(SimpleValueSupport.wrap("readOnly-update"));
+      }
+      catch(Exception e)
+      {
+         e.printStackTrace();
+      }
+      assertFalse(readOnly.isModified());
+      // 
+      ManagedProperty readWrite = managedObject.getProperty("readWrite");
+      assertNotNull(readWrite);
+      assertFalse(readWrite.isModified());
+      readWrite.setValue(SimpleValueSupport.wrap("readWrite-update"));
+      assertTrue("isModified", readWrite.isModified());
+
+      // Validate that clearing/rewriting the same value does not set isModified
+      readWrite.setModified(false);
+      assertFalse(readWrite.isModified());
+      readWrite.setValue(SimpleValueSupport.wrap("readWrite-update"));
+      assertFalse(readWrite.isModified());
+   }
+   
+   public void testMasked()
+      throws Exception
+   {
+      ManagedObject managedObject = createAndCheckDefaultManagedObject(ManagementPropertyMasked.class);
+      log.info(managedObject.getPropertyNames());
+      ManagedProperty masked1 = managedObject.getProperty("masked1");
+      assertNotNull(masked1);
+      String maskedKey = Masked.class.getName();
+      log.info(masked1.getAnnotations().keySet());
+      assertTrue(masked1.hasAnnotation(maskedKey));
+      Masked masked1Ann = (Masked) masked1.getAnnotations().get(maskedKey);
+      assertNotNull(masked1Ann);
+      String[] masked1Opts = masked1Ann.options();
+      assertEquals(2, masked1Opts.length);
+      assertEquals("hashAlgorithm", masked1Opts[0]);
+      assertEquals("MD5", masked1Opts[1]);
+      
+      ManagedProperty masked2 = managedObject.getProperty("masked2");
+      assertNotNull(masked2);
+      assertTrue(masked2.hasAnnotation(maskedKey));
+      Masked masked2Ann = (Masked) masked2.getAnnotations().get(maskedKey);
+      assertNotNull(masked2Ann);
+   }
+
+   public void testAdminViews()
+      throws Exception
+   {
+      ManagedObject serverBeanMO = createAndCheckDefaultManagedObject(ServerBean.class);
+      ManagedObject portBeanMO = createAndCheckDefaultManagedObject(PortAdminViewBean.class);
+      log.info("ServerBean: "+serverBeanMO.getPropertyNames());
+      Map<String, Set<String>> serverAdminViews = new HashMap<String, Set<String>>();
+      for(ManagedProperty mp : serverBeanMO.getProperties().values())
+      {
+         String name = mp.getName();
+         Set<String> views = serverAdminViews.get(name);
+         if(views == null)
+         {
+            views = new HashSet<String>();
+            serverAdminViews.put(name, views);
+         }
+         Collection<String> adminViews = mp.getAdminViewUses();
+         log.info(mp+" uses: "+adminViews);
+         for(String view : adminViews)
+            views.add(view);
+      }
+      // Validate the expected admin views
+      assertEquals("property1", collection("Port"), serverAdminViews.get("property1"));
+      assertEquals("property2", collection("Port", "Bootstrap"), serverAdminViews.get("property2"));
+      assertEquals("property3", collection("Interface"), serverAdminViews.get("property3"));
+      assertEquals("securityDomain", collection("Security"), serverAdminViews.get("securityDomain"));
+      log.info("PortAdminViewBean: "+portBeanMO.getPropertyNames());
+
+      Map<String, Set<String>> portViews = new HashMap<String, Set<String>>();
+      for(ManagedProperty mp : portBeanMO.getProperties().values())
+      {
+         String name = mp.getName();
+         Set<String> views = portViews.get(name);
+         if(views == null)
+         {
+            views = new HashSet<String>();
+            portViews.put(name, views);
+         }
+         Collection<String> adminViews = mp.getAdminViewUses();
+         log.info(mp+" uses: "+adminViews);
+         for(String view : adminViews)
+            views.add(view);
+      }
+      assertEquals("listeningInterface", collection("Interface"), portViews.get("listeningInterface"));
+      assertEquals("port", collection("Port"), portViews.get("port"));
+      assertEquals("bootstrapPort", collection("Port", "Bootstrap"), portViews.get("bootstrapPort"));
+   }
+
+   private Collection<String> collection(String... strings)
+   {
+      HashSet<String> collection = new HashSet<String>();
+      for(String s : strings)
+         collection.add(s);
+      return collection;
+   }
+}

Deleted: projects/jboss-man/tags/2.1.0.GA/metatype/.classpath
===================================================================
--- projects/jboss-man/branches/Branch_2_1/metatype/.classpath	2009-05-20 14:23:56 UTC (rev 89190)
+++ projects/jboss-man/tags/2.1.0.GA/metatype/.classpath	2009-05-20 16:45:03 UTC (rev 89200)
@@ -1,18 +0,0 @@
-<classpath>
-  <classpathentry kind="src" path="src/main/java"/>
-  <classpathentry kind="src" path="src/test/java" output="target/tests-classes"/>
-  <classpathentry kind="output" path="target/classes"/>
-  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.9.GA/jboss-common-core-2.2.9.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.9.GA/jboss-common-core-2.2.9.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.0.GA/jboss-reflect-2.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-reflect/2.0.0.GA/jboss-reflect-2.0.0.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-server-manager/0.1.1.GA/jboss-server-manager-0.1.1.GA.jar" sourcepath="M2_REPO/org/jboss/jbossas/jboss-server-manager/0.1.1.GA/jboss-server-manager-0.1.1.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/test/jboss-test/1.1.1.GA/jboss-test-1.1.1.GA.jar" sourcepath="M2_REPO/org/jboss/test/jboss-test/1.1.1.GA/jboss-test-1.1.1.GA-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
-</classpath>
\ No newline at end of file

Copied: projects/jboss-man/tags/2.1.0.GA/metatype/.classpath (from rev 89198, projects/jboss-man/branches/Branch_2_1/metatype/.classpath)
===================================================================
--- projects/jboss-man/tags/2.1.0.GA/metatype/.classpath	                        (rev 0)
+++ projects/jboss-man/tags/2.1.0.GA/metatype/.classpath	2009-05-20 16:45:03 UTC (rev 89200)
@@ -0,0 +1,18 @@
+<classpath>
+  <classpathentry kind="src" path="src/main/java"/>
+  <classpathentry kind="src" path="src/test/java" output="target/tests-classes"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.12.GA/jboss-common-core-2.2.12.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.12.GA/jboss-common-core-2.2.12.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.2.GA/jboss-reflect-2.0.2.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-reflect/2.0.2.GA/jboss-reflect-2.0.2.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-server-manager/0.1.1.GA/jboss-server-manager-0.1.1.GA.jar" sourcepath="M2_REPO/org/jboss/jbossas/jboss-server-manager/0.1.1.GA/jboss-server-manager-0.1.1.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/test/jboss-test/1.1.1.GA/jboss-test-1.1.1.GA.jar" sourcepath="M2_REPO/org/jboss/test/jboss-test/1.1.1.GA/jboss-test-1.1.1.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
+</classpath>
\ No newline at end of file

Deleted: projects/jboss-man/tags/2.1.0.GA/metatype/pom.xml
===================================================================
--- projects/jboss-man/branches/Branch_2_1/metatype/pom.xml	2009-05-20 14:23:56 UTC (rev 89190)
+++ projects/jboss-man/tags/2.1.0.GA/metatype/pom.xml	2009-05-20 16:45:03 UTC (rev 89200)
@@ -1,74 +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">
-  <parent>
-    <groupId>org.jboss.man</groupId>
-    <artifactId>jboss-man-parent</artifactId>
-    <version>2.1.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>jboss-metatype</artifactId>
-  <packaging>jar</packaging>
-  <name>JBoss Metatype</name>
-  <url>http://www.jboss.org/jbossmc</url>
-  <description>JBoss Metatype</description>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <testFailureIgnore>false</testFailureIgnore>
-        </configuration>
-      </plugin>   	   
-    </plugins>
-  </build>
-  
-  <!-- Do not add version information here, use ../pom.xml instead -->
-  <dependencies>
-    <!-- Global dependencies -->
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-reflect</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>org.jboss</groupId>
-          <artifactId>jboss-common-core</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jboss.logging</groupId>
-          <artifactId>jboss-logging-spi</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.logging</groupId>
-      <artifactId>jboss-logging-spi</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-common-core</artifactId>
-    </dependency>
-	  <!-- Test dependencies -->
-    <dependency>
-      <groupId>org.jboss.logging</groupId>
-      <artifactId>jboss-logging-log4j</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.test</groupId>
-      <artifactId>jboss-test</artifactId>
-      <scope>test</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>org.jboss.man</groupId>
-          <artifactId>jboss-managed</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>  
-</project>

Copied: projects/jboss-man/tags/2.1.0.GA/metatype/pom.xml (from rev 89199, projects/jboss-man/branches/Branch_2_1/metatype/pom.xml)
===================================================================
--- projects/jboss-man/tags/2.1.0.GA/metatype/pom.xml	                        (rev 0)
+++ projects/jboss-man/tags/2.1.0.GA/metatype/pom.xml	2009-05-20 16:45:03 UTC (rev 89200)
@@ -0,0 +1,74 @@
+<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">
+  <parent>
+    <groupId>org.jboss.man</groupId>
+    <artifactId>jboss-man-parent</artifactId>
+    <version>2.1.0.GA</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>jboss-metatype</artifactId>
+  <packaging>jar</packaging>
+  <name>JBoss Metatype</name>
+  <url>http://www.jboss.org/jbossmc</url>
+  <description>JBoss Metatype</description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <testFailureIgnore>false</testFailureIgnore>
+        </configuration>
+      </plugin>   	   
+    </plugins>
+  </build>
+  
+  <!-- Do not add version information here, use ../pom.xml instead -->
+  <dependencies>
+    <!-- Global dependencies -->
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-reflect</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>org.jboss</groupId>
+          <artifactId>jboss-common-core</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.logging</groupId>
+          <artifactId>jboss-logging-spi</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-spi</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-common-core</artifactId>
+    </dependency>
+	  <!-- Test dependencies -->
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-log4j</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.test</groupId>
+      <artifactId>jboss-test</artifactId>
+      <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>org.jboss.man</groupId>
+          <artifactId>jboss-managed</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>  
+</project>

Deleted: projects/jboss-man/tags/2.1.0.GA/pom.xml
===================================================================
--- projects/jboss-man/branches/Branch_2_1/pom.xml	2009-05-20 14:23:56 UTC (rev 89190)
+++ projects/jboss-man/tags/2.1.0.GA/pom.xml	2009-05-20 16:45:03 UTC (rev 89200)
@@ -1,250 +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</version>
-  </parent>
-  <groupId>org.jboss.man</groupId>
-  <artifactId>jboss-man-parent</artifactId>
-  <version>2.1.0-SNAPSHOT</version>
-  <packaging>pom</packaging>
-  <name>JBoss Managed Parent POM</name>
-  <url>http://www.jboss.org/jbossmc</url>
-  <description>JBoss Managed Parent POM</description>
-  <scm>
-    <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/jboss-man/branches/</connection>
-    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-man/branches/</developerConnection>
-    <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/jboss-man/trunk/</url>
-  </scm>
-
-  <properties>
-    <version.jboss.common.core>2.2.10.GA</version.jboss.common.core>
-    <version.jboss.common.logging.spi>2.0.5.GA</version.jboss.common.logging.spi>
-    <version.jboss.common.logging.log4j>2.0.5.GA</version.jboss.common.logging.log4j>
-    <version.org.jboss.reflect>2.0.2.GA</version.org.jboss.reflect>
-    <version.org.jboss.mdr>2.0.1.GA</version.org.jboss.mdr>
-    <version.org.jboss.test>1.1.3.GA</version.org.jboss.test>
-    <version.junit>4.4</version.junit>
-    <version.sun.jaxb>2.1.4</version.sun.jaxb>
-    <version.javassist>3.9.0.GA</version.javassist>
-  </properties>
-
-  <modules>
-    <module>metatype</module>
-    <module>managed</module>
-    <module>build</module>
-  </modules>
-  
-  <build>
-    <outputDirectory>${microcontainer.outputDirectory}</outputDirectory>
-    <testOutputDirectory>${microcontainer.testOutputDirectory}</testOutputDirectory>
-    <finalName>${artifactId}</finalName>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.0.2</version>
-        <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
-          <showDeprecation>true</showDeprecation>
-          <showWarnings>true</showWarnings>
-          <optimize>true</optimize>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-release-plugin</artifactId>
-        <version>2.0-beta-7</version>
-        <configuration>
-          <tagBase>https://svn.jboss.org/repos/jbossas/projects/jboss-man/tags</tagBase>
-          <autoVersionSubmodules>true</autoVersionSubmodules>
-        </configuration>
-      </plugin>
-    </plugins>
-    
-    <pluginManagement>
-      <plugins>
-        <plugin>
-          <artifactId>maven-idea-plugin</artifactId>
-          <configuration>
-            <downloadSources>true</downloadSources>
-          </configuration>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-jar-plugin</artifactId>
-          <version>2.2</version>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-surefire-plugin</artifactId>
-          <version>2.4.2</version>
-          <configuration>
-            <redirectTestOutputToFile>true</redirectTestOutputToFile>
-            <includes>
-              <include>org/jboss/test/**/*TestCase.java</include>
-            </includes>
-          </configuration>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-  </build>
-
-  <reporting>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-project-info-reports-plugin</artifactId>
-        <reportSets>
-          <reportSet>
-            <reports>
-              <report>dependencies</report>
-              <report>issue-tracking</report>
-              <report>license</report>
-              <report>scm</report>
-            </reports>
-          </reportSet>
-        </reportSets>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>findbugs-maven-plugin</artifactId>
-        <version>1.0.0</version>
-      </plugin>
-    </plugins>
-  </reporting>
-  <dependencyManagement>
-    <!-- The parent pom manages the inter-dependencies of the modules. -->
-    <dependencies>
-      <dependency>
-        <groupId>org.jboss.man</groupId>
-        <artifactId>jboss-managed</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss.man</groupId>
-        <artifactId>jboss-metatype</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss</groupId>
-        <artifactId>jboss-common-core</artifactId>
-        <version>${version.jboss.common.core}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss.logging</groupId>
-        <artifactId>jboss-logging-spi</artifactId>
-        <version>${version.jboss.common.logging.spi}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss.logging</groupId>
-        <artifactId>jboss-logging-log4j</artifactId>
-        <version>${version.jboss.common.logging.log4j}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss</groupId>
-        <artifactId>jboss-reflect</artifactId>
-        <version>${version.org.jboss.reflect}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss</groupId>
-        <artifactId>jboss-mdr</artifactId>
-        <version>${version.org.jboss.mdr}</version>
-      </dependency>
-      <!-- test dependencies -->
-      <dependency>
-        <groupId>org.jboss.test</groupId>
-        <artifactId>jboss-test</artifactId>
-        <version>${version.org.jboss.test}</version>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>junit</groupId>
-        <artifactId>junit</artifactId>
-        <version>${version.junit}</version>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>sun-jaxb</groupId>
-        <artifactId>jaxb-api</artifactId>
-        <version>${version.sun.jaxb}</version>
-      </dependency>
-      <dependency>
-        <groupId>javassist</groupId>
-        <artifactId>javassist</artifactId>
-        <version>${version.javassist}</version>
-      </dependency>
-    </dependencies>
-  </dependencyManagement>
-
-  <repositories>
-    <repository>
-      <id>repository.jboss.org</id>
-      <name>JBoss Repository</name>
-      <layout>default</layout>
-      <url>http://repository.jboss.org/maven2/</url>
-      <releases>
-        <enabled>true</enabled>
-      </releases>
-      <snapshots>
-        <enabled>false</enabled>
-      </snapshots>
-    </repository>
-    <repository>
-      <id>snapshots.jboss.org</id>
-      <name>JBoss Snapshots Repository</name>
-      <layout>default</layout>
-      <url>http://snapshots.jboss.org/maven2/</url>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-    </repository>
-  </repositories>
-  
-  <profiles>
-    <profile>
-      <id>default</id>
-      <activation>
-        <activeByDefault>true</activeByDefault>
-      </activation>
-      <properties>
-        <microcontainer.outputDirectory>target/classes</microcontainer.outputDirectory>
-        <microcontainer.testOutputDirectory>target/tests-classes</microcontainer.testOutputDirectory>
-      </properties>
-    </profile>
-    <profile>
-      <id>eclipse</id>
-      <build>
-        <defaultGoal>process-test-resources</defaultGoal>
-        <plugins>
-          <plugin>
-            <artifactId>maven-eclipse-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>eclipse</id>
-                <phase>process-test-resources</phase>
-                <goals>
-                  <goal>eclipse</goal>
-                </goals>
-              </execution>
-            </executions>
-            <configuration>
-              <downloadSources>true</downloadSources>
-              <buildOutputDirectory>${microcontainer.outputDirectory}</buildOutputDirectory>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-      <properties>
-        <microcontainer.outputDirectory>eclipse-target/classes</microcontainer.outputDirectory>
-        <microcontainer.testOutputDirectory>eclipse-target/tests-classes</microcontainer.testOutputDirectory>
-      </properties>
-    </profile>
-  </profiles>
-
-</project>

Copied: projects/jboss-man/tags/2.1.0.GA/pom.xml (from rev 89199, projects/jboss-man/branches/Branch_2_1/pom.xml)
===================================================================
--- projects/jboss-man/tags/2.1.0.GA/pom.xml	                        (rev 0)
+++ projects/jboss-man/tags/2.1.0.GA/pom.xml	2009-05-20 16:45:03 UTC (rev 89200)
@@ -0,0 +1,250 @@
+<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</version>
+  </parent>
+  <groupId>org.jboss.man</groupId>
+  <artifactId>jboss-man-parent</artifactId>
+  <version>2.1.0.GA</version>
+  <packaging>pom</packaging>
+  <name>JBoss Managed Parent POM</name>
+  <url>http://www.jboss.org/jbossmc</url>
+  <description>JBoss Managed Parent POM</description>
+  <scm>
+    <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/jboss-man/tags/2.1.0.GA</connection>
+    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-man/tags/2.1.0.GA</developerConnection>
+    <url>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-man/tags/2.1.0.GA</url>
+  </scm>
+
+  <properties>
+    <version.jboss.common.core>2.2.10.GA</version.jboss.common.core>
+    <version.jboss.common.logging.spi>2.0.5.GA</version.jboss.common.logging.spi>
+    <version.jboss.common.logging.log4j>2.0.5.GA</version.jboss.common.logging.log4j>
+    <version.org.jboss.reflect>2.0.2.GA</version.org.jboss.reflect>
+    <version.org.jboss.mdr>2.0.1.GA</version.org.jboss.mdr>
+    <version.org.jboss.test>1.1.3.GA</version.org.jboss.test>
+    <version.junit>4.4</version.junit>
+    <version.sun.jaxb>2.1.4</version.sun.jaxb>
+    <version.javassist>3.9.0.GA</version.javassist>
+  </properties>
+
+  <modules>
+    <module>metatype</module>
+    <module>managed</module>
+    <module>build</module>
+  </modules>
+  
+  <build>
+    <outputDirectory>${microcontainer.outputDirectory}</outputDirectory>
+    <testOutputDirectory>${microcontainer.testOutputDirectory}</testOutputDirectory>
+    <finalName>${artifactId}</finalName>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.0.2</version>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+          <showDeprecation>true</showDeprecation>
+          <showWarnings>true</showWarnings>
+          <optimize>true</optimize>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-release-plugin</artifactId>
+        <version>2.0-beta-7</version>
+        <configuration>
+          <tagBase>https://svn.jboss.org/repos/jbossas/projects/jboss-man/tags</tagBase>
+          <autoVersionSubmodules>true</autoVersionSubmodules>
+        </configuration>
+      </plugin>
+    </plugins>
+    
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <artifactId>maven-idea-plugin</artifactId>
+          <configuration>
+            <downloadSources>true</downloadSources>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
+          <version>2.2</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.4.2</version>
+          <configuration>
+            <redirectTestOutputToFile>true</redirectTestOutputToFile>
+            <includes>
+              <include>org/jboss/test/**/*TestCase.java</include>
+            </includes>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-project-info-reports-plugin</artifactId>
+        <reportSets>
+          <reportSet>
+            <reports>
+              <report>dependencies</report>
+              <report>issue-tracking</report>
+              <report>license</report>
+              <report>scm</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>findbugs-maven-plugin</artifactId>
+        <version>1.0.0</version>
+      </plugin>
+    </plugins>
+  </reporting>
+  <dependencyManagement>
+    <!-- The parent pom manages the inter-dependencies of the modules. -->
+    <dependencies>
+      <dependency>
+        <groupId>org.jboss.man</groupId>
+        <artifactId>jboss-managed</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.man</groupId>
+        <artifactId>jboss-metatype</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jboss-common-core</artifactId>
+        <version>${version.jboss.common.core}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.logging</groupId>
+        <artifactId>jboss-logging-spi</artifactId>
+        <version>${version.jboss.common.logging.spi}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.logging</groupId>
+        <artifactId>jboss-logging-log4j</artifactId>
+        <version>${version.jboss.common.logging.log4j}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jboss-reflect</artifactId>
+        <version>${version.org.jboss.reflect}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jboss-mdr</artifactId>
+        <version>${version.org.jboss.mdr}</version>
+      </dependency>
+      <!-- test dependencies -->
+      <dependency>
+        <groupId>org.jboss.test</groupId>
+        <artifactId>jboss-test</artifactId>
+        <version>${version.org.jboss.test}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>junit</groupId>
+        <artifactId>junit</artifactId>
+        <version>${version.junit}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>sun-jaxb</groupId>
+        <artifactId>jaxb-api</artifactId>
+        <version>${version.sun.jaxb}</version>
+      </dependency>
+      <dependency>
+        <groupId>javassist</groupId>
+        <artifactId>javassist</artifactId>
+        <version>${version.javassist}</version>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <repositories>
+    <repository>
+      <id>repository.jboss.org</id>
+      <name>JBoss Repository</name>
+      <layout>default</layout>
+      <url>http://repository.jboss.org/maven2/</url>
+      <releases>
+        <enabled>true</enabled>
+      </releases>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
+    <repository>
+      <id>snapshots.jboss.org</id>
+      <name>JBoss Snapshots Repository</name>
+      <layout>default</layout>
+      <url>http://snapshots.jboss.org/maven2/</url>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+    </repository>
+  </repositories>
+  
+  <profiles>
+    <profile>
+      <id>default</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <properties>
+        <microcontainer.outputDirectory>target/classes</microcontainer.outputDirectory>
+        <microcontainer.testOutputDirectory>target/tests-classes</microcontainer.testOutputDirectory>
+      </properties>
+    </profile>
+    <profile>
+      <id>eclipse</id>
+      <build>
+        <defaultGoal>process-test-resources</defaultGoal>
+        <plugins>
+          <plugin>
+            <artifactId>maven-eclipse-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>eclipse</id>
+                <phase>process-test-resources</phase>
+                <goals>
+                  <goal>eclipse</goal>
+                </goals>
+              </execution>
+            </executions>
+            <configuration>
+              <downloadSources>true</downloadSources>
+              <buildOutputDirectory>${microcontainer.outputDirectory}</buildOutputDirectory>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+      <properties>
+        <microcontainer.outputDirectory>eclipse-target/classes</microcontainer.outputDirectory>
+        <microcontainer.testOutputDirectory>eclipse-target/tests-classes</microcontainer.testOutputDirectory>
+      </properties>
+    </profile>
+  </profiles>
+
+</project>




More information about the jboss-cvs-commits mailing list