[jboss-cvs] JBossAS SVN: r85924 - in projects/microcontainer/trunk: aop-mc-int/src/main/java/org/jboss and 33 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Mar 16 08:53:44 EDT 2009


Author: kabir.khan at jboss.com
Date: 2009-03-16 08:53:44 -0400 (Mon, 16 Mar 2009)
New Revision: 85924

Added:
   projects/microcontainer/trunk/aop-mc-int/src/main/java/org/jboss/system/
   projects/microcontainer/trunk/aop-mc-int/src/main/java/org/jboss/system/microcontainer/
   projects/microcontainer/trunk/jmx-aop-mc-int/
   projects/microcontainer/trunk/jmx-aop-mc-int/.classpath
   projects/microcontainer/trunk/jmx-aop-mc-int/.project
   projects/microcontainer/trunk/jmx-aop-mc-int/.settings/
   projects/microcontainer/trunk/jmx-aop-mc-int/.settings/org.eclipse.jdt.core.prefs
   projects/microcontainer/trunk/jmx-aop-mc-int/pom.xml
   projects/microcontainer/trunk/jmx-aop-mc-int/src/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/main/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/main/java/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/main/java/org/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/main/java/org/jboss/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/main/resources/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/ExposeJMXAttribute.java
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/ExposeJMXAttributeChecker.java
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/TestServiceControllerLifecycleCallback.java
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase.java
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase.java
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase-beans.xml
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase-mc.xml
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase-beans.xml
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase-mc.xml
   projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase.xml
Removed:
   projects/microcontainer/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/
   projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/ExposeJMXAttribute.java
   projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/ExposeJMXAttributeChecker.java
   projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/TestServiceControllerLifecycleCallback.java
   projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase.java
   projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase.java
   projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase-beans.xml
   projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase-mc.xml
   projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase-beans.xml
   projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase-mc.xml
   projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase.xml
Modified:
   projects/microcontainer/trunk/jmx-mc-int/.classpath
   projects/microcontainer/trunk/jmx-mc-int/.project
   projects/microcontainer/trunk/jmx-mc-int/pom.xml
   projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/IntegrationTestSuite.java
   projects/microcontainer/trunk/pom.xml
Log:
[JBMICROCONT-419] Move @JMX functionality out of jmx-mc-int into jmx-aop-mc-int. Rename jmx-mc-int artifact to jboss-jmx-mc-int.jar


Property changes on: projects/microcontainer/trunk/jmx-aop-mc-int
___________________________________________________________________
Name: svn:ignore
   + target


Added: projects/microcontainer/trunk/jmx-aop-mc-int/.classpath
===================================================================
--- projects/microcontainer/trunk/jmx-aop-mc-int/.classpath	                        (rev 0)
+++ projects/microcontainer/trunk/jmx-aop-mc-int/.classpath	2009-03-16 12:53:44 UTC (rev 85924)
@@ -0,0 +1,46 @@
+<classpath>
+  <classpathentry kind="src" path="src/main/java"/>
+  <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+  <classpathentry kind="src" path="src/test/java" output="target/test-classes"/>
+  <classpathentry kind="src" path="src/test/resources" output="target/test-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/javax/activation/activation/1.1.1/activation-1.1.1.jar"/>
+  <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/bcel/bcel/5.1/bcel-5.1.jar" sourcepath="M2_REPO/bcel/bcel/5.1/bcel-5.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/oswego-concurrent/concurrent/1.3.4-jboss-update1/concurrent-1.3.4-jboss-update1.jar" sourcepath="M2_REPO/oswego-concurrent/concurrent/1.3.4-jboss-update1/concurrent-1.3.4-jboss-update1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/wutka-dtdparser/dtdparser121/1.2.1/dtdparser121-1.2.1.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/aop/jboss-aop/2.0.0.SP1/jboss-aop-2.0.0.SP1.jar" sourcepath="M2_REPO/org/jboss/aop/jboss-aop/2.0.0.SP1/jboss-aop-2.0.0.SP1-sources.jar"/>
+  <classpathentry kind="src" path="/jboss-aop-mc-int"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-classloading-spi/6.0.0.Alpha4/jboss-classloading-spi-6.0.0.Alpha4.jar" sourcepath="M2_REPO/org/jboss/integration/jboss-classloading-spi/6.0.0.Alpha4/jboss-classloading-spi-6.0.0.Alpha4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.10.GA/jboss-common-core-2.2.10.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.10.GA/jboss-common-core-2.2.10.GA-sources.jar"/>
+  <classpathentry kind="src" path="/jboss-dependency"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/mx/jboss-j2se/6.0.0.Beta1/jboss-j2se-6.0.0.Beta1.jar" sourcepath="M2_REPO/org/jboss/mx/jboss-j2se/6.0.0.Beta1/jboss-j2se-6.0.0.Beta1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/mx/jboss-j2se/6.0.0.Beta1/jboss-j2se-6.0.0.Beta1-tests.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/mx/jboss-jmx/6.0.0.Beta1/jboss-jmx-6.0.0.Beta1.jar" sourcepath="M2_REPO/org/jboss/mx/jboss-jmx/6.0.0.Beta1/jboss-jmx-6.0.0.Beta1-sources.jar"/>
+  <classpathentry kind="src" path="/jboss-jmx-mc-int"/>
+  <classpathentry kind="src" path="/jboss-kernel"/>
+  <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/man/jboss-managed/2.0.0.GA/jboss-managed-2.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/man/jboss-managed/2.0.0.GA/jboss-managed-2.0.0.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/mx/jboss-mbeans/6.0.0.Beta1/jboss-mbeans-6.0.0.Beta1.jar" sourcepath="M2_REPO/org/jboss/mx/jboss-mbeans/6.0.0.Beta1/jboss-mbeans-6.0.0.Beta1-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="var" path="M2_REPO/org/jboss/man/jboss-metatype/2.0.0.GA/jboss-metatype-2.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/man/jboss-metatype/2.0.0.GA/jboss-metatype-2.0.0.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/org/jboss/jbossxb/2.0.0.GA/jbossxb-2.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/jbossxb/2.0.0.GA/jbossxb-2.0.0.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"/>
+  <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/qdox/qdox/1.6.1/qdox-1.6.1.jar" sourcepath="M2_REPO/qdox/qdox/1.6.1/qdox-1.6.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/trove/trove/2.1.1/trove-2.1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/apache-xerces/xml-apis/2.9.1/xml-apis-2.9.1.jar"/>
+</classpath>
\ No newline at end of file

Added: projects/microcontainer/trunk/jmx-aop-mc-int/.project
===================================================================
--- projects/microcontainer/trunk/jmx-aop-mc-int/.project	                        (rev 0)
+++ projects/microcontainer/trunk/jmx-aop-mc-int/.project	2009-03-16 12:53:44 UTC (rev 85924)
@@ -0,0 +1,18 @@
+<projectDescription>
+  <name>jboss-jmx-aop-mc-int</name>
+  <comment>JBoss Microcontainer JMX Integration</comment>
+  <projects>
+    <project>jboss-aop-mc-int</project>
+    <project>jboss-dependency</project>
+    <project>jboss-jmx-mc-int</project>
+    <project>jboss-kernel</project>
+  </projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: projects/microcontainer/trunk/jmx-aop-mc-int/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/microcontainer/trunk/jmx-aop-mc-int/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ projects/microcontainer/trunk/jmx-aop-mc-int/.settings/org.eclipse.jdt.core.prefs	2009-03-16 12:53:44 UTC (rev 85924)
@@ -0,0 +1,5 @@
+#Mon Mar 16 11:25:13 GMT 2009
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5

Added: projects/microcontainer/trunk/jmx-aop-mc-int/pom.xml
===================================================================
--- projects/microcontainer/trunk/jmx-aop-mc-int/pom.xml	                        (rev 0)
+++ projects/microcontainer/trunk/jmx-aop-mc-int/pom.xml	2009-03-16 12:53:44 UTC (rev 85924)
@@ -0,0 +1,89 @@
+<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.microcontainer</groupId>
+    <artifactId>jboss-microcontainer</artifactId>
+    <version>2.2.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>jboss-jmx-aop-mc-int</artifactId>
+  <packaging>jar</packaging>
+  <name>JBoss Microcontainer AOP/JMX Integration</name>
+  <url>http://www.jboss.com/products/jbossmc</url>
+  <description>JBoss Microcontainer JMX Integration</description> 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <!--configuration>
+          <testFailureIgnore>true</testFailureIgnore>
+        </configuration-->
+      </plugin> 
+    </plugins>
+  </build>
+  
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.jboss.test</groupId>
+        <artifactId>jboss-test</artifactId>
+        <version>${version.org.jboss.test}</version>
+        <scope>compile</scope>
+      </dependency>
+      <dependency>
+        <groupId>junit</groupId>
+        <artifactId>junit</artifactId>
+        <version>${version.junit}</version>
+        <scope>compile</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+  
+  <!-- Do not add version information here, use ../pom.xml instead -->
+  <dependencies>
+    <!-- Global dependencies -->
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-aop-mc-int</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-jmx-mc-int</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-kernel</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.mx</groupId>
+      <artifactId>jboss-jmx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.man</groupId>
+      <artifactId>jboss-managed</artifactId>
+      <optional>true</optional>
+    </dependency>
+    <!-- Test dependencies -->
+    <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>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-log4j</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-jmx-mc-int</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

Copied: projects/microcontainer/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx (from rev 85817, projects/microcontainer/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/jmx)

Added: projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/ExposeJMXAttribute.java
===================================================================
--- projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/ExposeJMXAttribute.java	                        (rev 0)
+++ projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/ExposeJMXAttribute.java	2009-03-16 12:53:44 UTC (rev 85924)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.system.controller.integration.support;
+
+import org.jboss.aop.microcontainer.aspects.jmx.JMX;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class ExposeJMXAttribute
+{
+   private MockUnifiedInvokerMBean invoker = new MockUnifiedInvoker();
+   private MockTransactionManagerMBean tm = new MockTransactionManager();
+
+   @JMX(exposedInterface = void.class, name="jboss:service=invoker,type=field", registerDirectly = true) private MockUnifiedInvokerMBean invokerField = new MockUnifiedInvoker();
+   @JMX(exposedInterface = void.class, registerDirectly = true) private MockTransactionManagerMBean tmField = new MockTransactionManager();
+
+   @JMX(exposedInterface = void.class, name="jboss:service=invoker,type=getter", registerDirectly = true)
+   public MockUnifiedInvokerMBean getInvoker()
+   {
+      return invoker;
+   }
+
+   public void setInvoker(MockUnifiedInvokerMBean invoker)
+   {
+      this.invoker = invoker;
+   }
+
+   @JMX(exposedInterface = void.class, registerDirectly = true)
+   public MockTransactionManagerMBean getTm()
+   {
+      return tm;
+   }
+
+   public void setTm(MockTransactionManagerMBean tm)
+   {
+      this.tm = tm;
+   }
+}
\ No newline at end of file

Added: projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/ExposeJMXAttributeChecker.java
===================================================================
--- projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/ExposeJMXAttributeChecker.java	                        (rev 0)
+++ projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/ExposeJMXAttributeChecker.java	2009-03-16 12:53:44 UTC (rev 85924)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.system.controller.integration.support;
+
+import org.jboss.aop.microcontainer.aspects.jmx.JMX;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.LifecycleCallbackItem;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.dependency.spi.DependencyInfo;
+import org.jboss.kernel.spi.dependency.KernelController;
+import org.jboss.kernel.spi.event.KernelEvent;
+import org.jboss.kernel.spi.event.KernelEventEmitter;
+import org.jboss.kernel.spi.event.KernelEventListener;
+import org.jboss.metadata.spi.MetaData;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class ExposeJMXAttributeChecker implements KernelEventListener
+{
+   private KernelController controller;
+   private KernelEventEmitter emitter;
+   private TestServiceControllerLifecycleCallback service;
+
+   public ExposeJMXAttributeChecker(
+         KernelController controller,
+         KernelEventEmitter emitter,
+         TestServiceControllerLifecycleCallback service)
+   {
+      this.controller = controller;
+      this.emitter = emitter;
+      this.service = service;
+   }
+
+   public void create() throws Throwable
+   {
+      emitter.registerListener(this, null, null);
+   }
+
+   public void destroy() throws Throwable
+   {
+      emitter.unregisterListener(this, null, null);
+   }
+
+   @SuppressWarnings("deprecation")
+   public void onEvent(KernelEvent event, Object o)
+   {
+      try
+      {
+         if (org.jboss.kernel.spi.registry.KernelRegistry.KERNEL_REGISTRY_REGISTERED.equals(event.getType()))
+         {
+            ControllerContext context = controller.getContext(event.getContext(), null);
+            addControllerContext(context);
+         }
+      }
+      catch (Throwable ignored)
+      {
+      }
+   }
+
+   private JMX readJmxAnnotation(ControllerContext context) throws Exception
+   {
+      MetaData metaData = context.getScopeInfo().getMetaData();
+      if (metaData != null)
+         return metaData.getAnnotation(JMX.class);
+      return null;
+   }
+
+   public void addControllerContext(ControllerContext context) throws Throwable
+   {
+      JMX jmx = readJmxAnnotation(context);
+      if (jmx != null)
+      {
+         DependencyInfo info = context.getDependencyInfo();
+         info.addLifecycleCallback(new ServiceLifecycleCallback());
+      }
+   }
+
+   private class ServiceLifecycleCallback implements LifecycleCallbackItem
+   {
+      public Object getBean()
+      {
+         return null;
+      }
+
+      public ControllerState getWhenRequired()
+      {
+         return ControllerState.INSTALLED;
+      }
+
+      public ControllerState getDependentState()
+      {
+         return ControllerState.INSTALLED;
+      }
+
+      public void install(ControllerContext ctx) throws Exception
+      {
+         service.install(ctx);
+      }
+
+      public void uninstall(ControllerContext ctx)
+      {
+         try
+         {
+            service.uninstall(ctx);
+         }
+         catch (Exception ignored)
+         {
+         }
+      }
+   }
+}
\ No newline at end of file

Added: projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/TestServiceControllerLifecycleCallback.java
===================================================================
--- projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/TestServiceControllerLifecycleCallback.java	                        (rev 0)
+++ projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/TestServiceControllerLifecycleCallback.java	2009-03-16 12:53:44 UTC (rev 85924)
@@ -0,0 +1,148 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.system.controller.integration.support;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.management.StandardMBean;
+
+import org.jboss.aop.microcontainer.aspects.jmx.JMX;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.spi.MetaData;
+import org.jboss.system.ServiceControllerMBean;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class TestServiceControllerLifecycleCallback
+{
+   /** The log */
+   private static final Logger log = Logger.getLogger(TestServiceControllerLifecycleCallback.class);
+
+   /** The mbean server */
+   private MBeanServer mbeanServer;
+
+   /** The service controller */
+   private ServiceControllerMBean serviceController;
+
+   public void setMbeanServer(MBeanServer mbeanServer)
+   {
+      this.mbeanServer = mbeanServer;
+   }
+
+   /**
+    * Set the serviceController.
+    *
+    * @param serviceController the serviceController.
+    */
+   public void setServiceController(ServiceControllerMBean serviceController)
+   {
+      this.serviceController = serviceController;
+   }
+
+   public void create() throws Exception
+   {
+      if (mbeanServer == null)
+         throw new IllegalArgumentException("No mbean server.");
+      if (serviceController == null)
+         throw new IllegalStateException("No service controller configured");
+   }
+
+   public void install(ControllerContext context) throws Exception
+   {
+      JMX jmx = readJmxAnnotation(context);
+      ObjectName objectName = createObjectName(context, jmx);
+
+      Class<?> intfClass = null;
+      boolean registerDirectly = false;
+      if (jmx != null)
+      {
+         intfClass = jmx.exposedInterface();
+         registerDirectly = jmx.registerDirectly();
+      }
+      Object mbean = (registerDirectly ? context.getTarget() : new StandardMBean(context.getTarget(), intfClass));
+      mbeanServer.registerMBean(mbean, objectName);
+      try
+      {
+         serviceController.start(objectName);
+      }
+      catch (Exception e)
+      {
+         try
+         {
+            mbeanServer.unregisterMBean(objectName);
+         }
+         catch (Exception t)
+         {
+            log.debug("Error unregistering mbean", t);
+         }
+         throw e;
+      }
+      log.debug("Registered MBean " + objectName);
+   }
+
+   public void uninstall(ControllerContext context) throws Exception
+   {
+      JMX jmx = readJmxAnnotation(context);
+      ObjectName objectName = createObjectName(context, jmx);
+
+      log.debug("Unregistering MBean " + objectName);
+      serviceController.destroy(objectName);
+   }
+
+   private JMX readJmxAnnotation(ControllerContext context) throws Exception
+   {
+      MetaData metaData = context.getScopeInfo().getMetaData();
+      if (metaData != null)
+         return metaData.getAnnotation(JMX.class);
+      return null;
+   }
+
+   private ObjectName createObjectName(ControllerContext context, JMX jmx) throws Exception
+   {
+      ObjectName objectName = null;
+      if (jmx != null)
+      {
+         String jmxName = jmx.name();
+         if (jmxName != null && jmxName.length() > 0)
+            objectName = new ObjectName(jmxName);
+      }
+
+      if (objectName == null)
+      {
+         // try to build one from the bean name
+         String name = (String) context.getName();
+
+         if (name.contains(":"))
+         {
+            objectName = new ObjectName(name);
+         }
+         else
+         {
+            objectName = new ObjectName("test:name='" + name + "'");
+         }
+      }
+
+      return objectName;
+   }
+}

Added: projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase.java
===================================================================
--- projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase.java	                        (rev 0)
+++ projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase.java	2009-03-16 12:53:44 UTC (rev 85924)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.system.controller.integration.test;
+
+import junit.framework.Test;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.jboss.test.system.controller.integration.support.MockTransactionManagerMBean;
+import org.jboss.test.system.controller.integration.support.MockUnifiedInvokerMBean;
+import org.jboss.system.microcontainer.ServiceControllerContext;
+
+/**
+ * JMXAnnotationPluginTestCase.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class JMXAnnotationPluginTestCase extends AbstractJMXAnnotationTest
+{
+   public static Test suite()
+   {
+      return suite(JMXAnnotationPluginTestCase.class);
+   }
+
+   public JMXAnnotationPluginTestCase(String name)
+   {
+      super(name);
+   }
+
+   public void testJMXAnnotationPlugin() throws Throwable
+   {
+      KernelDeployment deployment = deployMC(getBeansURL());
+
+      // getter
+      ControllerContext mbeanContext = getControllerContext("jboss:service=invoker,type=getter");
+      assertNotNull(mbeanContext);
+      assertInstanceOf(mbeanContext, ServiceControllerContext.class);
+      assertEquals(ControllerState.INSTALLED, mbeanContext.getState());
+      assertInstanceOf(MockUnifiedInvokerMBean.class, mbeanContext.getTarget());
+      // field
+      mbeanContext = getControllerContext("jboss:service=invoker,type=field");
+      assertNotNull(mbeanContext);
+      assertInstanceOf(mbeanContext, ServiceControllerContext.class);
+      assertEquals(ControllerState.INSTALLED, mbeanContext.getState());
+      assertInstanceOf(MockUnifiedInvokerMBean.class, mbeanContext.getTarget());
+
+      // getter
+      ControllerContext tmJMXContext = getControllerContext("jboss.pojo:attribute=tm,name='ExposeJMXAttribute'");
+      assertNotNull(tmJMXContext);
+      assertInstanceOf(tmJMXContext, ServiceControllerContext.class);
+      assertEquals(ControllerState.INSTALLED, tmJMXContext.getState());
+      assertInstanceOf(MockTransactionManagerMBean.class, tmJMXContext.getTarget());
+      // field
+      tmJMXContext = getControllerContext("jboss.pojo:attribute=tmField,name='ExposeJMXAttribute'");
+      assertNotNull(tmJMXContext);
+      assertInstanceOf(tmJMXContext, ServiceControllerContext.class);
+      assertEquals(ControllerState.INSTALLED, tmJMXContext.getState());
+      assertInstanceOf(MockTransactionManagerMBean.class, tmJMXContext.getTarget());
+
+      validate();
+      validateMC();
+
+      undeployMC(deployment);
+
+      assertNullControllerContext("ExposeJMXAttribute");
+      assertNullControllerContext("jboss:service=invoker,type=getter");
+      assertNullControllerContext("jboss:service=invoker,type=field");
+      assertNullControllerContext("jboss.pojo:name='ExposeJMXAttribute',attribute=tm");
+      assertNullControllerContext("jboss.pojo:name='ExposeJMXAttribute',attribute=tmField");
+   }
+}
\ No newline at end of file

Added: projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase.java
===================================================================
--- projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase.java	                        (rev 0)
+++ projects/microcontainer/trunk/jmx-aop-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase.java	2009-03-16 12:53:44 UTC (rev 85924)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.system.controller.integration.test;
+
+import junit.framework.Test;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.jboss.test.system.controller.integration.support.MockTransactionManagerMBean;
+import org.jboss.test.system.controller.integration.support.MockUnifiedInvokerMBean;
+import org.jboss.system.microcontainer.ServiceControllerContext;
+
+/**
+ * JMXAnnotationTestCase.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class JMXAnnotationTestCase extends AbstractJMXAnnotationTest
+{
+   public static Test suite()
+   {
+      return suite(JMXAnnotationTestCase.class);
+   }
+
+   public JMXAnnotationTestCase(String name)
+   {
+      super(name);
+   }
+
+   public void testJMXAnnotationDependency() throws Throwable
+   {
+      KernelDeployment deployment = deployMC(getBeansURL());
+
+      // mc
+      ControllerContext tmMCContext = getControllerContext("TransactionManager2");
+      assertNotNull(tmMCContext);
+      assertEquals(ControllerState.INSTALLED, tmMCContext.getState());
+      // jmx
+      ControllerContext tmJMXContext = getControllerContext("jboss:service=TransactionManager2");
+      assertNotNull(tmJMXContext);
+      assertInstanceOf(tmJMXContext, ServiceControllerContext.class);
+      assertEquals(ControllerState.INSTALLED, tmJMXContext.getState());
+      Object bean = tmMCContext.getTarget();
+
+      assertNotNull(bean);
+      assertInstanceOf(MockTransactionManagerMBean.class, bean);
+
+      ControllerContext mbeanContext = getControllerContext("jboss:service=invoker,type=unified");
+      assertNotNull(mbeanContext);
+      assertInstanceOf(mbeanContext, ServiceControllerContext.class);
+      assertEquals(ControllerState.INSTALLED, mbeanContext.getState());
+      Object mbean = mbeanContext.getTarget();
+      assertNotNull(mbean);
+      assertInstanceOf(MockUnifiedInvokerMBean.class, mbean);
+      
+      validate();
+      validateMC();
+
+      undeployMC(deployment);
+
+      assertNullControllerContext("TransactionManager2");
+      assertNullControllerContext("jboss:service=TransactionManager2");
+   }
+}

Added: projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase-beans.xml
===================================================================
--- projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase-beans.xml	                        (rev 0)
+++ projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase-beans.xml	2009-03-16 12:53:44 UTC (rev 85924)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <bean name="ExposeJMXAttribute" class="org.jboss.test.system.controller.integration.support.ExposeJMXAttribute" access-mode="ALL"/>
+
+</deployment>

Added: projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase-mc.xml
===================================================================
--- projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase-mc.xml	                        (rev 0)
+++ projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase-mc.xml	2009-03-16 12:53:44 UTC (rev 85924)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <!-- The legacy JMX kernel -->
+   <bean name="ServiceControllerLocator" class="org.jboss.test.system.controller.integration.support.ServiceControllerLocator" />
+
+   <bean name="ServiceLifecycle" class="org.jboss.test.system.controller.integration.support.TestServiceControllerLifecycleCallback">
+      <property name="mbeanServer">
+         <inject bean="ServiceControllerLocator" property="mbeanServer"/>
+      </property>
+      <property name="serviceController">
+         <inject bean="ServiceControllerLocator" property="serviceController"/>
+      </property>
+   </bean>
+
+   <bean name="ExposeJMXAttributeChecker" class="org.jboss.test.system.controller.integration.support.ExposeJMXAttributeChecker">
+     <constructor>
+       <parameter><inject bean="jboss.kernel:service=KernelController"/></parameter>
+       <parameter><inject bean="jboss.kernel:service=KernelRegistry"/></parameter>
+       <parameter><inject/></parameter>
+     </constructor>
+   </bean>
+
+   <bean name="AnnotationHandlerFactory">
+      <constructor factoryClass="org.jboss.kernel.plugins.annotations.BeanAnnotationAdapterFactory" factoryMethod="getInstance" />
+   </bean>
+   <bean name="AnnotationHandler">
+      <constructor factoryMethod="getBeanAnnotationAdapter">
+         <factory bean="AnnotationHandlerFactory"/>
+      </constructor>
+      <incallback method="addAnnotationPlugin" />
+      <uncallback method="removeAnnotationPlugin" />
+   </bean>
+   <bean name="JMXPropertyPlugin" class="org.jboss.system.microcontainer.jmx.JMXPropertyAnnotationPlugin" />
+   <bean name="JMXFieldPlugin" class="org.jboss.system.microcontainer.jmx.JMXFieldAnnotationPlugin" />
+
+</deployment>

Added: projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase-beans.xml
===================================================================
--- projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase-beans.xml	                        (rev 0)
+++ projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase-beans.xml	2009-03-16 12:53:44 UTC (rev 85924)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <bean name="TransactionManager2" class="org.jboss.test.system.controller.integration.support.MockTransactionManager">
+      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager2", exposedInterface=org.jboss.test.system.controller.integration.support.MockTransactionManagerMBean.class, registerDirectly=true)</annotation>
+      <property name="transactionTimeout">300</property>
+      <property name="objectStoreDir">${jboss.server.data.dir}/tx-object-store</property>
+      <install bean="ServiceLifecycle" method="install">
+         <parameter><inject fromContext="context"/></parameter>
+      </install>
+      <uninstall bean="ServiceLifecycle" method="uninstall">
+         <parameter><inject fromContext="context"/></parameter>
+      </uninstall>
+   </bean>
+
+</deployment>

Added: projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase-mc.xml
===================================================================
--- projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase-mc.xml	                        (rev 0)
+++ projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase-mc.xml	2009-03-16 12:53:44 UTC (rev 85924)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <!-- The legacy JMX kernel -->
+   <bean name="ServiceControllerLocator" class="org.jboss.test.system.controller.integration.support.ServiceControllerLocator" />
+
+   <bean name="ServiceLifecycle" class="org.jboss.test.system.controller.integration.support.TestServiceControllerLifecycleCallback">
+      <property name="mbeanServer">
+         <inject bean="ServiceControllerLocator" property="mbeanServer"/>
+      </property>
+      <property name="serviceController">
+         <inject bean="ServiceControllerLocator" property="serviceController"/>
+      </property>
+   </bean>
+
+   <bean name="TransactionManager" class="org.jboss.test.system.controller.integration.support.MockTransactionManager">
+      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager", exposedInterface=org.jboss.test.system.controller.integration.support.MockTransactionManagerMBean.class, registerDirectly=true)</annotation>
+      <property name="transactionTimeout">300</property>
+      <property name="objectStoreDir">${jboss.server.data.dir}/tx-object-store</property>
+      <install bean="ServiceLifecycle" method="install">
+         <parameter><inject fromContext="context"/></parameter>
+      </install>
+      <uninstall bean="ServiceLifecycle" method="uninstall">
+         <parameter><inject fromContext="context"/></parameter>
+      </uninstall>
+   </bean>
+
+</deployment>

Added: projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase.xml
===================================================================
--- projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase.xml	                        (rev 0)
+++ projects/microcontainer/trunk/jmx-aop-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase.xml	2009-03-16 12:53:44 UTC (rev 85924)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+   <mbean code="org.jboss.test.system.controller.integration.support.MockUnifiedInvoker" name="jboss:service=invoker,type=unified">
+      <depends>jboss:service=TransactionManager</depends>
+   </mbean>
+</server>
\ No newline at end of file

Modified: projects/microcontainer/trunk/jmx-mc-int/.classpath
===================================================================
--- projects/microcontainer/trunk/jmx-mc-int/.classpath	2009-03-16 12:49:57 UTC (rev 85923)
+++ projects/microcontainer/trunk/jmx-mc-int/.classpath	2009-03-16 12:53:44 UTC (rev 85924)
@@ -12,10 +12,7 @@
   <classpathentry kind="var" path="M2_REPO/oswego-concurrent/concurrent/1.3.4-jboss-update1/concurrent-1.3.4-jboss-update1.jar" sourcepath="M2_REPO/oswego-concurrent/concurrent/1.3.4-jboss-update1/concurrent-1.3.4-jboss-update1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/wutka-dtdparser/dtdparser121/1.2.1/dtdparser121-1.2.1.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/aop/jboss-aop/2.0.0.SP1/jboss-aop-2.0.0.SP1.jar" sourcepath="M2_REPO/org/jboss/aop/jboss-aop/2.0.0.SP1/jboss-aop-2.0.0.SP1-sources.jar"/>
-  <classpathentry kind="src" path="/jboss-aop-mc-int"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-classloading-spi/6.0.0.Alpha4/jboss-classloading-spi-6.0.0.Alpha4.jar" sourcepath="M2_REPO/org/jboss/integration/jboss-classloading-spi/6.0.0.Alpha4/jboss-classloading-spi-6.0.0.Alpha4-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.10.GA/jboss-common-core-2.2.10.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.10.GA/jboss-common-core-2.2.10.GA-sources.jar"/>
   <classpathentry kind="src" path="/jboss-dependency"/>
@@ -36,9 +33,6 @@
   <classpathentry kind="var" path="M2_REPO/org/jboss/jbossxb/2.0.0.GA/jbossxb-2.0.0.GA.jar" sourcepath="M2_REPO/org/jboss/jbossxb/2.0.0.GA/jbossxb-2.0.0.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"/>
-  <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/qdox/qdox/1.6.1/qdox-1.6.1.jar" sourcepath="M2_REPO/qdox/qdox/1.6.1/qdox-1.6.1-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/trove/trove/2.1.1/trove-2.1.1.jar"/>
   <classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
   <classpathentry kind="var" path="M2_REPO/apache-xerces/xml-apis/2.9.1/xml-apis-2.9.1.jar"/>
 </classpath>
\ No newline at end of file

Modified: projects/microcontainer/trunk/jmx-mc-int/.project
===================================================================
--- projects/microcontainer/trunk/jmx-mc-int/.project	2009-03-16 12:49:57 UTC (rev 85923)
+++ projects/microcontainer/trunk/jmx-mc-int/.project	2009-03-16 12:53:44 UTC (rev 85924)
@@ -2,7 +2,6 @@
   <name>jboss-jmx-mc-int</name>
   <comment>JBoss Microcontainer JMX Integration</comment>
   <projects>
-    <project>jboss-aop-mc-int</project>
     <project>jboss-dependency</project>
     <project>jboss-kernel</project>
   </projects>
@@ -14,4 +13,4 @@
   <natures>
     <nature>org.eclipse.jdt.core.javanature</nature>
   </natures>
-</projectDescription>
+</projectDescription>
\ No newline at end of file

Modified: projects/microcontainer/trunk/jmx-mc-int/pom.xml
===================================================================
--- projects/microcontainer/trunk/jmx-mc-int/pom.xml	2009-03-16 12:49:57 UTC (rev 85923)
+++ projects/microcontainer/trunk/jmx-mc-int/pom.xml	2009-03-16 12:53:44 UTC (rev 85924)
@@ -5,7 +5,7 @@
     <version>2.2.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
-  <artifactId>jmx-mc-int</artifactId>
+  <artifactId>jboss-jmx-mc-int</artifactId>
   <packaging>jar</packaging>
   <name>JBoss Microcontainer JMX Integration</name>
   <url>http://www.jboss.com/products/jbossmc</url>
@@ -14,6 +14,17 @@
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>test-jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <!--configuration>
           <testFailureIgnore>true</testFailureIgnore>
@@ -47,10 +58,6 @@
       <artifactId>jboss-kernel</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.jboss.microcontainer</groupId>
-      <artifactId>jboss-aop-mc-int</artifactId>
-    </dependency>
-    <dependency>
       <groupId>org.jboss.mx</groupId>
       <artifactId>jboss-jmx</artifactId>
     </dependency>

Deleted: projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/ExposeJMXAttribute.java
===================================================================
--- projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/ExposeJMXAttribute.java	2009-03-16 12:49:57 UTC (rev 85923)
+++ projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/ExposeJMXAttribute.java	2009-03-16 12:53:44 UTC (rev 85924)
@@ -1,58 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.system.controller.integration.support;
-
-import org.jboss.aop.microcontainer.aspects.jmx.JMX;
-
-/**
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-public class ExposeJMXAttribute
-{
-   private MockUnifiedInvokerMBean invoker = new MockUnifiedInvoker();
-   private MockTransactionManagerMBean tm = new MockTransactionManager();
-
-   @JMX(exposedInterface = void.class, name="jboss:service=invoker,type=field", registerDirectly = true) private MockUnifiedInvokerMBean invokerField = new MockUnifiedInvoker();
-   @JMX(exposedInterface = void.class, registerDirectly = true) private MockTransactionManagerMBean tmField = new MockTransactionManager();
-
-   @JMX(exposedInterface = void.class, name="jboss:service=invoker,type=getter", registerDirectly = true)
-   public MockUnifiedInvokerMBean getInvoker()
-   {
-      return invoker;
-   }
-
-   public void setInvoker(MockUnifiedInvokerMBean invoker)
-   {
-      this.invoker = invoker;
-   }
-
-   @JMX(exposedInterface = void.class, registerDirectly = true)
-   public MockTransactionManagerMBean getTm()
-   {
-      return tm;
-   }
-
-   public void setTm(MockTransactionManagerMBean tm)
-   {
-      this.tm = tm;
-   }
-}
\ No newline at end of file

Deleted: projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/ExposeJMXAttributeChecker.java
===================================================================
--- projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/ExposeJMXAttributeChecker.java	2009-03-16 12:49:57 UTC (rev 85923)
+++ projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/ExposeJMXAttributeChecker.java	2009-03-16 12:53:44 UTC (rev 85924)
@@ -1,131 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.system.controller.integration.support;
-
-import org.jboss.aop.microcontainer.aspects.jmx.JMX;
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.dependency.spi.LifecycleCallbackItem;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.dependency.spi.DependencyInfo;
-import org.jboss.kernel.spi.dependency.KernelController;
-import org.jboss.kernel.spi.event.KernelEvent;
-import org.jboss.kernel.spi.event.KernelEventEmitter;
-import org.jboss.kernel.spi.event.KernelEventListener;
-import org.jboss.metadata.spi.MetaData;
-
-/**
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-public class ExposeJMXAttributeChecker implements KernelEventListener
-{
-   private KernelController controller;
-   private KernelEventEmitter emitter;
-   private TestServiceControllerLifecycleCallback service;
-
-   public ExposeJMXAttributeChecker(
-         KernelController controller,
-         KernelEventEmitter emitter,
-         TestServiceControllerLifecycleCallback service)
-   {
-      this.controller = controller;
-      this.emitter = emitter;
-      this.service = service;
-   }
-
-   public void create() throws Throwable
-   {
-      emitter.registerListener(this, null, null);
-   }
-
-   public void destroy() throws Throwable
-   {
-      emitter.unregisterListener(this, null, null);
-   }
-
-   @SuppressWarnings("deprecation")
-   public void onEvent(KernelEvent event, Object o)
-   {
-      try
-      {
-         if (org.jboss.kernel.spi.registry.KernelRegistry.KERNEL_REGISTRY_REGISTERED.equals(event.getType()))
-         {
-            ControllerContext context = controller.getContext(event.getContext(), null);
-            addControllerContext(context);
-         }
-      }
-      catch (Throwable ignored)
-      {
-      }
-   }
-
-   private JMX readJmxAnnotation(ControllerContext context) throws Exception
-   {
-      MetaData metaData = context.getScopeInfo().getMetaData();
-      if (metaData != null)
-         return metaData.getAnnotation(JMX.class);
-      return null;
-   }
-
-   public void addControllerContext(ControllerContext context) throws Throwable
-   {
-      JMX jmx = readJmxAnnotation(context);
-      if (jmx != null)
-      {
-         DependencyInfo info = context.getDependencyInfo();
-         info.addLifecycleCallback(new ServiceLifecycleCallback());
-      }
-   }
-
-   private class ServiceLifecycleCallback implements LifecycleCallbackItem
-   {
-      public Object getBean()
-      {
-         return null;
-      }
-
-      public ControllerState getWhenRequired()
-      {
-         return ControllerState.INSTALLED;
-      }
-
-      public ControllerState getDependentState()
-      {
-         return ControllerState.INSTALLED;
-      }
-
-      public void install(ControllerContext ctx) throws Exception
-      {
-         service.install(ctx);
-      }
-
-      public void uninstall(ControllerContext ctx)
-      {
-         try
-         {
-            service.uninstall(ctx);
-         }
-         catch (Exception ignored)
-         {
-         }
-      }
-   }
-}
\ No newline at end of file

Deleted: projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/TestServiceControllerLifecycleCallback.java
===================================================================
--- projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/TestServiceControllerLifecycleCallback.java	2009-03-16 12:49:57 UTC (rev 85923)
+++ projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/support/TestServiceControllerLifecycleCallback.java	2009-03-16 12:53:44 UTC (rev 85924)
@@ -1,148 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.system.controller.integration.support;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.management.StandardMBean;
-
-import org.jboss.aop.microcontainer.aspects.jmx.JMX;
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.spi.MetaData;
-import org.jboss.system.ServiceControllerMBean;
-
-/**
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-public class TestServiceControllerLifecycleCallback
-{
-   /** The log */
-   private static final Logger log = Logger.getLogger(TestServiceControllerLifecycleCallback.class);
-
-   /** The mbean server */
-   private MBeanServer mbeanServer;
-
-   /** The service controller */
-   private ServiceControllerMBean serviceController;
-
-   public void setMbeanServer(MBeanServer mbeanServer)
-   {
-      this.mbeanServer = mbeanServer;
-   }
-
-   /**
-    * Set the serviceController.
-    *
-    * @param serviceController the serviceController.
-    */
-   public void setServiceController(ServiceControllerMBean serviceController)
-   {
-      this.serviceController = serviceController;
-   }
-
-   public void create() throws Exception
-   {
-      if (mbeanServer == null)
-         throw new IllegalArgumentException("No mbean server.");
-      if (serviceController == null)
-         throw new IllegalStateException("No service controller configured");
-   }
-
-   public void install(ControllerContext context) throws Exception
-   {
-      JMX jmx = readJmxAnnotation(context);
-      ObjectName objectName = createObjectName(context, jmx);
-
-      Class<?> intfClass = null;
-      boolean registerDirectly = false;
-      if (jmx != null)
-      {
-         intfClass = jmx.exposedInterface();
-         registerDirectly = jmx.registerDirectly();
-      }
-      Object mbean = (registerDirectly ? context.getTarget() : new StandardMBean(context.getTarget(), intfClass));
-      mbeanServer.registerMBean(mbean, objectName);
-      try
-      {
-         serviceController.start(objectName);
-      }
-      catch (Exception e)
-      {
-         try
-         {
-            mbeanServer.unregisterMBean(objectName);
-         }
-         catch (Exception t)
-         {
-            log.debug("Error unregistering mbean", t);
-         }
-         throw e;
-      }
-      log.debug("Registered MBean " + objectName);
-   }
-
-   public void uninstall(ControllerContext context) throws Exception
-   {
-      JMX jmx = readJmxAnnotation(context);
-      ObjectName objectName = createObjectName(context, jmx);
-
-      log.debug("Unregistering MBean " + objectName);
-      serviceController.destroy(objectName);
-   }
-
-   private JMX readJmxAnnotation(ControllerContext context) throws Exception
-   {
-      MetaData metaData = context.getScopeInfo().getMetaData();
-      if (metaData != null)
-         return metaData.getAnnotation(JMX.class);
-      return null;
-   }
-
-   private ObjectName createObjectName(ControllerContext context, JMX jmx) throws Exception
-   {
-      ObjectName objectName = null;
-      if (jmx != null)
-      {
-         String jmxName = jmx.name();
-         if (jmxName != null && jmxName.length() > 0)
-            objectName = new ObjectName(jmxName);
-      }
-
-      if (objectName == null)
-      {
-         // try to build one from the bean name
-         String name = (String) context.getName();
-
-         if (name.contains(":"))
-         {
-            objectName = new ObjectName(name);
-         }
-         else
-         {
-            objectName = new ObjectName("test:name='" + name + "'");
-         }
-      }
-
-      return objectName;
-   }
-}

Modified: projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/IntegrationTestSuite.java
===================================================================
--- projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/IntegrationTestSuite.java	2009-03-16 12:49:57 UTC (rev 85923)
+++ projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/IntegrationTestSuite.java	2009-03-16 12:53:44 UTC (rev 85924)
@@ -52,8 +52,6 @@
       suite.addTest(ConfigureJMXFromMCBadObjectNameUnitTestCase.suite());
       suite.addTest(MCDependsJMXUnitTestCase.suite());
       suite.addTest(JMXDependsMCUnitTestCase.suite());
-      suite.addTest(JMXAnnotationTestCase.suite());
-      suite.addTest(JMXAnnotationPluginTestCase.suite());
 
       return suite;
    }

Deleted: projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase.java
===================================================================
--- projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase.java	2009-03-16 12:49:57 UTC (rev 85923)
+++ projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase.java	2009-03-16 12:53:44 UTC (rev 85924)
@@ -1,90 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.system.controller.integration.test;
-
-import junit.framework.Test;
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.kernel.spi.deployment.KernelDeployment;
-import org.jboss.test.system.controller.integration.support.MockTransactionManagerMBean;
-import org.jboss.test.system.controller.integration.support.MockUnifiedInvokerMBean;
-import org.jboss.system.microcontainer.ServiceControllerContext;
-
-/**
- * JMXAnnotationPluginTestCase.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class JMXAnnotationPluginTestCase extends AbstractJMXAnnotationTest
-{
-   public static Test suite()
-   {
-      return suite(JMXAnnotationPluginTestCase.class);
-   }
-
-   public JMXAnnotationPluginTestCase(String name)
-   {
-      super(name);
-   }
-
-   public void testJMXAnnotationPlugin() throws Throwable
-   {
-      KernelDeployment deployment = deployMC(getBeansURL());
-
-      // getter
-      ControllerContext mbeanContext = getControllerContext("jboss:service=invoker,type=getter");
-      assertNotNull(mbeanContext);
-      assertInstanceOf(mbeanContext, ServiceControllerContext.class);
-      assertEquals(ControllerState.INSTALLED, mbeanContext.getState());
-      assertInstanceOf(MockUnifiedInvokerMBean.class, mbeanContext.getTarget());
-      // field
-      mbeanContext = getControllerContext("jboss:service=invoker,type=field");
-      assertNotNull(mbeanContext);
-      assertInstanceOf(mbeanContext, ServiceControllerContext.class);
-      assertEquals(ControllerState.INSTALLED, mbeanContext.getState());
-      assertInstanceOf(MockUnifiedInvokerMBean.class, mbeanContext.getTarget());
-
-      // getter
-      ControllerContext tmJMXContext = getControllerContext("jboss.pojo:attribute=tm,name='ExposeJMXAttribute'");
-      assertNotNull(tmJMXContext);
-      assertInstanceOf(tmJMXContext, ServiceControllerContext.class);
-      assertEquals(ControllerState.INSTALLED, tmJMXContext.getState());
-      assertInstanceOf(MockTransactionManagerMBean.class, tmJMXContext.getTarget());
-      // field
-      tmJMXContext = getControllerContext("jboss.pojo:attribute=tmField,name='ExposeJMXAttribute'");
-      assertNotNull(tmJMXContext);
-      assertInstanceOf(tmJMXContext, ServiceControllerContext.class);
-      assertEquals(ControllerState.INSTALLED, tmJMXContext.getState());
-      assertInstanceOf(MockTransactionManagerMBean.class, tmJMXContext.getTarget());
-
-      validate();
-      validateMC();
-
-      undeployMC(deployment);
-
-      assertNullControllerContext("ExposeJMXAttribute");
-      assertNullControllerContext("jboss:service=invoker,type=getter");
-      assertNullControllerContext("jboss:service=invoker,type=field");
-      assertNullControllerContext("jboss.pojo:name='ExposeJMXAttribute',attribute=tm");
-      assertNullControllerContext("jboss.pojo:name='ExposeJMXAttribute',attribute=tmField");
-   }
-}
\ No newline at end of file

Deleted: projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase.java
===================================================================
--- projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase.java	2009-03-16 12:49:57 UTC (rev 85923)
+++ projects/microcontainer/trunk/jmx-mc-int/src/test/java/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase.java	2009-03-16 12:53:44 UTC (rev 85924)
@@ -1,83 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.system.controller.integration.test;
-
-import junit.framework.Test;
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.kernel.spi.deployment.KernelDeployment;
-import org.jboss.test.system.controller.integration.support.MockTransactionManagerMBean;
-import org.jboss.test.system.controller.integration.support.MockUnifiedInvokerMBean;
-import org.jboss.system.microcontainer.ServiceControllerContext;
-
-/**
- * JMXAnnotationTestCase.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class JMXAnnotationTestCase extends AbstractJMXAnnotationTest
-{
-   public static Test suite()
-   {
-      return suite(JMXAnnotationTestCase.class);
-   }
-
-   public JMXAnnotationTestCase(String name)
-   {
-      super(name);
-   }
-
-   public void testJMXAnnotationDependency() throws Throwable
-   {
-      KernelDeployment deployment = deployMC(getBeansURL());
-
-      // mc
-      ControllerContext tmMCContext = getControllerContext("TransactionManager2");
-      assertNotNull(tmMCContext);
-      assertEquals(ControllerState.INSTALLED, tmMCContext.getState());
-      // jmx
-      ControllerContext tmJMXContext = getControllerContext("jboss:service=TransactionManager2");
-      assertNotNull(tmJMXContext);
-      assertInstanceOf(tmJMXContext, ServiceControllerContext.class);
-      assertEquals(ControllerState.INSTALLED, tmJMXContext.getState());
-      Object bean = tmMCContext.getTarget();
-
-      assertNotNull(bean);
-      assertInstanceOf(MockTransactionManagerMBean.class, bean);
-
-      ControllerContext mbeanContext = getControllerContext("jboss:service=invoker,type=unified");
-      assertNotNull(mbeanContext);
-      assertInstanceOf(mbeanContext, ServiceControllerContext.class);
-      assertEquals(ControllerState.INSTALLED, mbeanContext.getState());
-      Object mbean = mbeanContext.getTarget();
-      assertNotNull(mbean);
-      assertInstanceOf(MockUnifiedInvokerMBean.class, mbean);
-      
-      validate();
-      validateMC();
-
-      undeployMC(deployment);
-
-      assertNullControllerContext("TransactionManager2");
-      assertNullControllerContext("jboss:service=TransactionManager2");
-   }
-}

Deleted: projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase-beans.xml
===================================================================
--- projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase-beans.xml	2009-03-16 12:49:57 UTC (rev 85923)
+++ projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase-beans.xml	2009-03-16 12:53:44 UTC (rev 85924)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
-   <bean name="ExposeJMXAttribute" class="org.jboss.test.system.controller.integration.support.ExposeJMXAttribute" access-mode="ALL"/>
-
-</deployment>

Deleted: projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase-mc.xml
===================================================================
--- projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase-mc.xml	2009-03-16 12:49:57 UTC (rev 85923)
+++ projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationPluginTestCase-mc.xml	2009-03-16 12:53:44 UTC (rev 85924)
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
-   <!-- The legacy JMX kernel -->
-   <bean name="ServiceControllerLocator" class="org.jboss.test.system.controller.integration.support.ServiceControllerLocator" />
-
-   <bean name="ServiceLifecycle" class="org.jboss.test.system.controller.integration.support.TestServiceControllerLifecycleCallback">
-      <property name="mbeanServer">
-         <inject bean="ServiceControllerLocator" property="mbeanServer"/>
-      </property>
-      <property name="serviceController">
-         <inject bean="ServiceControllerLocator" property="serviceController"/>
-      </property>
-   </bean>
-
-   <bean name="ExposeJMXAttributeChecker" class="org.jboss.test.system.controller.integration.support.ExposeJMXAttributeChecker">
-     <constructor>
-       <parameter><inject bean="jboss.kernel:service=KernelController"/></parameter>
-       <parameter><inject bean="jboss.kernel:service=KernelRegistry"/></parameter>
-       <parameter><inject/></parameter>
-     </constructor>
-   </bean>
-
-   <bean name="AnnotationHandlerFactory">
-      <constructor factoryClass="org.jboss.kernel.plugins.annotations.BeanAnnotationAdapterFactory" factoryMethod="getInstance" />
-   </bean>
-   <bean name="AnnotationHandler">
-      <constructor factoryMethod="getBeanAnnotationAdapter">
-         <factory bean="AnnotationHandlerFactory"/>
-      </constructor>
-      <incallback method="addAnnotationPlugin" />
-      <uncallback method="removeAnnotationPlugin" />
-   </bean>
-   <bean name="JMXPropertyPlugin" class="org.jboss.system.microcontainer.jmx.JMXPropertyAnnotationPlugin" />
-   <bean name="JMXFieldPlugin" class="org.jboss.system.microcontainer.jmx.JMXFieldAnnotationPlugin" />
-
-</deployment>

Deleted: projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase-beans.xml
===================================================================
--- projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase-beans.xml	2009-03-16 12:49:57 UTC (rev 85923)
+++ projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase-beans.xml	2009-03-16 12:53:44 UTC (rev 85924)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
-   <bean name="TransactionManager2" class="org.jboss.test.system.controller.integration.support.MockTransactionManager">
-      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager2", exposedInterface=org.jboss.test.system.controller.integration.support.MockTransactionManagerMBean.class, registerDirectly=true)</annotation>
-      <property name="transactionTimeout">300</property>
-      <property name="objectStoreDir">${jboss.server.data.dir}/tx-object-store</property>
-      <install bean="ServiceLifecycle" method="install">
-         <parameter><inject fromContext="context"/></parameter>
-      </install>
-      <uninstall bean="ServiceLifecycle" method="uninstall">
-         <parameter><inject fromContext="context"/></parameter>
-      </uninstall>
-   </bean>
-
-</deployment>

Deleted: projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase-mc.xml
===================================================================
--- projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase-mc.xml	2009-03-16 12:49:57 UTC (rev 85923)
+++ projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase-mc.xml	2009-03-16 12:53:44 UTC (rev 85924)
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
-   <!-- The legacy JMX kernel -->
-   <bean name="ServiceControllerLocator" class="org.jboss.test.system.controller.integration.support.ServiceControllerLocator" />
-
-   <bean name="ServiceLifecycle" class="org.jboss.test.system.controller.integration.support.TestServiceControllerLifecycleCallback">
-      <property name="mbeanServer">
-         <inject bean="ServiceControllerLocator" property="mbeanServer"/>
-      </property>
-      <property name="serviceController">
-         <inject bean="ServiceControllerLocator" property="serviceController"/>
-      </property>
-   </bean>
-
-   <bean name="TransactionManager" class="org.jboss.test.system.controller.integration.support.MockTransactionManager">
-      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager", exposedInterface=org.jboss.test.system.controller.integration.support.MockTransactionManagerMBean.class, registerDirectly=true)</annotation>
-      <property name="transactionTimeout">300</property>
-      <property name="objectStoreDir">${jboss.server.data.dir}/tx-object-store</property>
-      <install bean="ServiceLifecycle" method="install">
-         <parameter><inject fromContext="context"/></parameter>
-      </install>
-      <uninstall bean="ServiceLifecycle" method="uninstall">
-         <parameter><inject fromContext="context"/></parameter>
-      </uninstall>
-   </bean>
-
-</deployment>

Deleted: projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase.xml
===================================================================
--- projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase.xml	2009-03-16 12:49:57 UTC (rev 85923)
+++ projects/microcontainer/trunk/jmx-mc-int/src/test/resources/org/jboss/test/system/controller/integration/test/JMXAnnotationTestCase.xml	2009-03-16 12:53:44 UTC (rev 85924)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<server>
-   <mbean code="org.jboss.test.system.controller.integration.support.MockUnifiedInvoker" name="jboss:service=invoker,type=unified">
-      <depends>jboss:service=TransactionManager</depends>
-   </mbean>
-</server>
\ No newline at end of file

Modified: projects/microcontainer/trunk/pom.xml
===================================================================
--- projects/microcontainer/trunk/pom.xml	2009-03-16 12:49:57 UTC (rev 85923)
+++ projects/microcontainer/trunk/pom.xml	2009-03-16 12:53:44 UTC (rev 85924)
@@ -26,6 +26,7 @@
     <module>kernel</module>
     <module>jmx-mc-int</module>
     <module>aop-mc-int</module>
+    <module>jmx-aop-mc-int</module>
     <module>spring-int</module>
     <module>guice-int</module>
     <module>build</module>
@@ -197,11 +198,18 @@
       </dependency>
       <dependency>
         <groupId>org.jboss.microcontainer</groupId>
-        <artifactId>jmx-mc-int</artifactId>
+        <artifactId>jboss-jmx-mc-int</artifactId>
         <version>${project.version}</version>
       </dependency>
       <dependency>
         <groupId>org.jboss.microcontainer</groupId>
+        <artifactId>jboss-jmx-mc-int</artifactId>
+        <version>${project.version}</version>
+        <type>test-jar</type>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.microcontainer</groupId>
         <artifactId>jboss-spring-int</artifactId>
         <version>${project.version}</version>
       </dependency>




More information about the jboss-cvs-commits mailing list