geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlaskow...@apache.org
Subject cvs commit: incubator-geronimo/modules/kernel/src/test/org/apache/geronimo/gbean GBeanInfoTest.java
Date Sat, 13 Mar 2004 23:48:56 GMT
jlaskowski    2004/03/13 15:48:56

  Modified:    modules/kernel/src/java/org/apache/geronimo/gbean/jmx
                        AbstractManagedObject.java GBeanMBean.java
               modules/kernel/src/java/org/apache/geronimo/kernel
                        Kernel.java
               modules/kernel/src/test/org/apache/geronimo/gbean
                        GBeanInfoTest.java
  Log:
  javadoc fixes and enhancements
  
  Revision  Changes    Path
  1.7       +15 -15    incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/jmx/AbstractManagedObject.java
  
  Index: AbstractManagedObject.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/jmx/AbstractManagedObject.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AbstractManagedObject.java	10 Mar 2004 09:59:00 -0000	1.6
  +++ AbstractManagedObject.java	13 Mar 2004 23:48:56 -0000	1.7
  @@ -51,7 +51,7 @@
   /**
    * Abstract implementation of JSR77 StateManageable.
    * Implementors of StateManageable may use this class and simply provide
  - * doStart, doStop and sendNotification methods.
  + * {@link #doStart()}, {@link #doStop()} and {@link #sendNotification(String)} methods.
    *
    * @version $Revision$ $Date$
    */
  @@ -109,8 +109,8 @@
       protected final NotificationBroadcasterSupport notificationBroadcaster = new NotificationBroadcasterSupport();
   
       /**
  -     * Do the start tasks for the component.  Called in the STARTING state by
  -     * the start() and startRecursive() methods to perform the tasks required to
  +     * Do the start tasks for the component.  Called in the {@link State#STARTING} state
by
  +     * the {@link #start()} and {@link #startRecursive()} methods to perform the tasks
required to
        * start the component.
        *
        * Note: this method is called from within a synchronized block, so be careful what
you call as you
  @@ -122,8 +122,8 @@
       }
   
       /**
  -     * Do the stop tasks for the component.  Called in the STOPPING state by the stop()
  -     * method to perform the tasks required to stop the component.
  +     * Do the stop tasks for the component.  Called in the {@link #STOPPING} state by 
  +     * the {@link #stop()} method to perform the tasks required to stop the component.
        *
        * Note: this method is called from within a synchronized block, so be careful what
you call as you
        * may create a deadlock.
  @@ -134,8 +134,8 @@
       }
   
       /**
  -     * Do the failure tasks for the component.  Called in the FAILED state by the fail()
  -     * method to perform the tasks required to cleanup a failed component.
  +     * Do the failure tasks for the component.  Called in the {@link #FAILED} state by

  +     * the {@link #fail()} method to perform the tasks required to cleanup a failed component.
        *
        * Note: this method is called from within a synchronized block, so be careful what
you call as you
        * may create a deadlock.
  @@ -254,11 +254,11 @@
       }
   
       /**
  -     * Moves this MBean to the STARTING state and then attempst to move this MBean immedately
to the STARTED
  -     * state.
  +     * Moves this MBean to the {@link State#STARTING} state and then attempts to move this
MBean immediately 
  +     * to the {@link State#STARTED} state.
        *
  -     * Note:  This method cannot be call while the current thread holds a syncronized lock
on this MBean,
  -     * because this method sends JMX notifications.  Sending a general notification from
a synchronized block
  +     * Note:  This method cannot be called while the current thread holds a synchronized
lock on this MBean,
  +     * because this method sends JMX notifications. Sending a general notification from
a synchronized block
        * is a bad idea and therefore not allowed.
        *
        * @throws java.lang.Exception  If an exception occurs while starting this MBean
  @@ -280,9 +280,9 @@
       }
   
       /**
  -     * Starts this MBean and then attempts to start all of the start dependent children
of this MBean.
  +     * Starts this MBean and then attempts to start all of its start dependent children.
        *
  -     * Note:  This method can not be call while the current thread holds a syncronized
lock on this MBean,
  +     * Note:  This method cannot be call while the current thread holds a synchronized
lock on this MBean,
        * because this method sends JMX notifications.  Sending a general notification from
a synchronized block
        * is a bad idea and therefore not allowed.
        *
  @@ -385,7 +385,7 @@
       }
   
       /**
  -     * Attempts to bring the component into the fully running state. If an Exception occurs
while
  +     * Attempts to bring the component into {@link State#RUNNING} state. If an Exception
occurs while
        * starting the component, the component will be failed.
        * @throws java.lang.Exception if a problem occurs while starting the component
        *
  
  
  
  1.14      +2 -2      incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/jmx/GBeanMBean.java
  
  Index: GBeanMBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/jmx/GBeanMBean.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- GBeanMBean.java	10 Mar 2004 09:59:00 -0000	1.13
  +++ GBeanMBean.java	13 Mar 2004 23:48:56 -0000	1.14
  @@ -57,7 +57,7 @@
   
   /**
    * A GBeanMBean is a J2EE Management Managed Object, and is standard base for Geronimo
services.
  - * This wraps one or more target POJOs and exposes the attributes and opperation according
to a supplied
  + * This wraps one or more target POJOs and exposes the attributes and operations according
to a supplied
    * {@link GBeanInfo} instance.  The GBeanMBean also supports caching of attribute values
and invocation results
    * which can reduce the number of calls to a target.
    *
  
  
  
  1.23      +4 -7      incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java
  
  Index: Kernel.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- Kernel.java	10 Mar 2004 09:59:01 -0000	1.22
  +++ Kernel.java	13 Mar 2004 23:48:56 -0000	1.23
  @@ -137,10 +137,7 @@
               processQueue();
               KernelReference ref = (KernelReference) kernels.get(name);
               if (ref != null) {
  -                Kernel kernel = (Kernel) ref.get();
  -                if (kernel != null) {
  -                    return kernel;
  -                }
  +                return (Kernel) ref.get();
               }
           }
           return null;
  @@ -234,7 +231,7 @@
   
   
       public boolean isLoaded(ObjectName name) {
  -        return mbServer.isRegistered(name);
  +        return mbServer != null && mbServer.isRegistered(name);
       }
   
       public void loadGBean(ObjectName name, GBeanMBean gbean) throws InstanceAlreadyExistsException,
InvalidConfigException {
  @@ -280,7 +277,7 @@
       }
   
       /**
  -     * Boot this Kernel, triggering the instanciation of the MBeanServer and
  +     * Boot this Kernel, triggering the instantiation of the MBeanServer and
        * the registration of the DependencyService and ConfigurationStore
        * @throws java.lang.Exception if the boot fails
        */
  
  
  
  1.4       +11 -20    incubator-geronimo/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanInfoTest.java
  
  Index: GBeanInfoTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanInfoTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- GBeanInfoTest.java	10 Mar 2004 09:59:02 -0000	1.3
  +++ GBeanInfoTest.java	13 Mar 2004 23:48:56 -0000	1.4
  @@ -31,14 +31,12 @@
   
       public void testGetGBeanInfo() {
           // 1. Test GBean that exists
  -        GBeanInfo gbeanInfo = GBeanInfo.getGBeanInfo(MockGBean.class.getName(),
  -                MockGBean.class.getClassLoader());
  +        GBeanInfo gbeanInfo = GBeanInfo.getGBeanInfo(MockGBean.class.getName(), MockGBean.class.getClassLoader());
           assertNotNull(gbeanInfo);
   
           // 2. Test GBean that doesn't exist
           try {
  -            GBeanInfo.getGBeanInfo("ClassThatDoesNotExist", this.getClass()
  -                    .getClassLoader());
  +            GBeanInfo.getGBeanInfo("ClassThatDoesNotExist", this.getClass().getClassLoader());
               fail("InvalidConfigurationException expected");
           } catch (InvalidConfigurationException expected) {
           }
  @@ -46,8 +44,7 @@
           // 3. Test GBean that exist, but doesn't declare a getGBeanInfo()
           // method
           try {
  -            GBeanInfo.getGBeanInfo(String.class.getName(), this.getClass()
  -                    .getClassLoader());
  +            GBeanInfo.getGBeanInfo(String.class.getName(), this.getClass().getClassLoader());
               fail("InvalidConfigurationException expected");
           } catch (InvalidConfigurationException expected) {
           }
  @@ -65,8 +62,7 @@
        * void GBeanInfo(String, String, Set, GConstructorInfo, Set, Set, Set)
        */
       public void testGBeanInfoStringStringSetGConstructorInfoSetSetSet() {
  -        GBeanInfo gbeanInfo = new GBeanInfo(null, null, null, null, null, null,
  -                null);
  +        GBeanInfo gbeanInfo = new GBeanInfo(null, null, null, null, null, null, null);
           assertNotNull(gbeanInfo);
       }
   
  @@ -131,21 +127,17 @@
   
       final static String nonPersistentAttrName = "nonPersistentAttribute";
   
  -    final static GAttributeInfo nonPersistentAttrInfo = new GAttributeInfo(
  -            nonPersistentAttrName, false);
  +    final static GAttributeInfo nonPersistentAttrInfo = new GAttributeInfo(nonPersistentAttrName,
false);
   
       final static String persistentAttrName = "persistentAttribute";
   
  -    final static GAttributeInfo persistentAttrInfo = new GAttributeInfo(
  -            persistentAttrName, true);
  +    final static GAttributeInfo persistentAttrInfo = new GAttributeInfo(persistentAttrName,
true);
   
       final static GOperationInfo opInfo = new GOperationInfo("operation");
   
  -    final static GNotificationInfo notificationInfo = new GNotificationInfo(
  -            "notification", Collections.singleton(null));
  +    final static GNotificationInfo notificationInfo = new GNotificationInfo("notification",
Collections.singleton(null));
   
  -    final static GReferenceInfo refInfo = new GReferenceInfo("reference",
  -            String.class);
  +    final static GReferenceInfo refInfo = new GReferenceInfo("reference", String.class);
   
       public void setUp() {
           gbeanInfo = MockGBean.getGBeanInfo();
  @@ -161,9 +153,8 @@
   
           static {
               GBeanInfoFactory infoFactory = new GBeanInfoFactory(MockGBean.class);
  -            infoFactory.setConstructor(new GConstructorInfo(new String[] {
  -                    String.class.getName(), Integer.class.getName()},
  -                    new Class[] { String.class, Integer.class}));
  +            infoFactory.setConstructor(new GConstructorInfo(new String[] { String.class.getName(),
  +                    Integer.class.getName()}, new Class[] { String.class, Integer.class}));
               infoFactory.addAttribute(nonPersistentAttrInfo);
               infoFactory.addAttribute(persistentAttrInfo);
               infoFactory.addOperation(opInfo);
  
  
  

Mime
View raw message