[jboss-cvs] JBossAS SVN: r89990 - in projects/kernel/trunk: jmx-mc-int/src/main/java/org/jboss/system/metadata and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jun 9 10:20:50 EDT 2009


Author: kabir.khan at jboss.com
Date: 2009-06-09 10:20:49 -0400 (Tue, 09 Jun 2009)
New Revision: 89990

Modified:
   projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/AbstractServiceControllerLifecycleCallback.java
   projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/JMXAnnotationPlugin.java
   projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/JMXFieldAnnotationPlugin.java
   projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/JMXPropertyAnnotationPlugin.java
   projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/ServiceControllerCreateDestroyLifecycleCallback.java
   projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/ServiceControllerLifecycleCallback.java
   projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/ServiceControllerRegistrationLifecycleCallback.java
   projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/ServiceControllerStartStopLifecycleCallback.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/AbstractMetaDataVisitorNode.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceAnnotationMetaData.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceAttributeMetaData.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceConstructorMetaData.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDependencyListValueMetaData.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDependencyMetaData.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDependencyValueMetaData.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDeployment.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDeploymentClassPath.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDeploymentClasspathAdapter.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDeploymentParser.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceElementValueMetaData.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceInjectionValueMetaData.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceJBXBValueMetaData.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceJavaBeanValueMetaData.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceLoaderRepositoryAdapter.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaData.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaData2ElementConverter.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaDataAdapter.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaDataParser.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaDataVisitor.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaDataVisitorNode.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceTextValueMetaData.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceValueContext.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceValueMetaData.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/ConfigureAction.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/CreateDestroyLifecycleAction.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/DescribeAction.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/InstallAction.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/InstantiateAction.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/LifecycleDependencyItem.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/LifecycleInfo.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/OnlyUnregisterAction.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/ServiceControllerContext.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/ServiceControllerContextAction.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/ServiceControllerContextActions.java
   projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/StartStopLifecycleAction.java
Log:
[JBKERNEL-14] Initial javadocs for the jmx stuff

Modified: projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/AbstractServiceControllerLifecycleCallback.java
===================================================================
--- projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/AbstractServiceControllerLifecycleCallback.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/AbstractServiceControllerLifecycleCallback.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -32,6 +32,8 @@
 
 /**
  * ServiceControllerLifecycleCallback.
+ * Base class for the AOP lifecycle callbacks dealing with registering an
+ * MBean in the {@link ServiceController}.
  * 
  * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
@@ -70,9 +72,19 @@
       if (serviceController == null)
          throw new IllegalStateException("No service controller configured");
    }
-   
+
+   /**
+    * The install AOP lifecycle callback method
+    * 
+    * @param context The context being installed.
+    */
    public abstract void install(ControllerContext context) throws Exception;
    
+   /**
+    * The uninstall AOP lifecycle callback method
+    * 
+    * @param context The context being uninstalled.
+    */
    public abstract void uninstall(ControllerContext context) throws Exception;
    
    protected JMX readJmxAnnotation(ControllerContext context) throws Exception

Modified: projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/JMXAnnotationPlugin.java
===================================================================
--- projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/JMXAnnotationPlugin.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/JMXAnnotationPlugin.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -39,7 +39,8 @@
 import org.jboss.reflect.spi.AnnotatedInfo;
 
 /**
- * Supporting @JMX on attributes.
+ * Supporting @{@link JMX} on attributes.
+ * Adds the @JMX annotations to the bean metadata
  *
  * @author <a href="ales.justin at jboss.com">Ales Justin</a>
  * @param <T> exact info type

Modified: projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/JMXFieldAnnotationPlugin.java
===================================================================
--- projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/JMXFieldAnnotationPlugin.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/JMXFieldAnnotationPlugin.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -27,6 +27,7 @@
 
 /**
  * Supporting @JMX on fields.
+ * Adds the JMX annotation to the bean metadata. 
  *
  * @author <a href="ales.justin at jboss.com">Ales Justin</a>
  */

Modified: projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/JMXPropertyAnnotationPlugin.java
===================================================================
--- projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/JMXPropertyAnnotationPlugin.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/JMXPropertyAnnotationPlugin.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -28,6 +28,7 @@
 
 /**
  * Supporting @JMX on getters.
+ * Adds the JMX annotation to the bean metadata. 
  *
  * @author <a href="ales.justin at jboss.com">Ales Justin</a>
  */

Modified: projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/ServiceControllerCreateDestroyLifecycleCallback.java
===================================================================
--- projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/ServiceControllerCreateDestroyLifecycleCallback.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/ServiceControllerCreateDestroyLifecycleCallback.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -23,12 +23,27 @@
 
 import javax.management.ObjectName;
 
+import org.jboss.aop.microcontainer.aspects.jmx.JMX;
 import org.jboss.dependency.spi.ControllerContext;
 import org.jboss.logging.Logger;
+import org.jboss.system.ServiceController;
 
 /**
- * ServiceControllerLifecycleCallback.
+ * ServiceControllerCreateDestroyLifecycleCallback. Intended for use when installing to/uninstalling from
+ * the {@link org.jboss.dependency.spi.ControllerState#CREATE} state. Example from AS bootstrap:
  * 
+ * <pre>
+ *    &lt;lifecycle-create xmlns="urn:jboss:aop-beans:1.0"
+ *               name="JMXRegistrationAdvice"
+ *               class="org.jboss.system.microcontainer.jmx.ServiceControllerCreateDestroyLifecycleCallback"
+ *               classes="@org.jboss.aop.microcontainer.aspects.jmx.JMX"
+ *               manager-bean="AspectManager"
+ *               manager-property="aspectManager"&gt;
+ *      &lt;property name="serviceController"&gt;&lt;inject bean="JMXKernel" property="serviceController"/&gt;&lt;/property&gt;
+ *   &lt;/lifecycle-create&gt;
+ * </pre>
+ * 
+ * 
  * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
@@ -38,12 +53,26 @@
    /** The log */
    private static final Logger log = Logger.getLogger(ServiceControllerCreateDestroyLifecycleCallback.class);
    
+   /**
+    * Tells the {@link ServiceController} to invoke the <code>create</code> lifecycle method on the MBean created
+    * by {@link ServiceControllerRegistrationLifecycleCallback}. The ObjectName is given in a bean's @{@link JMX}
+    * annotation. 
+    * 
+    * @param context the context being installed
+    */
    public void install(ControllerContext context) throws Exception
    {
       ObjectName objectName = determineObjectName(context); 
       getServiceController().create(objectName);
    }
    
+   /**
+    * Tells the {@link ServiceController} to invoke the <code>destroy</code> lifecycle method on the MBean created
+    * by {@link ServiceControllerRegistrationLifecycleCallback}. The ObjectName is given in a bean's @{@link JMX}
+    * annotation. 
+    * 
+    * @param context the context being uninstalled
+    */
    public void uninstall(ControllerContext context) throws Exception
    {
       ObjectName objectName = determineObjectName(context); 

Modified: projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/ServiceControllerLifecycleCallback.java
===================================================================
--- projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/ServiceControllerLifecycleCallback.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/ServiceControllerLifecycleCallback.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -41,10 +41,13 @@
 /**
  * ServiceControllerLifecycleCallback.
  * 
+ * @deprecated Use {@link ServiceControllerRegistrationLifecycleCallback}, {@link ServiceControllerCreateDestroyLifecycleCallback}
+ *  and {@link ServiceControllerStartStopLifecycleCallback} instead
  * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
+ at Deprecated
 public class ServiceControllerLifecycleCallback
 {
    /** The log */

Modified: projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/ServiceControllerRegistrationLifecycleCallback.java
===================================================================
--- projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/ServiceControllerRegistrationLifecycleCallback.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/ServiceControllerRegistrationLifecycleCallback.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -33,10 +33,23 @@
 import org.jboss.dependency.spi.dispatch.InvokeDispatchContext;
 import org.jboss.logging.Logger;
 import org.jboss.mx.server.ServerConstants;
+import org.jboss.system.ServiceController;
 
 /**
- * ServiceControllerLifecycleCallback.
+ * ServiceControllerLifecycleCallback. Intended for use when installing to/uninstalling from
+ * the {@link org.jboss.dependency.spi.ControllerState#CONFIGURED} state. Example from AS bootstrap:
  * 
+ * <pre>
+ *    &lt;lifecycle-configure xmlns="urn:jboss:aop-beans:1.0"
+ *               name="JMXRegistrationAdvice"
+ *               class="org.jboss.system.microcontainer.jmx.ServiceControllerRegistrationLifecycleCallback"
+ *               classes="@org.jboss.aop.microcontainer.aspects.jmx.JMX"
+ *               manager-bean="AspectManager"
+ *               manager-property="aspectManager"&gt;
+ *      &lt;property name="serviceController"&gt;&lt;inject bean="JMXKernel" property="serviceController"/&gt;&lt;/property&gt;
+ *   &lt;/lifecycle-configure&gt;
+ * </pre>
+ * 
  * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
@@ -46,6 +59,13 @@
    /** The log */
    private static final Logger log = Logger.getLogger(ServiceControllerRegistrationLifecycleCallback.class);
    
+   /**
+    * Constructs an MBean from a bean and registers it in the {@link ServiceController}'s MBean server.
+    * The ObjectName and the interfaces to use as MBean interfaces are given in a bean's @{@link JMX}
+    * annotation. 
+    * 
+    * @param context the context being uninstalled
+    */
    public void install(ControllerContext context) throws Exception
    {
       JMX jmx = readJmxAnnotation(context);
@@ -119,6 +139,12 @@
       log.debug("Registered MBean " + objectName);
    }
    
+   /**
+    * Unregisters an MBean from the {@link ServiceController}'s MBean server.
+    * The ObjectName is given in a bean's @{@link JMX} annotation. 
+    * 
+    * @param context the context being installed
+    */
    public void uninstall(ControllerContext context) throws Exception
    {
       ObjectName objectName = determineObjectName(context); 

Modified: projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/ServiceControllerStartStopLifecycleCallback.java
===================================================================
--- projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/ServiceControllerStartStopLifecycleCallback.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-aop-mc-int/src/main/java/org/jboss/system/microcontainer/jmx/ServiceControllerStartStopLifecycleCallback.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -23,12 +23,26 @@
 
 import javax.management.ObjectName;
 
+import org.jboss.aop.microcontainer.aspects.jmx.JMX;
 import org.jboss.dependency.spi.ControllerContext;
 import org.jboss.logging.Logger;
+import org.jboss.system.ServiceController;
 
 /**
- * ServiceControllerLifecycleCallback.
+ * ServiceControllerStartStopLifecycleCallback. Intended for use when installing to/uninstalling from
+ * the {@link org.jboss.dependency.spi.ControllerState#START} state. Example from AS bootstrap:
  * 
+ * <pre>
+ *    &lt;lifecycle-start xmlns="urn:jboss:aop-beans:1.0"
+ *               name="JMXRegistrationAdvice"
+ *               class="org.jboss.system.microcontainer.jmx.ServiceControllerStartStopLifecycleCallback"
+ *               classes="@org.jboss.aop.microcontainer.aspects.jmx.JMX"
+ *               manager-bean="AspectManager"
+ *               manager-property="aspectManager"&gt;
+ *      &lt;property name="serviceController"&gt;&lt;inject bean="JMXKernel" property="serviceController"/&gt;&lt;/property&gt;
+ *   &lt;/lifecycle-start&gt;
+ * </pre>
+ * 
  * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
@@ -38,12 +52,26 @@
    /** The log */
    private static final Logger log = Logger.getLogger(ServiceControllerStartStopLifecycleCallback.class);
    
+   /**
+    * Tells the {@link ServiceController} to invoke the <code>start</code> lifecycle method on the MBean created
+    * by {@link ServiceControllerRegistrationLifecycleCallback}. The ObjectName is given in a bean's @{@link JMX}
+    * annotation. 
+    * 
+    * @param context the context being installed
+    */
    public void install(ControllerContext context) throws Exception
    {
       ObjectName objectName = determineObjectName(context); 
       getServiceController().start(objectName);
    }
    
+   /**
+    * Tells the {@link ServiceController} to invoke the <code>stop</code> lifecycle method on the MBean created
+    * by {@link ServiceControllerRegistrationLifecycleCallback}. The ObjectName is given in a bean's @{@link JMX}
+    * annotation. 
+    * 
+    * @param context the context being uninstalled
+    */
    public void uninstall(ControllerContext context) throws Exception
    {
       ObjectName objectName = determineObjectName(context); 

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/AbstractMetaDataVisitorNode.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/AbstractMetaDataVisitorNode.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/AbstractMetaDataVisitorNode.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -29,6 +29,8 @@
 /**
  * AbstractMetaDataVisitorNode.
  * 
+ * Abstract base class for visiting the ServiceMetaData
+ * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceAnnotationMetaData.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceAnnotationMetaData.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceAnnotationMetaData.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -31,7 +31,13 @@
 import org.jboss.util.StringPropertyReplacer;
 
 /**
- * Service annotation metadata
+ * Service annotation metadata.
+ * Used to add MC annotations to MBeans, e.g.
+ * <pre>
+ *   &lt;mbean name="jboss.test:type=test" code="org.jboss.test.system.controller.support.Simple"&gt;
+ *       &lt;annotation&gt;@org.jboss.example.Annotation&lt;/attribute&gt;   
+ *   &lt;/mbean&gt;
+ * </pre>
  * 
  * @author Scott.Stark at jboss.org
  * @version $Revision$

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceAttributeMetaData.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceAttributeMetaData.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceAttributeMetaData.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -29,6 +29,7 @@
 
 /**
  * ServiceAttributeMetaData.
+ * Used to hold things like dependencies which are not assiciated with MBean attributes
  * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceConstructorMetaData.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceConstructorMetaData.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceConstructorMetaData.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -33,7 +33,8 @@
 /**
  * ServiceConstructorMetaData.
  * 
- * This class is based on the old ConstructorInfo from ServiceCreator
+ * This class is based on the old ConstructorInfo from ServiceCreator.
+ * Contains information about the non-default constructor to use to create an MBean.
  * 
  * @author <a href="mailto:marc.fleury at jboss.org">Marc Fleury</a>
  * @author <a href="mailto:d_jencks at users.sourceforge.net">David Jencks</a>
@@ -64,7 +65,8 @@
    private Object[] parameters;
    
    /**
-    * Get the params.
+    * Get the parameter values for the constructor. The string representations will be
+    * converted into the target type.
     * 
     * @return the params.
     */
@@ -74,7 +76,8 @@
    }
 
    /**
-    * Set the params.
+    * Set the parameter values for the constructor. The string representations will be
+    * converted into the target type.
     * 
     * @param params the params.
     */
@@ -86,9 +89,9 @@
    }
 
    /**
-    * Get the signature.
+    * Get the paramter types for the constructor.
     * 
-    * @return the signature.
+    * @return the types.
     * @throws ConfigurationException if there is a problem with the signature
     */
    public String[] getSignature() throws ConfigurationException
@@ -102,9 +105,9 @@
    }
 
    /**
-    * Set the signature.
+    * Set the paramter types for the constructor.
     * 
-    * @param signature the signature.
+    * @param signature the types of the parameters.
     */
    public void setSignature(String[] signature)
    {
@@ -114,7 +117,8 @@
    }
    
    /**
-    * Get the parameters
+    * Get the actual parameter values to use when calling the constructor. The String representations
+    * of the parameter values are converted into the actual values.
     * 
     * @param cl the class loader
     * @return the parameters
@@ -175,7 +179,7 @@
    }
 
    /**
-    * Set the parameters.
+    * Set the actual parameter values to use when calling the constructor.
     * 
     * @param parameters the parameters.
     */

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDependencyListValueMetaData.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDependencyListValueMetaData.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDependencyListValueMetaData.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -34,6 +34,14 @@
 
 /**
  * ServiceDependencyListValueMetaData.
+ * Used to handle the injection done via a <code>depends-list</code>:
+ * <pre>
+ *   &lt;mbean name="jboss.test:type=test" code="org.jboss.test.system.controller.support.Simple"&gt;
+ *     &lt;depends-list optional-attribute-name="AttributeName"&gt;
+ *        &lt;depends-list-element>test:test=1&lt;/depends-list-element&gt;
+ *     &lt;/depends-list&gt;
+ *   &lt;/mbean&gt;
+ * </pre>
  * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDependencyMetaData.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDependencyMetaData.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDependencyMetaData.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -33,6 +33,17 @@
 /**
  * ServiceDependencyMetaData.
  * 
+ * Used to handle a dependency created via a plain <code>depends</code> element where the dependency should not be injected
+ * into an MBean attribute:
+ * <pre>
+ *   &lt;mbean name="jboss.test:type=test" code="org.jboss.test.system.controller.support.Simple"&gt;
+ *       &lt;depends&gt;org.jboss.example:name=Other&lt;/depends&gt;   
+ *   &lt;/mbean&gt;
+ * </pre>
+ *  
+ * This creates a dependency on <code>org.jboss.example:name=Other</code> from the MBean.
+ * 
+ * @see ServiceDependencyValueMetaData
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDependencyValueMetaData.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDependencyValueMetaData.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDependencyValueMetaData.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -37,7 +37,16 @@
 /**
  * ServiceDependencyValueMetaData.
  * 
- * This class is based on the old ServiceConfigurator
+ * This class is based on the old ServiceConfigurator.
+ * Used to handle the injection done via a <code>depends</code> where the dependency should be injected
+ * into an MBean attribute specified via a <code>dependends-optional-attribute</code>:<pre>
+ *   &lt;mbean name="jboss.test:type=test" code="org.jboss.test.system.controller.support.Simple"&gt;
+ *       &lt;depends optional-attribute-name="Other"&gt;org.jboss.example:name=Other&lt;/depends&gt;   
+ *   &lt;/mbean&gt;
+ * </pre>
+ *  
+ * This will inject the ObjectName for <code>org.jboss.example:name=Other</code> into the MBean's 
+ * <code>Other</code> attribute. 
  *
  * @author <a href="mailto:marc at jboss.org">Marc Fleury</a>
  * @author <a href="mailto:hiram at jboss.org">Hiram Chirino</a>

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDeployment.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDeployment.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDeployment.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -38,7 +38,9 @@
 
 /**
  * ServiceDeployment. Used to parse the legacy -service.xml files
- * for MBean deployment.
+ * for MBean deployment. Each entry becomes a {@link ServiceMetaData}.
+ * This class does NOT use JAXB despite the annotations, it is parsed by
+ * {@link ServiceDeploymentParser} and {@link ServiceMetaDataParser}.
  * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @author Scott.Stark at jboss.org
@@ -68,7 +70,7 @@
    private List<ServiceDeploymentClassPath> classPaths;
    
    /**
-    * Get the name o.
+    * Get the name/url string of the deployment.
     * 
     * @return the name.
     */
@@ -81,7 +83,7 @@
    }
 
    /**
-    * Set the name.
+    * Set the name/url string of the deployment.
     * 
     * @param name the name.
     */
@@ -91,7 +93,8 @@
    }
 
    /**
-    * Get the services.
+    * Get the services. They are the <code>mbean</code> entries
+    * in the -service.xml.
     * 
     * @return the services.
     */
@@ -104,7 +107,8 @@
    }
 
    /**
-    * Set the services.
+    * Set the services. They are the <code>mbean</code> entries
+    * in the -service.xml.
     * 
     * @param services the services.
     */
@@ -136,7 +140,8 @@
    }
 
    /**
-    * Get the loaderRepositoryConfig.
+    * Get the <code>loader-repository</code> element used to set up classloader
+    * scoping the "old" way.
     * 
     * @return the loaderRepositoryConfig.
     */
@@ -149,7 +154,8 @@
    }
 
    /**
-    * Set the loaderRepositoryConfig.
+    * Set the <code>loader-repository</code> element used to set up classloader
+    * scoping the "old" way.
     * 
     * @param loaderRepositoryConfig the loaderRepositoryConfig.
     */
@@ -159,7 +165,8 @@
    }
 
    /**
-    * Get the classPaths.
+    * Get the classPaths specifying locations that will be included in the services
+    * deployment classpath.
     * 
     * @return the classPaths.
     */
@@ -172,7 +179,8 @@
    }
 
    /**
-    * Set the classPaths.
+    * Set the classPaths specifying locations that will be included in the services
+    * deployment classpath.
     * 
     * @param classPaths the classPaths.
     */

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDeploymentClassPath.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDeploymentClassPath.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDeploymentClassPath.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -26,8 +26,17 @@
 import org.jboss.managed.api.annotation.ManagementObject;
 
 /**
- * ServiceDeploymentClassPath.
- * 
+ * ServiceDeploymentClassPath. Used to parse the <code>classpath</code> part of 
+ * a -service.xml. The classpath specifies locations to be included in the deployment
+ * classpath, e.g.
+ * <pre>
+ * &lt;classpath codebase='.' archives='util.jar' /&gt;
+ * &lt;classpath codebase='http://classloader.dot.com' archives='*' /&gt;
+ * &lt;classpath codebase="lib" archives="*"/&gt;
+ * </pre>
+* This class does NOT use JAXB despite the annotations, it is parsed by
+ * {@link ServiceDeploymentParser}.
+  * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
@@ -59,7 +68,7 @@
    }
 
    /**
-    * Get the archives.
+    * Get the archives relative to the urls
     * 
     * @return the archives.
     */
@@ -69,7 +78,7 @@
    }
 
    /**
-    * Set the archives.
+    * Set the archives relative to the urls.
     * 
     * @param archives the archives.
     */
@@ -79,7 +88,7 @@
    }
 
    /**
-    * Get the codeBase.
+    * Get the codebase.
     * 
     * @return the codeBase.
     */
@@ -89,7 +98,7 @@
    }
 
    /**
-    * Set the codeBase.
+    * Set the codebase.
     * 
     * @param codeBase the codeBase.
     * @throws IllegalArgumentException for a null codebase

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDeploymentClasspathAdapter.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDeploymentClasspathAdapter.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDeploymentClasspathAdapter.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -32,7 +32,9 @@
 /**
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
+ * @deprecated JAXB is not used. ServiceDeployments are parsed using {@link ServiceMetaDataParser}
  */
+ at Deprecated
 public class ServiceDeploymentClasspathAdapter extends XmlAdapter<Object, ServiceDeploymentClassPath>
 {
 

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDeploymentParser.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDeploymentParser.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceDeploymentParser.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -35,7 +35,8 @@
 import org.w3c.dom.NodeList;
 
 /**
- * ServiceDeploymentParser
+ * ServiceDeploymentParser. Used to parse a -service.xml into a ServiceDeployment.
+ * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
@@ -61,7 +62,7 @@
    }
 
    /**
-    * Parse the xml 
+    * Parse the -service.xml into a ServiceDeployment 
     * 
     * @return the service deployment
     * @throws ConfigurationException for any error

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceElementValueMetaData.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceElementValueMetaData.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceElementValueMetaData.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -32,7 +32,19 @@
 /**
  * ServiceElementValueMetaData.
  * 
- * This class is based on the old ServiceConfigurator
+ * This class is based on the old ServiceConfigurator.
+ * If an MBean's <code>attribute</code> element contains an element which does not match any of the other
+ * ServiceValueMetaData implementations, that element is passed in to the MBean attribute. 
+ * 
+ * An example configuration for an MBean with an Element property:
+ * <pre>
+ *   &lt;mbean name="jboss.test:type=test" code="org.jboss.test.system.controller.support.Simple"&gt;
+ *      &lt;attribute name="Element"&gt;&lt;test/&gt;&lt;/property&gt;
+ *     &lt;/attribute&gt;
+ *   &lt;/mbean&gt;
+ * </pre>
+ * Will get hold of the Element for <code>dummy</code> and pass that in to the MBean's <code>Element</code>
+ * property. 
  *
  * @author <a href="mailto:marc at jboss.org">Marc Fleury</a>
  * @author <a href="mailto:hiram at jboss.org">Hiram Chirino</a>

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceInjectionValueMetaData.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceInjectionValueMetaData.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceInjectionValueMetaData.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -24,6 +24,7 @@
 import java.io.Serializable;
 
 import org.jboss.dependency.plugins.AbstractDependencyItem;
+import org.jboss.dependency.spi.Controller;
 import org.jboss.dependency.spi.ControllerContext;
 import org.jboss.dependency.spi.ControllerState;
 import org.jboss.dependency.spi.DependencyItem;
@@ -34,6 +35,20 @@
 /**
  * ServiceInjectionValueMetaData.
  * 
+ * Creates an MC injection if the element contained in an MBean's <code>attribute</code> element is <code>inject</code>.
+ * 
+ * <pre>
+ *   &lt;mbean name="jboss.test:type=test" code="org.jboss.test.system.controller.support.Simple"&gt;
+ *       &lt;attribute name="Other" serialDataType="jbxb"&gt;
+ *           &lt;inject bean="SomeBean"/&gt;
+ *       &lt;/attribute&gt;   
+ *   &lt;/mbean&gt;
+ * </pre>
+ *  
+ * This will inject the bean <code>SomeBean</code> into the MBean's <code>Other</code> property.
+ * The value of the <code>inject</code> can either be the ObjectName of another MBean or the
+ * name of a bean installed in the underlying {@link Controller}
+ * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceJBXBValueMetaData.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceJBXBValueMetaData.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceJBXBValueMetaData.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -30,10 +30,32 @@
 import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
 import org.w3c.dom.Element;
 
+
 /**
- * ServiceJBXBValueMetaData.
+ * ServiceJBXBValueMetaData. 
  * 
- * This class is based on the old ServiceConfigurator
+ * This class is based on the old ServiceConfigurator.
+ * Parses the element contained in an MBean's <code>attribute</code> element using JAXB if the attribute's 
+ * <code>serialDataType</code> is <code>jbxb</code>.
+ * 
+ * An example configuration for an MBean with a JavaBean property:
+ * <pre>
+ *   &lt;mbean name="jboss.test:type=test" code="org.jboss.test.system.controller.support.Simple"&gt;
+ *       &lt;attribute name="JavaBean" serialDataType="jbxb"&gt;
+ *           &lt;javabean xmlns="urn:jboss:javabean:1.0" 
+ *                     class="org.jboss.example.JavaBean"&gt;
+ *              &lt;property name="property1"&gt;5&lt;/property&gt;
+ *          &lt/javabean&gt;
+ *       &lt;/attribute&gt;   
+ *   &lt;/mbean&gt;
+ * </pre>
+ *  
+ * This will parse the <code>javabean</code> xml using the associated schema binding, and create a JavaBean of 
+ * type <code>org.jboss.example.JavaBean</code> and set it's 
+ * <code>property1</code> to <code>5</code> and it's <code>property2</code>
+ * to <code>10</code>. That JavaBean will be used when configuring the <code>JavaBean</code>
+ * attribute of the MBean. 
+ 
  *
  * @author <a href="mailto:marc at jboss.org">Marc Fleury</a>
  * @author <a href="mailto:hiram at jboss.org">Hiram Chirino</a>

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceJavaBeanValueMetaData.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceJavaBeanValueMetaData.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceJavaBeanValueMetaData.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -34,7 +34,27 @@
 /**
  * ServiceJavaBeanValueMetaData.
  * 
- * This class is based on the old ServiceConfigurator
+ * This class is based on the old ServiceConfigurator.
+ * Parses the element contained in an an MBean's <code>attribute</code> element to a JavaBean instance if the attribute's 
+ * <code>serialDataType</code> is <code>javaBean</code>. 
+ * 
+ * An example configuration for an MBean with a JavaBean property:
+ * <pre>
+ *   &lt;mbean name="jboss.test:type=test" code="org.jboss.test.system.controller.support.Simple"&gt;
+ *      &lt;attribute name="JavaBean" 
+ *                serialDataType="javaBean"
+ *                attributeClass="org.jboss.example.JavaBean"&gt;
+ *         &lt;property name="property1"&gt;property1&lt;/property&gt;
+ *         &lt;property name="property2"&gt;10&lt;/property&gt;
+ *     &lt;/attribute&gt;
+ *   &lt;/mbean&gt;
+ * </pre>
+ * 
+ * This will create a JavaBean of type <code>org.jboss.example.JavaBean</code> and set it's 
+ * <code>property1</code> to <code>property1</code> and it's <code>property2</code>
+ * to <code>10</code>. That JavaBean will be used when configuring the <code>JavaBean</code>
+ * attribute of the MBean. If the attribute does not have <code>attributeClass</code>
+ * set, an attempt will be made to infer that from the type of the attribute setter. 
  *
  * @author <a href="mailto:marc at jboss.org">Marc Fleury</a>
  * @author <a href="mailto:hiram at jboss.org">Hiram Chirino</a>

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceLoaderRepositoryAdapter.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceLoaderRepositoryAdapter.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceLoaderRepositoryAdapter.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -34,7 +34,9 @@
  * 
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
+ * @deprecated JAXB is not used. ServiceMetaDatas are parsed using {@link ServiceMetaDataParser}
  */
+ at Deprecated
 public class ServiceLoaderRepositoryAdapter extends XmlAdapter<Object, LoaderRepositoryConfig>
 {
    

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaData.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaData.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaData.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -36,7 +36,8 @@
 import org.w3c.dom.Element;
 
 /**
- * ServiceMetaData.
+ * ServiceMetaData. Represents one <code>mbean</code> entry
+ * in a -service.xml.
  * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @author Anil.Saldhana at redhat.com
@@ -89,7 +90,7 @@
    private List<String> aliases;
 
    /**
-    * Get the objectName.
+    * Get the object name of the MBean.
     * 
     * @return the objectName.
     */
@@ -101,7 +102,7 @@
    }
 
    /**
-    * Set the objectName.
+    * Set the object name of the MBean.
     * 
     * @param objectName the objectName.
     */
@@ -113,7 +114,7 @@
    }
 
    /**
-    * Get the code.
+    * Get the <code>code</code> attribute, i.e. the class implementing the MBean
     * 
     * @return the code.
     */
@@ -124,7 +125,7 @@
    }
 
    /**
-    * Set the code.
+    * Set the <code>code</code> attribute, i.e. the class implementing the MBean
     * 
     * @param code the code.
     */
@@ -136,7 +137,7 @@
    }
 
    /**
-    * Get the mode.
+    * Get the controller mode.
     * 
     * @return the mode.
     */
@@ -146,7 +147,7 @@
    }
 
    /**
-    * Set the mode.
+    * Set the controller mode.
     * 
     * @param mode the mode.
     */
@@ -156,7 +157,7 @@
    }
 
    /**
-    * Get the constructor.
+    * Get the constructor to instantiate the MBean.
     * 
     * @return the constructor.
     */
@@ -166,7 +167,7 @@
    }
 
    /**
-    * Set the constructor.
+    * Set the constructor to instantiate the MBean.
     * 
     * @param constructor the constructor.
     */
@@ -176,7 +177,9 @@
    }
 
    /**
-    * Get the interfaceName.
+    * Get the interfaceName. The fully qualified name of the class
+    * used to construct the management interface of the mbean. In absence of it an interface
+    * with the name ending by MBean will be looked for in the implementation class.
     * 
     * @return the interfaceName.
     */
@@ -186,7 +189,9 @@
    }
 
    /**
-    * Set the interfaceName.
+    * Set the interfaceName. The fully qualified name of the class
+    * used to construct the management interface of the mbean. In absence of it an interface
+    * with the name ending by MBean will be looked for in the implementation class.
     * 
     * @param interfaceName the interfaceName.
     */
@@ -196,7 +201,8 @@
    }
 
    /**
-    * Get the xmbeanCode.
+    * Get the xmbeanCode. The optional <code>xmbean-code</code> attribute specifies the ModelMBean implementation class
+    * to use. This defaults to org.jboss.mx.modelmbean.XMBean.
     * 
     * @return the xmbeanCode.
     */
@@ -206,7 +212,8 @@
    }
 
    /**
-    * Set the xmbeanCode.
+    * Set the xmbeanCode. The optional <code>xmbean-code</code> attribute specifies the ModelMBean implementation class
+    * to use. This defaults to org.jboss.mx.modelmbean.XMBean.
     * 
     * @param xmbeanCode the xmbeanCode.
     */
@@ -218,7 +225,13 @@
    }
 
    /**
-    * Get the xmbeanDD.
+    * Get the xmbeanDD. The <code>xmbean-dd</code> attribute defines the path to the JBoss XMBean descriptor. This
+    * is an xml document conforming to:
+    * <code>&lt;!DOCTYPE mbean PUBLIC
+    *  "-//JBoss//DTD JBOSS XMBEAN 1.0//EN"
+    *  "http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_0.dtd"&gt;
+    * If the descriptor is embedded via a nested xmbean element, the xmbean-dd attribute
+    * must be given as an empty string.
     * 
     * @return the xmbeanDD.
     */
@@ -228,8 +241,15 @@
    }
 
    /**
-    * Set the xmbeanDD.
+    * Set the xmbeanDD. The <code>xmbean-dd</code> attribute defines the path to the JBoss XMBean descriptor. This
+    * is an xml document conforming to:
+    * <code>&lt;!DOCTYPE mbean PUBLIC
+    *  "-//JBoss//DTD JBOSS XMBEAN 1.0//EN"
+    *  "http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_0.dtd"&gt;
+    * If the descriptor is embedded via a nested xmbean element, the xmbean-dd attribute
+    * must be given as an empty string.
     * 
+    * 
     * @param xmbeanDD the xmbeanDD.
     */
    public void setXMBeanDD(String xmbeanDD)
@@ -238,8 +258,10 @@
    }
 
    /**
-    * Get the xmbeanDescriptor.
+    * Get the xmbeanDescriptor. This is the nested <code>xmbean</code> element which can be used instead of
+    * <code>xmbean-dd</code>.
     * 
+    * 
     * @return the xmbeanDescriptor.
     */
    public Element getXMBeanDescriptor()
@@ -248,7 +270,8 @@
    }
 
    /**
-    * Set the xmbeanDescriptor.
+    * Set the xmbeanDescriptor. This is the nested <code>xmbean</code> element which can be used instead of
+    * <code>xmbean-dd</code>.
     * 
     * @param xmbeanDescriptor the xmbeanDescriptor.
     */

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaData2ElementConverter.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaData2ElementConverter.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaData2ElementConverter.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -35,7 +35,9 @@
  * 
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
+ * @deprecated JAXB is not used. ServiceMetaDatas are parsed using {@link ServiceMetaDataParser}
  */
+ at Deprecated
 public class ServiceMetaData2ElementConverter
 {
    /** The Document */

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaDataAdapter.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaDataAdapter.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaDataAdapter.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -33,7 +33,9 @@
  * @author <a href="weston.price at jboss.org">Weston Price</a>
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
+ * @deprecated JAXB is not used. ServiceMetaDatas are parsed using {@link ServiceMetaDataParser}
  */
+ at Deprecated
 public class ServiceMetaDataAdapter extends XmlAdapter<Object, ServiceMetaData>
 {
    

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaDataParser.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaDataParser.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaDataParser.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -42,6 +42,8 @@
  * ServiceMetaDataParser
  *
  * This class is based on the old ServiceConfigurator/Creator.
+ * Used to parse the <code>mbean</code> elements of -service.xml files into
+ * ServiceMetaDatas. 
  *
  * @author <a href="mailto:marc at jboss.org">Marc Fleury</a>
  * @author <a href="mailto:hiram at jboss.org">Hiram Chirino</a>
@@ -93,7 +95,8 @@
    }
 
    /**
-    * Parse the xml 
+    * Parse the -service.xml and create ServceMetaDatas from the <code>mbean</code>
+    * elements. 
     * 
     * @return the list of service meta data
     * @throws Exception for any error
@@ -682,7 +685,7 @@
    }
 
    /**
-    * Get an element's text content, looking for "trim" and "replace" attributes
+    * Get an <code>attribute</code> element's text content, looking for "trim" and "replace" attributes
     * on the element to determine whether to trim the text and/or perform
     * system property substitution.
     * 
@@ -699,6 +702,12 @@
       return trimAndReplace(rawText, trim, replace);
    }
    
+   /**
+    * Get whether an <code>attribute</code> element's text content should be trimmed
+    * 
+    * @param element the element
+    * @return whether the element should be trimmed
+    */
    public static boolean getTrim(Element element)
    {      
       boolean trim = true;
@@ -708,6 +717,12 @@
       return trim;
    }
    
+   /**
+    * Get whether an <code>attribute</code> element's text content have system property substitution.
+    * 
+    * @param element the element
+    * @return whether the element should have system property substitution
+    */
    public static boolean getReplace(Element element)
    {
       boolean replace = true;
@@ -733,6 +748,12 @@
       return trimAndReplace(rawText, trim, replace);
    }
    
+   /**
+    * Get the raw contents of an attribute element
+    * 
+    * @param element the element
+    * @return the contents of the <code>attribute</code> element
+    */
    public static String getRawElementTextContent(Element element)
    {
       NodeList nl = element.getChildNodes();
@@ -748,6 +769,14 @@
       return rawText;
    }
    
+   /**
+    * Trims the passed in string and performs system property replacement
+    * 
+    * @param rawText The text to trim and perform system property replacement on
+    * @param trim whether to trim the raw text
+    * @param replace whether to perform system propery replacement on the raw text
+    * @return The string trimmed (if requested) and with system property replacement done (if requested)
+    */
    public static String trimAndReplace(String rawText, boolean trim, boolean replace)
    {
       if (trim)

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaDataVisitor.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaDataVisitor.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaDataVisitor.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -27,7 +27,10 @@
 
 /**
  * ServiceMetaDataVisitor.
+ * Visitors of {@link ServiceMetaDataVisitorNode} must implement this interface,
+ * exposing things needed by the visitor nodes.
  * 
+ * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaDataVisitorNode.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaDataVisitorNode.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceMetaDataVisitorNode.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -26,6 +26,8 @@
 /**
  * ServiceMetaDataVisitorNode.
  * 
+ * Interface for visiting the ServiceMetaData composite.
+ * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceTextValueMetaData.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceTextValueMetaData.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceTextValueMetaData.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -34,8 +34,21 @@
 /**
  * ServiceTextValueMetaData.
  * 
- * This class is based on the old ServiceConfigurator
+ * This class is based on the old ServiceConfigurator.
+ * Converts the value stored in an MBean's <code>attribute</code> so it can be set in the MBean
+ * 
+ * 
+ * <pre>
+ *   &lt;mbean name="jboss.test:type=test" code="org.jboss.test.system.controller.support.Simple"&gt;
+ *       &lt;attribute name="StringValue"&gt;Test&lt;/attribute&gt;
+ *       &lt;attribute name="IntValue"&gt;12&lt;/attribute&gt;
+ *   &lt;/mbean&gt;
+ * </pre>
  *
+ * Assuming that <code>StringValue</code> is of type String, it will set that attribute using the string value 
+ * <code>Test</code>, and if <code>IntValue</code> is of type <code>int</code> it will set that attribute using
+ * the int value <code>12</code>.
+ *
  * @author <a href="mailto:marc at jboss.org">Marc Fleury</a>
  * @author <a href="mailto:hiram at jboss.org">Hiram Chirino</a>
  * @author <a href="mailto:d_jencks at users.sourceforge.net">David Jencks</a>

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceValueContext.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceValueContext.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceValueContext.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -29,7 +29,8 @@
 import org.jboss.system.ServiceController;
 
 /**
- * ServiceValueContext.
+ * ServiceValueContext. A wrapper around the MBeanServer and {@link ServiceController} to
+ * be able to load the attributes for an MBean service. 
  * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
@@ -66,7 +67,7 @@
     * 
     * @param server the server
     * @param controller the service controller
-    * @param classloader the classloader
+    * @param classloader the classloader to use loading the attribute
     */
    public ServiceValueContext(MBeanServer server, ServiceController controller, ClassLoader classloader)
    {
@@ -81,7 +82,7 @@
     * @param server the server
     * @param controller the service controller
     * @param attributeInfo the attribute info
-    * @param classloader the classloader
+    * @param classloader the classloader to use loading the attribute
     */
    public ServiceValueContext(MBeanServer server, ServiceController controller, MBeanAttributeInfo attributeInfo, ClassLoader classloader)
    {
@@ -112,7 +113,7 @@
    }
 
    /**
-    * Get the classloader.
+    * Get the classloader to use loading the attribute.
     * 
     * @return the classloader.
     */
@@ -122,7 +123,7 @@
    }
 
    /**
-    * Set the classloader.
+    * Set the classloader to use loading the attribute.
     * 
     * @param classloader the classloader.
     */
@@ -132,9 +133,9 @@
    }
 
    /**
-    * Get the replace.
+    * Get whether system property replacement should happen.
     * 
-    * @return the replace.
+    * @return whether system property replacement should happen.
     */
    public boolean isReplace()
    {
@@ -142,9 +143,9 @@
    }
 
    /**
-    * Set the replace.
+    * Set whether system property replacement should happen.
     * 
-    * @param replace the replace.
+    * @param replace whether system property replacement should happen.
     */
    public void setReplace(boolean replace)
    {
@@ -152,9 +153,9 @@
    }
 
    /**
-    * Get the server.
+    * Get the MBeanServer.
     * 
-    * @return the server.
+    * @return the MBeanServer.
     */
    public MBeanServer getServer()
    {
@@ -169,9 +170,9 @@
    }
 
    /**
-    * Set the server.
+    * Set the MBeanServer.
     * 
-    * @param server the server.
+    * @param server the MBeanServer.
     */
    public void setServer(MBeanServer server)
    {
@@ -201,9 +202,9 @@
    }
 
    /**
-    * Get the trim.
+    * Get whether the attribute value should be trimmed.
     * 
-    * @return the trim.
+    * @return whether to trim.
     */
    public boolean isTrim()
    {
@@ -211,9 +212,9 @@
    }
 
    /**
-    * Set the trim.
+    * Set whether the attribute value should be trimmed.
     * 
-    * @param trim the trim.
+    * @param trim whether to trim.
     */
    public void setTrim(boolean trim)
    {
@@ -221,7 +222,7 @@
    }
    
    /**
-    * Get the kernel
+    * Get the kernel the ServiceController
     * 
     * @return the kernel
     */
@@ -231,7 +232,7 @@
    }
    
    /**
-    * Get the controller
+    * Get the controller for the kernel the ServiceController belongs to
     * 
     * @return the controller
     */

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceValueMetaData.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceValueMetaData.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/metadata/ServiceValueMetaData.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -23,6 +23,8 @@
 
 /**
  * ServiceValueMetaData.
+ * Interface used to represent the data contained within an MBean's <code>attribute</code> element.
+ * The actual implementation depends on the contents of the <code>attribute</code> element.
  * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
@@ -30,10 +32,11 @@
 public interface ServiceValueMetaData extends ServiceMetaDataVisitorNode
 {
    /**
-    * Get the value
+    * Gets the value for an attribute that can be used when configuring the MBean
+    * and setting its attributes
     * 
-    * @param valueContext the value context
-    * @return the value
+    * @param valueContext the value context used to load the 
+    * @return the value to be used for the MBean attribute
     * @throws Throwable for any error
     */
    Object getValue(ServiceValueContext valueContext) throws Throwable;

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/ConfigureAction.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/ConfigureAction.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/ConfigureAction.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -25,6 +25,7 @@
 
 import javax.management.ObjectName;
 
+import org.jboss.dependency.spi.ControllerState;
 import org.jboss.system.ServiceConfigurator;
 import org.jboss.system.ServiceContext;
 import org.jboss.system.ServiceController;
@@ -32,13 +33,21 @@
 import org.jboss.system.metadata.ServiceMetaData;
 
 /**
- * ConfigureAction.
+ * ConfigureAction. Called when installing to/uninstalling from the 
+ * {@link ControllerState#CONFIGURED} state. Configures the MBean instance
+ * with values from the {@link ServiceMetaData} on install.
  * 
+ * @see ServiceControllerContextActions
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
 public class ConfigureAction extends ServiceControllerContextAction
 {
+   /**
+    * Configures the MBean instance with values from the ServiceMetaData.
+    * 
+    * @param context The ServiceControllerContext we are installing
+    */
    public void installAction(ServiceControllerContext context) throws Throwable
    {
       ServiceController controller = context.getServiceController();
@@ -59,6 +68,11 @@
       context.getServiceContext().state = ServiceContext.CONFIGURED;
    }
 
+   /**
+    * No-op
+    * 
+    * @param context The ServiceControllerContext we are uninstalling
+    */
    public void uninstallAction(ServiceControllerContext context)
    {
    }

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/CreateDestroyLifecycleAction.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/CreateDestroyLifecycleAction.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/CreateDestroyLifecycleAction.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -23,19 +23,31 @@
 
 import javax.management.ObjectName;
 
+import org.jboss.dependency.spi.ControllerState;
 import org.jboss.system.Service;
 import org.jboss.system.ServiceContext;
 import org.jboss.system.ServiceController;
 import org.jboss.system.ServiceMBean;
 
 /**
- * CreateDestroyLifecycleAction.
+ * CreateDestroyLifecycleAction. Called when installing to/uninstalling from the 
+ * {@link ControllerState#CREATE} state. Invokes any <code>create</code> and 
+ * <code>destroy</code> methods on the MBean. 
  * 
+ * 
+ * @see ServiceControllerContextActions
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
 public class CreateDestroyLifecycleAction extends ServiceControllerContextAction
 {
+   /**
+    * Invokes any <code>create</code> method on the the MBean and emits
+    * a {@link ServiceMBean#CREATE_EVENT} notification that the MBean
+    * has been created.
+    * 
+    * @param context The ServiceControllerContext we are installing
+    */
    public void installAction(ServiceControllerContext context) throws Throwable
    {
       Service service = context.getServiceProxy();
@@ -48,6 +60,13 @@
       serviceController.sendControllerNotification(ServiceMBean.CREATE_EVENT, objectName);            
    }
 
+   /**
+    * Invokes any <code>destroy</code> method on the the MBean and emits
+    * a {@link ServiceMBean#DESTROY_EVENT} notification that the MBean
+    * has been destroyed.
+    * 
+    * @param context The ServiceControllerContext we are uninstalling
+    */
    public void uninstallAction(ServiceControllerContext context)
    {
       try

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/DescribeAction.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/DescribeAction.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/DescribeAction.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -21,18 +21,33 @@
  */
 package org.jboss.system.microcontainer;
 
+import org.jboss.dependency.spi.ControllerState;
+
 /**
  * DescribeAction.
+ * This does not do anything. Called when installing to/uninstalling from the 
+ * {@link ControllerState#DESCRIBED} state.
  * 
+ * @see ServiceControllerContextActions
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
 public class DescribeAction extends ServiceControllerContextAction
 {
+   /**
+    * No-op
+    * 
+    * @param context The ServiceControllerContext we are installing
+    */
    public void installAction(ServiceControllerContext context) throws Throwable
    {
    }
 
+   /**
+    * No-op
+    * 
+    * @param context The ServiceControllerContext we are uninstalling
+    */
    public void uninstallAction(ServiceControllerContext context)
    {
    }

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/InstallAction.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/InstallAction.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/InstallAction.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -22,17 +22,29 @@
 package org.jboss.system.microcontainer;
 
 /**
- * InstallAction.
+ * InstallAction. 
+ * No-Op.
  *
+ * @see ServiceControllerContextActions
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
 public class InstallAction extends ServiceControllerContextAction
 {
+   /**
+    * No-op
+    * 
+    * @param context The ServiceControllerContext we are installing
+    */
    public void installAction(ServiceControllerContext context) throws Throwable
    {
    }
 
+   /**
+    * No-op
+    * 
+    * @param context The ServiceControllerContext we are uninstalling
+    */
    public void uninstallAction(ServiceControllerContext context)
    {
    }

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/InstantiateAction.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/InstantiateAction.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/InstantiateAction.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -24,18 +24,29 @@
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
+import org.jboss.dependency.spi.ControllerState;
 import org.jboss.system.ServiceCreator;
 import org.jboss.system.ServiceInstance;
 import org.jboss.system.metadata.ServiceMetaData;
 
 /**
- * InstantiateAction.
+ * InstantiateAction. Called when installing to/uninstalling from the 
+ * {@link ControllerState#INSTANTIATED} state. Creates an instance of
+ * the MBean and registers it in the MBeanServer on ininstall, and unregisters
+ * it from the MBeanServer on uninstall.
  * 
+ * @see ServiceControllerContextActions
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
 public class InstantiateAction extends ServiceControllerContextAction
 {
+   /**
+    * Creates an instance of the MBean from the metadata stored in the context,
+    * and registers it in the MBeanServer.
+    * 
+    * @param context The ServiceControllerContext we are installing
+    */
    public void installAction(ServiceControllerContext context) throws Throwable
    {
       MBeanServer server = context.getServiceController().getMBeanServer();
@@ -46,6 +57,11 @@
       context.setTarget(instance.getResource());
    }
 
+   /**
+    * Unregisters the MBean from the the MBeanServer.
+    * 
+    * @param context The ServiceControllerContext we are uninstalling
+    */
    public void uninstallAction(ServiceControllerContext context)
    {
       MBeanServer server = context.getServiceController().getMBeanServer();

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/LifecycleDependencyItem.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/LifecycleDependencyItem.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/LifecycleDependencyItem.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -23,9 +23,11 @@
 
 import org.jboss.dependency.plugins.AbstractDependencyItem;
 import org.jboss.dependency.spi.ControllerState;
+import org.jboss.system.metadata.ServiceMetaData;
 
 /**
  * A LifecycleDependencyItem.
+ * Contains dependencies from the {@link ServiceMetaData#getDependencies()}
  * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/LifecycleInfo.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/LifecycleInfo.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/LifecycleInfo.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -34,6 +34,8 @@
 
 /**
  * Holds the needed kernel bus lifecycle invocation info.
+ * Used by {@link ServiceControllerContext#lifecycleInvocation(String, Object[], String[])}
+ * to make invocations on the MBean lifecycle methods.
  *
  * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
  */
@@ -42,6 +44,9 @@
    private ServiceControllerContext context;
    private Map<String, StateInfo> lifecycleOps;
 
+   /**
+    * @param context The ServiceControllerContext
+    */
    public LifecycleInfo(ServiceControllerContext context) throws Throwable
    {
       if (context == null)

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/OnlyUnregisterAction.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/OnlyUnregisterAction.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/OnlyUnregisterAction.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -24,20 +24,33 @@
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
+import org.jboss.dependency.spi.ControllerState;
 import org.jboss.system.ServiceCreator;
 
 /**
- * Only unregister action
+ * OnlyUnregisterAction. Used to unregister an MBean from the MBeanServer
+ * when uninstalling from the {@link ControllerState#INSTANTIATED} state. 
  * 
+ * @see ServiceControllerContextActions
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
 public class OnlyUnregisterAction extends ServiceControllerContextAction
 {
+   /**
+    * No-op
+    * 
+    * @param context The ServiceControllerContext we are uninstalling
+    */
    public void installAction(ServiceControllerContext context) throws Throwable
    {
    }
 
+   /**
+    * Unregisters the MBean from the the MBeanServer.
+    * 
+    * @param context The ServiceControllerContext we are uninstalling
+    */
    public void uninstallAction(ServiceControllerContext context)
    {
       MBeanServer server = context.getServiceController().getMBeanServer();

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/ServiceControllerContext.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/ServiceControllerContext.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/ServiceControllerContext.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -30,6 +30,7 @@
 
 import org.jboss.dependency.plugins.AbstractControllerContext;
 import org.jboss.dependency.spi.Controller;
+import org.jboss.dependency.spi.ControllerContext;
 import org.jboss.dependency.spi.ControllerMode;
 import org.jboss.dependency.spi.ControllerState;
 import org.jboss.dependency.spi.DependencyItem;
@@ -42,8 +43,10 @@
 import org.jboss.system.metadata.ServiceMetaDataVisitorNode;
 
 /**
- * ServiceControllerContext.
+ * ServiceControllerContext. Represents an MBean that is being installed in the Microcontainer and
+ * MBeanServer by the {@link ServiceController}.
  * 
+ * @see ControllerContext
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @author <a href="ales.justin at jboss.com">Ales Justin</a>
  * @version $Revision$

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/ServiceControllerContextAction.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/ServiceControllerContextAction.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/ServiceControllerContextAction.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -21,12 +21,14 @@
  */
 package org.jboss.system.microcontainer;
 
+import org.jboss.dependency.plugins.action.ControllerContextAction;
 import org.jboss.dependency.plugins.action.SimpleControllerContextAction;
 import org.jboss.dependency.spi.ControllerContext;
 import org.jboss.logging.Logger;
 
 /**
  * ServiceControllerContextAction.
+ * Base class for the {@link ControllerContextAction}s used by {@link ServiceControllerContextActions}
  * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @author <a href="ales.justin at jboss.com">Ales Justin</a>

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/ServiceControllerContextActions.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/ServiceControllerContextActions.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/ServiceControllerContextActions.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -26,11 +26,64 @@
 
 import org.jboss.dependency.plugins.AbstractControllerContextActions;
 import org.jboss.dependency.plugins.action.ControllerContextAction;
+import org.jboss.dependency.spi.ControllerContextActions;
 import org.jboss.dependency.spi.ControllerState;
+import org.jboss.system.ServiceController;
+import org.jboss.system.metadata.ServiceMetaData;
 
 /**
  * ServiceControllerContextActions.
  * 
+ * Contains the actions for the {@link ServiceController}. 
+ * The states used for creating {@link ServiceControllerContext} from a {@link ServiceMetaData}
+ * and installing it into the ServiceController are:
+ *
+ * <table border="1">
+ *    <tr>
+ *       <td>{@link ControllerState#DESCRIBED} </td>
+ *       <td>{@link DescribeAction}</td>
+ *    </tr>
+ *    <tr>
+ *       <td>{@link ControllerState#INSTANTIATED} </td>
+ *       <td>{@link InstantiateAction}</td>
+ *    </tr>
+ *    <tr>
+ *       <td>{@link ControllerState#CONFIGURED} </td>
+ *       <td>{@link ConfigureAction}</td>
+ *    </tr>
+ *    <tr>
+ *       <td>{@link ControllerState#CREATE} </td>
+ *       <td>{@link CreateDestroyLifecycleAction}</td>
+ *    </tr>
+ *    <tr>
+ *       <td>{@link ControllerState#START} </td>
+ *       <td>{@link StartStopLifecycleAction}</td>
+ *    </tr>
+ *    <tr>
+ *       <td>{@link ControllerState#INSTALLED} </td>
+ *       <td>{@link InstallAction}</td>
+ *    </tr>
+ * </table>
+ * 
+ * If registering an already instantiated instance into the ServiceController, the states are:
+ *
+ * <table border="1">
+ *    <tr>
+ *       <td>{@link ControllerState#INSTANTIATED} </td>
+ *       <td>{@link OnlyUnregisterAction}</td>
+ *    </tr>
+ *    <tr>
+ *       <td>{@link ControllerState#CREATE} </td>
+ *       <td>{@link CreateDestroyLifecycleAction}</td>
+ *    </tr>
+ *    <tr>
+ *       <td>{@link ControllerState#START} </td>
+ *       <td>{@link StartStopLifecycleAction}</td>
+ *    </tr>
+ * </table>
+ * 
+ * 
+ * @see ControllerContextActions
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */

Modified: projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/StartStopLifecycleAction.java
===================================================================
--- projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/StartStopLifecycleAction.java	2009-06-09 13:30:40 UTC (rev 89989)
+++ projects/kernel/trunk/jmx-mc-int/src/main/java/org/jboss/system/microcontainer/StartStopLifecycleAction.java	2009-06-09 14:20:49 UTC (rev 89990)
@@ -23,19 +23,30 @@
 
 import javax.management.ObjectName;
 
+import org.jboss.dependency.spi.ControllerState;
 import org.jboss.system.Service;
 import org.jboss.system.ServiceContext;
 import org.jboss.system.ServiceController;
 import org.jboss.system.ServiceMBean;
 
 /**
- * StartStopLifecycleAction.
+ * StartStopLifecycleAction. Called when installing to/uninstalling from the 
+ * {@link ControllerState#START} state. Invokes any <code>start</code> and 
+ * <code>stop</code> methods on the MBean.
  * 
+ * @see ServiceControllerContextActions
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision$
  */
 public class StartStopLifecycleAction extends ServiceControllerContextAction
 {
+   /**
+    * Invokes any <code>start</code> method on the the MBean and emits
+    * a {@link ServiceMBean#START_EVENT} notification that the MBean
+    * has been created.
+    * 
+    * @param context The ServiceControllerContext we are installing
+    */
    public void installAction(ServiceControllerContext context) throws Throwable
    {
       Service service = context.getServiceProxy();
@@ -48,6 +59,13 @@
       serviceController.sendControllerNotification(ServiceMBean.START_EVENT, objectName);            
    }
 
+   /**
+    * Invokes any <code>stop</code> method on the the MBean and emits
+    * a {@link ServiceMBean#STOP_EVENT} notification that the MBean
+    * has been destroyed.
+    * 
+    * @param context The ServiceControllerContext we are uninstalling
+    */
    public void uninstallAction(ServiceControllerContext context)
    {
       try




More information about the jboss-cvs-commits mailing list