[jboss-cvs] JBossAS SVN: r88865 - in projects/jbossmx/trunk: jmx and 11 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu May 14 08:26:46 EDT 2009


Author: adrian at jboss.org
Date: 2009-05-14 08:26:46 -0400 (Thu, 14 May 2009)
New Revision: 88865

Added:
   projects/jbossmx/trunk/jmx-annotations/
   projects/jbossmx/trunk/jmx-annotations/.classpath
   projects/jbossmx/trunk/jmx-annotations/.project
   projects/jbossmx/trunk/jmx-annotations/.settings/
   projects/jbossmx/trunk/jmx-annotations/.settings/org.eclipse.jdt.core.prefs
   projects/jbossmx/trunk/jmx-annotations/pom.xml
   projects/jbossmx/trunk/jmx-annotations/src/
   projects/jbossmx/trunk/jmx-annotations/src/main/
   projects/jbossmx/trunk/jmx-annotations/src/main/java/
   projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/
   projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/
   projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/Description.java
   projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/DescriptorFields.java
   projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/DescriptorKey.java
   projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/Impact.java
   projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/MBean.java
   projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/MXBean.java
   projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/ManagedAttribute.java
   projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/ManagedOperation.java
   projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/NotificationInfo.java
   projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/NotificationInfos.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/AnnotationsTEST.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedConstructorDescription.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedConstructorParameter.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedConstructorParameterDescription.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimple.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleDescription.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetter.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterDescription.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterIs.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterSetter.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterSetterNeitherAnnotated.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterSetterNotAnnotated.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleNotification.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleNotificationDescription.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleNotificationName.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperation.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationDescription.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationImpact.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationNotAnnotated.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationParameter.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationParameterDescription.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationReturnType.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleSetter.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleSetterDescription.java
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleSetterGetterNotAnnotated.java
Modified:
   projects/jbossmx/trunk/jmx/.classpath
   projects/jbossmx/trunk/jmx/.project
   projects/jbossmx/trunk/jmx/pom.xml
   projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/StandardSUITE.java
   projects/jbossmx/trunk/mbeans/.classpath
   projects/jbossmx/trunk/mbeans/.project
   projects/jbossmx/trunk/mbeans/pom.xml
   projects/jbossmx/trunk/mbeans/src/main/org/jboss/mx/metadata/MBeanCapability.java
   projects/jbossmx/trunk/mbeans/src/main/org/jboss/mx/metadata/StandardMetaData.java
   projects/jbossmx/trunk/pom.xml
Log:
{JBMX-13] - Prototype of @MBean handling in XMBean

Modified: projects/jbossmx/trunk/jmx/.classpath
===================================================================
--- projects/jbossmx/trunk/jmx/.classpath	2009-05-14 12:23:58 UTC (rev 88864)
+++ projects/jbossmx/trunk/jmx/.classpath	2009-05-14 12:26:46 UTC (rev 88865)
@@ -15,6 +15,7 @@
   <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-j2se"/>
+  <classpathentry kind="src" path="/jboss-jmx-annotations"/>
   <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="src" path="/jboss-mbeans"/>

Modified: projects/jbossmx/trunk/jmx/.project
===================================================================
--- projects/jbossmx/trunk/jmx/.project	2009-05-14 12:23:58 UTC (rev 88864)
+++ projects/jbossmx/trunk/jmx/.project	2009-05-14 12:26:46 UTC (rev 88865)
@@ -3,6 +3,7 @@
   <comment>JBosMX (jmx module)</comment>
   <projects>
     <project>jboss-j2se</project>
+    <project>jboss-jmx-annotations</project>
     <project>jboss-mbeans</project>
   </projects>
   <buildSpec>

Modified: projects/jbossmx/trunk/jmx/pom.xml
===================================================================
--- projects/jbossmx/trunk/jmx/pom.xml	2009-05-14 12:23:58 UTC (rev 88864)
+++ projects/jbossmx/trunk/jmx/pom.xml	2009-05-14 12:26:46 UTC (rev 88865)
@@ -43,6 +43,10 @@
       <artifactId>jboss-mbeans</artifactId>
     </dependency>
     <dependency>
+      <groupId>org.jboss.mx</groupId>
+      <artifactId>jboss-jmx-annotations</artifactId>
+    </dependency>
+    <dependency>
       <groupId>org.jboss.test</groupId>
       <artifactId>jboss-test</artifactId>
     </dependency>

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/AnnotationsTEST.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/AnnotationsTEST.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/AnnotationsTEST.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,609 @@
+/*
+ * 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.jmx.compliance.standard;
+
+import java.util.Arrays;
+
+import javax.management.MBeanAttributeInfo;
+import javax.management.MBeanConstructorInfo;
+import javax.management.MBeanInfo;
+import javax.management.MBeanNotificationInfo;
+import javax.management.MBeanOperationInfo;
+import javax.management.MBeanParameterInfo;
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+import javax.management.MBeanServerNotification;
+import javax.management.Notification;
+import javax.management.ObjectName;
+
+import junit.framework.Test;
+
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedConstructorDescription;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedConstructorParameter;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedConstructorParameterDescription;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimple;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleDescription;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleGetter;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleGetterDescription;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleGetterIs;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleGetterSetter;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleGetterSetterNeitherAnnotated;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleGetterSetterNotAnnotated;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleNotification;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleNotificationDescription;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleNotificationName;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleOperation;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleOperationDescription;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleOperationImpact;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleOperationNotAnnotated;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleOperationParameter;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleOperationParameterDescription;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleOperationReturnType;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleSetter;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleSetterDescription;
+import org.jboss.test.jmx.compliance.standard.support.AnnotatedSimpleSetterGetterNotAnnotated;
+
+import test.JBossMXTest;
+
+/**
+ * AnnotationsTEST.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class AnnotationsTEST extends JBossMXTest
+{
+   public static Test suite()
+   {
+      return suite(AnnotationsTEST.class);
+   }
+
+   public AnnotationsTEST(String s)
+   {
+      super(s);
+   }
+
+   public void testSimple() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimple();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertNoOperations(info);
+   }
+
+   public void testMBeanDescription() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleDescription();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Simple Description");
+      assertNoOperations(info);
+      assertNoAttributes(info);
+      assertNoNotifications(info);
+   }
+
+   public void testDefaultConstructor() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimple();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      assertNoOperations(info);
+      assertNoAttributes(info);
+      assertNoNotifications(info);
+   }
+
+   public void testConstructorDescription() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedConstructorDescription();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "Constructor Description");
+      assertNoOperations(info);
+      assertNoAttributes(info);
+      assertNoNotifications(info);
+   }
+
+   public void testConstructorParameter() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedConstructorParameter("hello");
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      MBeanParameterInfo p0 = new MBeanParameterInfo("p0", "java.lang.String", "p0");
+      assertConstructor(info, "MBean Constructor.", p0);
+      assertNoOperations(info);
+      assertNoAttributes(info);
+      assertNoNotifications(info);
+   }
+
+   public void testConstructorParameterDescription() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedConstructorParameterDescription("hello");
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      MBeanParameterInfo p0 = new MBeanParameterInfo("p0", "java.lang.String", "Parameter Description");
+      assertConstructor(info, "MBean Constructor.", p0);
+      assertNoOperations(info);
+      assertNoAttributes(info);
+      assertNoNotifications(info);
+   }
+
+   public void testSimpleOperationNotAnnotated() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleOperationNotAnnotated();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      assertNoOperations(info);
+      assertNoAttributes(info);
+      assertNoNotifications(info);
+   }
+
+   public void testSimpleOperation() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleOperation();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      assertOperation(info, "MBean Operation.", "doSomething", "void");
+      assertNoAttributes(info);
+      assertNoNotifications(info);
+   }
+
+   public void testSimpleOperationDescription() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleOperationDescription();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      assertOperation(info, "Operation Description", "doSomething", "void");
+      assertNoAttributes(info);
+      assertNoNotifications(info);
+   }
+
+   public void testSimpleOperationReturnType() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleOperationReturnType();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      assertOperation(info, "MBean Operation.", "doSomething", "java.lang.Integer");
+      assertNoAttributes(info);
+      assertNoNotifications(info);
+   }
+
+   public void testSimpleOperationParameter() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleOperationParameter();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      MBeanParameterInfo p0 = new MBeanParameterInfo("p0", "java.lang.String", "p0");
+      assertOperation(info, "MBean Operation.", "doSomething", "void", p0);
+      assertNoAttributes(info);
+      assertNoNotifications(info);
+   }
+
+   public void testSimpleOperationParameterDescription() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleOperationParameterDescription();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      MBeanParameterInfo p0 = new MBeanParameterInfo("p0", "java.lang.String", "Parameter Description");
+      assertOperation(info, "MBean Operation.", "doSomething", "void", p0);
+      assertNoAttributes(info);
+      assertNoNotifications(info);
+   }
+
+   public void testSimpleOperationImpact() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleOperationImpact();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      assertOperation(info, "MBean Operation.", MBeanOperationInfo.ACTION, "doSomething", "void");
+      assertNoAttributes(info);
+      assertNoNotifications(info);
+   }
+
+   public void testSimpleGetter() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleGetter();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      assertNoOperations(info);
+      assertAttribute(info, "MBean Attribute.", "Something", "java.lang.String", true, false, false);
+      assertNoNotifications(info);
+   }
+
+   public void testSimpleGetterDescription() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleGetterDescription();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      assertNoOperations(info);
+      assertAttribute(info, "Getter Description", "Something", "java.lang.String", true, false, false);
+      assertNoNotifications(info);
+   }
+
+   public void testSimpleGetterIs() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleGetterIs();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      assertNoOperations(info);
+      assertAttribute(info, "MBean Attribute.", "Something", "boolean", true, false, true);
+      assertNoNotifications(info);
+   }
+
+   public void testSimpleSetter() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleSetter();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      assertNoOperations(info);
+      assertAttribute(info, "MBean Attribute.", "Something", "java.lang.String", false, true, false);
+      assertNoNotifications(info);
+   }
+
+   public void testSimpleSetterDescription() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleSetterDescription();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      assertNoOperations(info);
+      assertAttribute(info, "Setter Description", "Something", "java.lang.String", false, true, false);
+      assertNoNotifications(info);
+   }
+
+   public void testSimpleGetterSetter() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleGetterSetter();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      assertNoOperations(info);
+      assertAttribute(info, "MBean Attribute.", "Something", "java.lang.String", true, true, false);
+      assertNoNotifications(info);
+   }
+
+   public void testSimpleGetterSetterNotAnnotated() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleGetterSetterNotAnnotated();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      assertNoOperations(info);
+      assertAttribute(info, "MBean Attribute.", "Something", "java.lang.String", true, false, false);
+      assertNoNotifications(info);
+   }
+
+   public void testSimpleSetterGetterNotAnnotated() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleSetterGetterNotAnnotated();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      assertNoOperations(info);
+      assertAttribute(info, "MBean Attribute.", "Something", "java.lang.String", false, true, false);
+      assertNoNotifications(info);
+   }
+
+   public void testSimpleGetterSetterNeitherAnnotated() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleGetterSetterNeitherAnnotated();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      assertNoOperations(info);
+      assertNoAttributes(info);
+      assertNoNotifications(info);
+   }
+
+   public void testSimpleNotification() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleNotification();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      assertNoOperations(info);
+      assertNoAttributes(info);
+      assertNotification("MBean Notification.", info, "t1", "t2");
+   }
+
+   public void testSimpleNotificationName() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleNotificationName();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      assertNoOperations(info);
+      assertNoAttributes(info);
+      assertNotification("MBean Notification.", MBeanServerNotification.class.getName(), info, "t1", "t2");
+   }
+
+   public void testSimpleNotificationDescription() throws Exception
+   {
+      MBeanServer server = MBeanServerFactory.newMBeanServer();
+      Object test = new AnnotatedSimpleNotificationDescription();
+
+      ObjectName name = new ObjectName("test:test=test");
+      server.registerMBean(test, name);
+      
+      MBeanInfo info = server.getMBeanInfo(name);
+      assertMBean(info, test.getClass(), "Management Bean.");
+      assertConstructor(info, "MBean Constructor.");
+      assertNoOperations(info);
+      assertNoAttributes(info);
+      assertNotification("Notification Description", info, "t1", "t2");
+   }
+
+   protected void assertMBean(MBeanInfo mbeanInfo, Class<?> impl, String description) throws Exception
+   {
+      assertEquals(description, mbeanInfo.getDescription());
+      assertEquals(impl.getName(), mbeanInfo.getClassName());
+   }
+   
+   protected void assertConstructor(MBeanInfo mbeanInfo, String description, MBeanParameterInfo... parameters) throws Exception
+   {
+      MBeanConstructorInfo[] constructors = mbeanInfo.getConstructors();
+      if (constructors.length != 1)
+         fail("Expected only one constructor: " + Arrays.asList(constructors));
+      assertConstructor(constructors[0], description, parameters);
+   }
+   
+   protected void assertConstructor(MBeanConstructorInfo constructorInfo, String description, MBeanParameterInfo... parameters) throws Exception
+   {
+      assertEquals(description, constructorInfo.getDescription());
+      assertParameters(parameters, constructorInfo.getSignature());
+   }
+   
+   protected void assertNoOperations(MBeanInfo mbeanInfo) throws Exception
+   {
+      MBeanOperationInfo[] operations = mbeanInfo.getOperations();
+      if (operations.length != 0)
+         fail("Expected no operations: " + Arrays.asList(operations));
+   }
+   
+   protected void assertOperation(MBeanInfo mbeanInfo, String description, String name, String returnType, MBeanParameterInfo... parameters) throws Exception
+   {
+      assertOperation(mbeanInfo, description, MBeanOperationInfo.UNKNOWN, name, returnType, parameters);
+   }
+   
+   protected void assertOperation(MBeanInfo mbeanInfo, String description, int impact, String name, String returnType, MBeanParameterInfo... parameters) throws Exception
+   {
+      MBeanOperationInfo[] operations = mbeanInfo.getOperations();
+      if (operations.length != 1)
+         fail("Expected one operation: " + Arrays.asList(operations));
+      assertOperation(operations[0], description, impact, name, returnType, parameters);
+   }
+   
+   protected void assertOperation(MBeanOperationInfo operationInfo, String description, String name, String returnType, MBeanParameterInfo... parameters) throws Exception
+   {
+      assertOperation(operationInfo, description, MBeanOperationInfo.UNKNOWN, name, returnType, parameters);
+   }
+   
+   protected void assertOperation(MBeanOperationInfo operationInfo, String description, int impact, String name, String returnType, MBeanParameterInfo... parameters) throws Exception
+   {
+      assertEquals(description, operationInfo.getDescription());
+      assertEquals(impact, operationInfo.getImpact());
+      assertEquals(name, operationInfo.getName());
+      assertEquals(returnType, operationInfo.getReturnType());
+      assertParameters(parameters, operationInfo.getSignature());
+   }
+   
+   protected void assertParameters(MBeanParameterInfo[] expected, MBeanParameterInfo[] actual) throws Exception
+   {
+      if (expected.length != actual.length)
+         fail("Wrong number of parameters. expected=" + Arrays.asList(expected) + " actual=" + Arrays.asList(actual));
+      for (int i = 0; i < expected.length; ++i)
+         assertParameter(expected[i], actual[i]);
+   }
+   
+   protected void assertParameter(MBeanParameterInfo expected, MBeanParameterInfo actual) throws Exception
+   {
+      assertEquals(expected.getDescription(), actual.getDescription());
+      assertEquals(expected.getType(), actual.getType());
+   }
+   
+   protected void assertNoAttributes(MBeanInfo mbeanInfo) throws Exception
+   {
+      MBeanAttributeInfo[] attributes = mbeanInfo.getAttributes();
+      if (attributes.length != 0)
+         fail("Expected no attributes: " + Arrays.asList(attributes));
+   }
+   
+   protected void assertAttribute(MBeanInfo mbeanInfo, String description, String name, String type, boolean read, boolean write, boolean is) throws Exception
+   {
+      MBeanAttributeInfo[] attributes = mbeanInfo.getAttributes();
+      if (attributes.length != 1)
+         fail("Expected one attribute: " + Arrays.asList(attributes));
+      assertAttribute(attributes[0], description, name, type, read, write, is);
+   }
+   
+   protected void assertAttribute(MBeanAttributeInfo attributeInfo, String description, String name, String type, boolean read, boolean write, boolean is) throws Exception
+   {
+      assertEquals(description, attributeInfo.getDescription());
+      assertEquals(name, attributeInfo.getName());
+      assertEquals(type, attributeInfo.getType());
+      assertEquals(read, attributeInfo.isReadable());
+      assertEquals(write, attributeInfo.isWritable());
+      assertEquals(is, attributeInfo.isIs());
+   }
+   
+   protected void assertNotification(String description, MBeanInfo mbeanInfo, String... types) throws Exception
+   {
+      assertNotification(description, Notification.class.getName(), mbeanInfo, types);
+   }
+   
+   protected void assertNotification(String description, String name, MBeanInfo mbeanInfo, String... types) throws Exception
+   {
+      MBeanNotificationInfo[] notifications = mbeanInfo.getNotifications();
+      if (notifications.length != 1)
+         fail("Expected one notification: " + Arrays.asList(notifications));
+      assertNotification(description, name, notifications[0], types);
+   }
+   
+   protected void assertNotification(String description, MBeanNotificationInfo notificationInfo, String... types) throws Exception
+   {
+      assertNotification(description, Notification.class.getName(), notificationInfo,  types);
+   }
+   
+   protected void assertNotification(String description, String name, MBeanNotificationInfo notificationInfo, String... types) throws Exception
+   {
+      assertEquals(description, notificationInfo.getDescription());
+      assertEquals(name, notificationInfo.getName());
+      assertEquals(types, notificationInfo.getNotifTypes());
+   }
+   
+   protected void assertNoNotifications(MBeanInfo mbeanInfo) throws Exception
+   {
+      MBeanNotificationInfo[] notifications = mbeanInfo.getNotifications();
+      if (notifications.length != 0)
+         fail("Expected no notifications: " + Arrays.asList(notifications));
+   }
+}

Modified: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/StandardSUITE.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/StandardSUITE.java	2009-05-14 12:23:58 UTC (rev 88864)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/StandardSUITE.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -43,6 +43,7 @@
       suite.addTest(InfoTortureSUITE.suite());
       suite.addTest(InheritanceSUITE.suite());
       suite.addTest(new TestSuite(StandardMBeanTEST.class));
+      suite.addTest(AnnotationsTEST.suite());
 
       return suite;
    }

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedConstructorDescription.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedConstructorDescription.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedConstructorDescription.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.Description;
+import javax.management.MBean;
+
+/**
+ * AnnotatedConstructorDescription.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedConstructorDescription
+{
+   @Description("Constructor Description")
+   public AnnotatedConstructorDescription()
+   {
+   }
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedConstructorParameter.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedConstructorParameter.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedConstructorParameter.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.MBean;
+
+/**
+ * AnnotatedConstructorParameter.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedConstructorParameter
+{
+   public AnnotatedConstructorParameter(String hello)
+   {
+   }
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedConstructorParameterDescription.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedConstructorParameterDescription.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedConstructorParameterDescription.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.Description;
+import javax.management.MBean;
+
+/**
+ * AnnotatedConstructorParameterDescription.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedConstructorParameterDescription
+{
+   public AnnotatedConstructorParameterDescription(@Description("Parameter Description") String hello)
+   {
+   }
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimple.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimple.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimple.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,35 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.MBean;
+
+/**
+ * AnnotatedSimple.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedSimple
+{
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleDescription.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleDescription.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleDescription.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,37 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.Description;
+import javax.management.MBean;
+
+/**
+ * AnnotatedSimple.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+ at Description("Simple Description")
+public class AnnotatedSimpleDescription
+{
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetter.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetter.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetter.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.MBean;
+import javax.management.ManagedAttribute;
+
+/**
+ * AnnotatedSimpleGetter.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedSimpleGetter
+{
+   @ManagedAttribute
+   public String getSomething() { return null; }
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterDescription.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterDescription.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterDescription.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.Description;
+import javax.management.MBean;
+import javax.management.ManagedAttribute;
+
+/**
+ * AnnotatedSimpleGetterDescription.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedSimpleGetterDescription
+{
+   @ManagedAttribute
+   @Description("Getter Description")
+   public String getSomething() { return null; }
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterIs.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterIs.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterIs.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.MBean;
+import javax.management.ManagedAttribute;
+
+/**
+ * AnnotatedSimpleGetterIs.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedSimpleGetterIs
+{
+   @ManagedAttribute
+   public boolean isSomething() { return false; }
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterSetter.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterSetter.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterSetter.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.MBean;
+import javax.management.ManagedAttribute;
+
+/**
+ * AnnotatedSimpleGetterSetter.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedSimpleGetterSetter
+{
+   @ManagedAttribute
+   public String getSomething() { return null; }
+   @ManagedAttribute
+   public void setSomething(String hello) { }
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterSetterNeitherAnnotated.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterSetterNeitherAnnotated.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterSetterNeitherAnnotated.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,37 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.MBean;
+
+/**
+ * AnnotatedSimpleGetterSetterNeitherAnnotated.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedSimpleGetterSetterNeitherAnnotated
+{
+   public String getSomething() { return null; }
+   public void setSomething(String hello) { }
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterSetterNotAnnotated.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterSetterNotAnnotated.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleGetterSetterNotAnnotated.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.MBean;
+import javax.management.ManagedAttribute;
+
+/**
+ * AnnotatedSimpleGetterSetter.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedSimpleGetterSetterNotAnnotated
+{
+   @ManagedAttribute
+   public String getSomething() { return null; }
+   public void setSomething(String hello) { }
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleNotification.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleNotification.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleNotification.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,37 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.MBean;
+import javax.management.NotificationInfo;
+
+/**
+ * AnnotatedSimpleNotification.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+ at NotificationInfo(types={"t1","t2"})
+public class AnnotatedSimpleNotification
+{
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleNotificationDescription.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleNotificationDescription.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleNotificationDescription.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.Description;
+import javax.management.MBean;
+import javax.management.NotificationInfo;
+
+/**
+ * AnnotatedSimpleNotificationDescription.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+ at NotificationInfo(types={"t1","t2"}, description=@Description("Notification Description"))
+public class AnnotatedSimpleNotificationDescription
+{
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleNotificationName.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleNotificationName.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleNotificationName.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.MBean;
+import javax.management.MBeanServerNotification;
+import javax.management.NotificationInfo;
+
+/**
+ * AnnotatedSimpleNotificationName.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+ at NotificationInfo(types={"t1","t2"}, notificationClass=MBeanServerNotification.class)
+public class AnnotatedSimpleNotificationName
+{
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperation.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperation.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperation.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.MBean;
+import javax.management.ManagedOperation;
+
+/**
+ * AnnotatedSimpleOperation.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedSimpleOperation
+{
+   @ManagedOperation
+   public void doSomething() {}
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationDescription.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationDescription.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationDescription.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.Description;
+import javax.management.MBean;
+import javax.management.ManagedOperation;
+
+/**
+ * AnnotatedSimpleOperation.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedSimpleOperationDescription
+{
+   @ManagedOperation
+   @Description("Operation Description")
+   public void doSomething() {}
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationImpact.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationImpact.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationImpact.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.Impact;
+import javax.management.MBean;
+import javax.management.ManagedOperation;
+
+/**
+ * AnnotatedSimpleOperationImpact.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedSimpleOperationImpact
+{
+   @ManagedOperation(impact=Impact.ACTION)
+   public void doSomething() {}
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationNotAnnotated.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationNotAnnotated.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationNotAnnotated.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,36 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.MBean;
+
+/**
+ * AnnotatedSimpleOperationNotAnnotated.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedSimpleOperationNotAnnotated
+{
+   public void doSomething() {}
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationParameter.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationParameter.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationParameter.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.MBean;
+import javax.management.ManagedOperation;
+
+/**
+ * AnnotatedSimpleOperationParameter.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedSimpleOperationParameter
+{
+   @ManagedOperation
+   public void doSomething(String hello) {}
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationParameterDescription.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationParameterDescription.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationParameterDescription.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.Description;
+import javax.management.MBean;
+import javax.management.ManagedOperation;
+
+/**
+ * AnnotatedSimpleOperationParameterDescription.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedSimpleOperationParameterDescription
+{
+   @ManagedOperation
+   public void doSomething(@Description("Parameter Description") String hello) {}
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationReturnType.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationReturnType.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleOperationReturnType.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.MBean;
+import javax.management.ManagedOperation;
+
+/**
+ * AnnotatedSimpleOperationReturnType.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedSimpleOperationReturnType
+{
+   @ManagedOperation
+   public Integer doSomething() { return null; }
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleSetter.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleSetter.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleSetter.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.MBean;
+import javax.management.ManagedAttribute;
+
+/**
+ * AnnotatedSimpleSetter.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedSimpleSetter
+{
+   @ManagedAttribute
+   public void setSomething(String hello) { }
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleSetterDescription.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleSetterDescription.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleSetterDescription.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.Description;
+import javax.management.MBean;
+import javax.management.ManagedAttribute;
+
+/**
+ * AnnotatedSimpleSetterDescription.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedSimpleSetterDescription
+{
+   @ManagedAttribute
+   @Description("Setter Description")
+   public void setSomething(String hello) { }
+}

Added: projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleSetterGetterNotAnnotated.java
===================================================================
--- projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleSetterGetterNotAnnotated.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx/src/test/org/jboss/test/jmx/compliance/standard/support/AnnotatedSimpleSetterGetterNotAnnotated.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.jmx.compliance.standard.support;
+
+import javax.management.MBean;
+import javax.management.ManagedAttribute;
+
+/**
+ * AnnotatedSimpleGetterSetter.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at MBean
+public class AnnotatedSimpleSetterGetterNotAnnotated
+{
+   public String getSomething() { return null; }
+   @ManagedAttribute
+   public void setSomething(String hello) { }
+}

Added: projects/jbossmx/trunk/jmx-annotations/.classpath
===================================================================
--- projects/jbossmx/trunk/jmx-annotations/.classpath	                        (rev 0)
+++ projects/jbossmx/trunk/jmx-annotations/.classpath	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,5 @@
+<classpath>
+  <classpathentry kind="src" path="src/main/java"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+</classpath>
\ No newline at end of file

Added: projects/jbossmx/trunk/jmx-annotations/.project
===================================================================
--- projects/jbossmx/trunk/jmx-annotations/.project	                        (rev 0)
+++ projects/jbossmx/trunk/jmx-annotations/.project	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,13 @@
+<projectDescription>
+  <name>jboss-jmx-annotations</name>
+  <comment>JBossMX Java7 Annotations</comment>
+  <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/jbossmx/trunk/jmx-annotations/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jbossmx/trunk/jmx-annotations/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ projects/jbossmx/trunk/jmx-annotations/.settings/org.eclipse.jdt.core.prefs	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,5 @@
+#Thu May 14 14:07:23 CEST 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/jbossmx/trunk/jmx-annotations/pom.xml
===================================================================
--- projects/jbossmx/trunk/jmx-annotations/pom.xml	                        (rev 0)
+++ projects/jbossmx/trunk/jmx-annotations/pom.xml	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,14 @@
+<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.mx</groupId>
+    <artifactId>jboss-mx</artifactId>
+    <version>6.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.jboss.mx</groupId>
+  <artifactId>jboss-jmx-annotations</artifactId>
+  <packaging>jar</packaging>
+  <name>JBossMX Java7 Annotations</name>
+  <url>http://www.jboss.org/jbossmx</url>
+  <description>JBossMX Java7 Annotations</description>
+</project>

Added: projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/Description.java
===================================================================
--- projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/Description.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/Description.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,51 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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 javax.management;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Description.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Documented
+ at Retention(RetentionPolicy.RUNTIME)
+ at Target({ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE})
+public @interface Description
+{
+   /** The description */
+   String value();
+   
+   /** The bundle base name */
+   @DescriptorKey(value="descriptionResourceBundleBaseName", omitIfDefault=true)
+   String bundleBaseName() default "";
+   
+   /** The resource key */
+   @DescriptorKey(value="descriptionResourceKey", omitIfDefault=true)
+   String key() default "";
+}

Added: projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/DescriptorFields.java
===================================================================
--- projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/DescriptorFields.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/DescriptorFields.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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 javax.management;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * DescriptorFields.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Documented
+ at Retention(RetentionPolicy.RUNTIME)
+ at Target({ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE})
+public @interface DescriptorFields
+{
+   /** The key value pairs */
+   String[] value();
+}

Added: projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/DescriptorKey.java
===================================================================
--- projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/DescriptorKey.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/DescriptorKey.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,45 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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 javax.management;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * DescriptorKey
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Documented
+ at Retention(RetentionPolicy.RUNTIME)
+ at Target(ElementType.METHOD)
+public @interface DescriptorKey
+{
+   /** The descriptor key */
+   String value();
+   
+   /** Whether to include the field if it has the default value */
+   boolean omitIfDefault() default false;
+}

Added: projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/Impact.java
===================================================================
--- projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/Impact.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/Impact.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,78 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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 javax.management;
+
+/**
+ * Impact.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public enum Impact
+{
+   /** Performs some action */
+   ACTION(MBeanOperationInfo.ACTION),
+
+   /** Performs some action and returns information */
+   ACTION_INFO(MBeanOperationInfo.ACTION_INFO),
+   
+   /** Returns information */
+   INFO(MBeanOperationInfo.INFO),
+
+   /** Unspecified */
+   UNKNOWN(MBeanOperationInfo.UNKNOWN);
+
+   /** The equivalent code */
+   private int code;
+   
+   Impact(int code)
+   {
+      this.code = code;
+   }
+   
+   /**
+    * Get the equivalent code for use in the MBeanOperationInfo 
+    * 
+    * @return the code
+    */
+   public int getCode()
+   {
+      return code;
+   }
+
+   /**
+    * Get the impact for a code specified in MBeanOperationInfo
+    * 
+    * @param code the code
+    * @return the impact
+    */
+   public static Impact forCode(int code)
+   {
+      switch (code)
+      {
+         case MBeanOperationInfo.ACTION: return ACTION;
+         case MBeanOperationInfo.ACTION_INFO: return ACTION_INFO;
+         case MBeanOperationInfo.INFO: return INFO;
+         default : return UNKNOWN;
+      }
+   }
+}

Added: projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/MBean.java
===================================================================
--- projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/MBean.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/MBean.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,45 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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 javax.management;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * MBean.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Documented
+ at Retention(RetentionPolicy.RUNTIME)
+ at Target(ElementType.TYPE)
+ at Inherited
+public @interface MBean
+{
+   /** Whether this is an mxbean interface */
+   boolean value() default true;
+}

Added: projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/MXBean.java
===================================================================
--- projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/MXBean.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/MXBean.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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 javax.management;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * MBean.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Documented
+ at Retention(RetentionPolicy.RUNTIME)
+ at Target(ElementType.TYPE)
+ at Inherited
+public @interface MXBean
+{
+}

Added: projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/ManagedAttribute.java
===================================================================
--- projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/ManagedAttribute.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/ManagedAttribute.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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 javax.management;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * ManagedAttribute.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Documented
+ at Retention(RetentionPolicy.RUNTIME)
+ at Target(ElementType.METHOD)
+public @interface ManagedAttribute
+{
+}

Added: projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/ManagedOperation.java
===================================================================
--- projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/ManagedOperation.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/ManagedOperation.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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 javax.management;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * ManagedOperation.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Documented
+ at Retention(RetentionPolicy.RUNTIME)
+ at Target(ElementType.METHOD)
+public @interface ManagedOperation
+{
+   /** The impact of the operation */
+   Impact impact() default Impact.UNKNOWN;
+}

Added: projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/NotificationInfo.java
===================================================================
--- projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/NotificationInfo.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/NotificationInfo.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,52 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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 javax.management;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * NotificationInfo.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Documented
+ at Retention(RetentionPolicy.RUNTIME)
+ at Target(ElementType.TYPE)
+public @interface NotificationInfo
+{
+   /** The notification types */
+   String[] types();
+   
+   /** The description of the notification */
+   Description description() default @Description("");
+   
+   /** Descriptor key value paris */
+   String[] descriptorFields() default {};
+   
+   /** The notification class */
+   Class<? extends Notification> notificationClass() default Notification.class;
+}

Added: projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/NotificationInfos.java
===================================================================
--- projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/NotificationInfos.java	                        (rev 0)
+++ projects/jbossmx/trunk/jmx-annotations/src/main/java/javax/management/NotificationInfos.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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 javax.management;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * NotificationInfos.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Documented
+ at Retention(RetentionPolicy.RUNTIME)
+ at Target(ElementType.TYPE)
+public @interface NotificationInfos
+{
+   /** The notification infos */
+   NotificationInfo[] value();
+}

Modified: projects/jbossmx/trunk/mbeans/.classpath
===================================================================
--- projects/jbossmx/trunk/mbeans/.classpath	2009-05-14 12:23:58 UTC (rev 88864)
+++ projects/jbossmx/trunk/mbeans/.classpath	2009-05-14 12:26:46 UTC (rev 88865)
@@ -15,6 +15,7 @@
   <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-j2se"/>
+  <classpathentry kind="src" path="/jboss-jmx-annotations"/>
   <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"/>

Modified: projects/jbossmx/trunk/mbeans/.project
===================================================================
--- projects/jbossmx/trunk/mbeans/.project	2009-05-14 12:23:58 UTC (rev 88864)
+++ projects/jbossmx/trunk/mbeans/.project	2009-05-14 12:26:46 UTC (rev 88865)
@@ -3,6 +3,7 @@
   <comment>JBossMX (mbeans module)</comment>
   <projects>
     <project>jboss-j2se</project>
+    <project>jboss-jmx-annotations</project>
   </projects>
   <buildSpec>
     <buildCommand>

Modified: projects/jbossmx/trunk/mbeans/pom.xml
===================================================================
--- projects/jbossmx/trunk/mbeans/pom.xml	2009-05-14 12:23:58 UTC (rev 88864)
+++ projects/jbossmx/trunk/mbeans/pom.xml	2009-05-14 12:26:46 UTC (rev 88865)
@@ -96,6 +96,10 @@
       <artifactId>jboss-j2se</artifactId>
     </dependency>
     <dependency>
+      <groupId>org.jboss.mx</groupId>
+      <artifactId>jboss-jmx-annotations</artifactId>
+    </dependency>
+    <dependency>
       <groupId>bcel</groupId>
       <artifactId>bcel</artifactId>
     </dependency>

Modified: projects/jbossmx/trunk/mbeans/src/main/org/jboss/mx/metadata/MBeanCapability.java
===================================================================
--- projects/jbossmx/trunk/mbeans/src/main/org/jboss/mx/metadata/MBeanCapability.java	2009-05-14 12:23:58 UTC (rev 88864)
+++ projects/jbossmx/trunk/mbeans/src/main/org/jboss/mx/metadata/MBeanCapability.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -22,6 +22,7 @@
 package org.jboss.mx.metadata;
 
 import javax.management.DynamicMBean;
+import javax.management.MBean;
 import javax.management.NotCompliantMBeanException;
 
 /**
@@ -83,6 +84,10 @@
          return new MBeanCapability(DYNAMIC_MBEAN);
       }
 
+      // Class is annotated with @MBean 
+      if (mbeanClass.isAnnotationPresent(MBean.class))
+         return new MBeanCapability(STANDARD_MBEAN);
+      
       // If the MyClass MBean is an instance of a MyClassMBean interface, MyClass is a standard MBean
       Class<?> [] interfaces = mbeanClass.getInterfaces();
       for (int i = 0; i < interfaces.length; i++)

Modified: projects/jbossmx/trunk/mbeans/src/main/org/jboss/mx/metadata/StandardMetaData.java
===================================================================
--- projects/jbossmx/trunk/mbeans/src/main/org/jboss/mx/metadata/StandardMetaData.java	2009-05-14 12:23:58 UTC (rev 88864)
+++ projects/jbossmx/trunk/mbeans/src/main/org/jboss/mx/metadata/StandardMetaData.java	2009-05-14 12:26:46 UTC (rev 88865)
@@ -21,6 +21,7 @@
  */
 package org.jboss.mx.metadata;
 
+import java.lang.annotation.Annotation;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
@@ -28,14 +29,21 @@
 import java.util.Iterator;
 import java.util.List;
 
+import javax.management.Description;
 import javax.management.IntrospectionException;
+import javax.management.MBean;
 import javax.management.MBeanAttributeInfo;
 import javax.management.MBeanConstructorInfo;
 import javax.management.MBeanInfo;
 import javax.management.MBeanNotificationInfo;
 import javax.management.MBeanOperationInfo;
+import javax.management.MBeanParameterInfo;
+import javax.management.ManagedAttribute;
+import javax.management.ManagedOperation;
 import javax.management.NotCompliantMBeanException;
 import javax.management.NotificationBroadcaster;
+import javax.management.NotificationInfo;
+import javax.management.NotificationInfos;
 
 /**
  * This metadata builder implementation builds a MBean info based on the
@@ -149,7 +157,7 @@
    {
       this.mbeanClass     = mbeanClass;
       this.mbeanInterface = StandardMetaData.findStandardInterface(mbeanClass);
-      if (this.mbeanInterface == null)
+      if (this.mbeanInterface == null && mbeanClass.isAnnotationPresent(MBean.class) == false)
          throw new NotCompliantMBeanException("Cannot obtain management interface for: " + mbeanClass);
    }
 
@@ -192,6 +200,10 @@
    @SuppressWarnings("unchecked")
    public MBeanInfo build() throws NotCompliantMBeanException
    {
+      // We have an annotated class
+      if (mbeanClass.isAnnotationPresent(MBean.class))
+         return buildFromAnnotations();
+
       try
       {
          // First check the mbean instance implements the interface
@@ -202,12 +214,10 @@
                                                  mbeanInterface.getName());
 
          // First build the constructors
-         Constructor[] constructors = mbeanClass.getConstructors();
+         Constructor<?>[] constructors = mbeanClass.getConstructors();
          MBeanConstructorInfo[] constructorInfo = new MBeanConstructorInfo[constructors.length];
          for (int i = 0; i < constructors.length; ++i)
-         {
             constructorInfo[i] = new MBeanConstructorInfo("MBean Constructor.", constructors[i]);
-         }
 
          // Next we have to figure out how the methods in the mbean class map
          // to attributes and operations
@@ -310,6 +320,163 @@
       }
    }
 
+   public MBeanInfo buildFromAnnotations() throws NotCompliantMBeanException
+   {
+      try
+      {
+         // First build the constructors
+         Constructor<?>[] constructors = mbeanClass.getConstructors();
+         MBeanConstructorInfo[] constructorInfo = new MBeanConstructorInfo[constructors.length];
+         for (int i = 0; i < constructors.length; ++i)
+         {
+            String desc = "MBean Constructor.";
+            Description description = constructors[i].getAnnotation(Description.class);
+            if (description != null)
+               desc = description.value();
+            MBeanParameterInfo[] signature = getSignature(constructors[i]);
+            constructorInfo[i] = new MBeanConstructorInfo(desc, desc, signature);
+         }
+
+         // Next we have to figure out how the methods in the mbean class map
+         // to attributes and operations
+         Method[] methods = mbeanClass.getMethods();
+         HashMap<String, Method> getters = new HashMap<String, Method>();
+         HashMap<String, Method> setters = new HashMap<String, Method>();
+
+         HashMap<String, MBeanOperationInfo> operInfo = new HashMap<String, MBeanOperationInfo>();
+         List<MBeanAttributeInfo> attrInfo = new ArrayList<MBeanAttributeInfo>();
+
+         for (int i = 0; i < methods.length; ++i)
+         {
+            if (methods[i].isAnnotationPresent(ManagedAttribute.class))
+            {
+               String methodName = methods[i].getName();
+               Class<?>[] signature = methods[i].getParameterTypes();
+               Class<?> returnType  = methods[i].getReturnType();
+
+               if (methodName.startsWith("set") && methodName.length() > 3 
+                       && signature.length == 1 && returnType == Void.TYPE)
+               {
+                  String key = methodName.substring(3, methodName.length());
+                  Method setter = setters.get(key);
+                  if (setter != null && setter.getParameterTypes()[0].equals(signature[0]) == false)
+                     throw new IntrospectionException("overloaded type for attribute set: " + key);
+                  setters.put(key, methods[i]);
+               }
+               else if (methodName.startsWith("get") && methodName.length() > 3 
+                            && signature.length == 0 && returnType != Void.TYPE)
+               {
+                  String key = methodName.substring(3, methodName.length());
+                  Method getter = getters.get(key);
+                  if (getter != null && getter.getName().startsWith("is"))
+                     throw new IntrospectionException("mixed use of get/is for attribute " + key);
+                  getters.put(key, methods[i]);
+               }
+               else if (methodName.startsWith("is") && methodName.length() > 2 
+                           && signature.length == 0 && isBooleanReturn(returnType))
+               {
+                  String key = methodName.substring(2, methodName.length());
+                  Method getter = getters.get(key);
+                  if (getter != null && getter.getName().startsWith("get"))
+                  {
+                     throw new IntrospectionException("mixed use of get/is for attribute " + key);
+                  }
+                  getters.put(key, methods[i]);
+               }
+            }
+            ManagedOperation operation = methods[i].getAnnotation(ManagedOperation.class);
+            if (operation != null)
+            {
+               String desc = "MBean Operation.";
+               Description description = methods[i].getAnnotation(Description.class);
+               if (description != null)
+                  desc = description.value();
+               int impact = operation.impact().getCode();
+               MBeanParameterInfo[] sign = getSignature(methods[i]);
+               MBeanOperationInfo info = new MBeanOperationInfo(methods[i].getName(), desc, sign, methods[i].getReturnType().getName(), impact);
+               operInfo.put(getSignatureString(methods[i]), info);
+            }
+         }
+
+         String[] keys = getters.keySet().toArray(new String[0]);
+         for (int i = 0; i < keys.length; ++i)
+         {
+            String attrName = keys[i];
+            Method getter = getters.remove(attrName);
+            Method setter = setters.remove(attrName);
+            
+            String desc = "MBean Attribute.";
+            Description description = getter.getAnnotation(Description.class);
+            if (description != null)
+               desc = description.value();
+            else if (setter != null)
+            {
+               description = setter.getAnnotation(Description.class);
+               if (description != null)
+                  desc = description.value();
+            }
+            MBeanAttributeInfo info = new MBeanAttributeInfo(attrName, desc, getter, setter);
+            attrInfo.add(info);
+         }
+
+         for (String attrName : setters.keySet())
+         {
+            Method setter = setters.get(attrName);
+            String desc = "MBean Attribute.";
+            Description description = setter.getAnnotation(Description.class);
+            if (description != null)
+               desc = description.value();
+            MBeanAttributeInfo info = new MBeanAttributeInfo(attrName, desc, null, setter);
+            attrInfo.add(info);
+         }
+
+         // save away the attribute and operation info objects
+         MBeanAttributeInfo[] attributeInfo = attrInfo.toArray(new MBeanAttributeInfo[0]);
+         MBeanOperationInfo[] operationInfo = operInfo.values().toArray(new MBeanOperationInfo[0]);
+
+         // TODO
+         NotificationInfo[] notifs = null;
+         NotificationInfos notifInfos = mbeanClass.getAnnotation(NotificationInfos.class);
+         if (notifInfos != null)
+            notifs = notifInfos.value();
+         else
+         {
+            NotificationInfo notifInfo = mbeanClass.getAnnotation(NotificationInfo.class);
+            if (notifInfo != null)
+               notifs = new NotificationInfo[] { notifInfo };
+         }
+
+         MBeanNotificationInfo[] notifications = null;
+         if (notifs == null)
+         {
+            notifications = new MBeanNotificationInfo[0];
+         }
+         else
+         {
+            notifications = new MBeanNotificationInfo[notifs.length];
+            for (int i = 0; i < notifs.length; ++i)
+            {
+               String desc = "MBean Notification.";
+               String description = notifs[i].description().value();
+               if (description.length() > 0)
+                  desc = description;
+               notifications[i] = new MBeanNotificationInfo(notifs[i].types(), notifs[i].notificationClass().getName(), desc);
+            }
+         }
+         
+         String desc = "Management Bean.";
+         Description description = mbeanClass.getAnnotation(Description.class);
+         if (description != null)
+            desc = description.value();
+         return new MBeanInfo(mbeanClass.getName(), desc,
+               attributeInfo, constructorInfo, operationInfo, notifications);
+      }
+      catch (IntrospectionException e)
+      {
+         throw new NotCompliantMBeanException(e.getMessage());
+      }
+   }
+
    /**
     * JMX standard specifies that only "boolean isX()" style methods
     * represent attributes. "Boolean isX()" methods map to operations.
@@ -319,6 +486,36 @@
       return returnType == Boolean.TYPE;
    }
 
+   protected MBeanParameterInfo[] getSignature(Constructor<?> constructor)
+   {
+      return getSignature(constructor.getParameterTypes(), constructor.getParameterAnnotations());
+   }
+
+   protected MBeanParameterInfo[] getSignature(Method method)
+   {
+      return getSignature(method.getParameterTypes(), method.getParameterAnnotations());
+   }
+
+   protected MBeanParameterInfo[] getSignature(Class<?>[] parameterTypes, Annotation[][] annotations)
+   {
+      MBeanParameterInfo[] result = new MBeanParameterInfo[parameterTypes.length];
+      for (int i = 0; i < result.length; ++i)
+      {
+         String name = "p" + i;
+         String desc = name;
+         for (Annotation annotation : annotations[i])
+         {
+            if (annotation.annotationType() == Description.class)
+            {
+               Description description = (Description) annotation;
+               desc = description.value();
+            }
+         }
+         result[i] = new MBeanParameterInfo(name, parameterTypes[i].getName(), desc);
+      }
+      return result;
+   }
+   
    protected String getSignatureString(Method method)
    {
       String name = method.getName();

Modified: projects/jbossmx/trunk/pom.xml
===================================================================
--- projects/jbossmx/trunk/pom.xml	2009-05-14 12:23:58 UTC (rev 88864)
+++ projects/jbossmx/trunk/pom.xml	2009-05-14 12:26:46 UTC (rev 88865)
@@ -23,6 +23,7 @@
   <modules>
     <module>mbeanserver</module>
     <module>j2se</module>
+    <module>jmx-annotations</module>
     <module>mbeans</module>
     <module>jmx</module>
   </modules>
@@ -174,6 +175,11 @@
       </dependency>
       <dependency>
         <groupId>org.jboss.mx</groupId>
+        <artifactId>jboss-jmx-annotations</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.mx</groupId>
         <artifactId>jboss-mbeans</artifactId>
         <version>${project.version}</version>
       </dependency>




More information about the jboss-cvs-commits mailing list