geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject cvs commit: incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel KernelMBean.java Kernel.java
Date Fri, 04 Jun 2004 04:35:20 GMT
jboynes     2004/06/03 21:35:20

  Modified:    modules/kernel/src/java/org/apache/geronimo/kernel
                        KernelMBean.java Kernel.java
  Log:
  Provide a JMX-independent mechanism to see which GBeans are online
  
  Revision  Changes    Path
  1.12      +9 -1      incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/KernelMBean.java
  
  Index: KernelMBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/KernelMBean.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- KernelMBean.java	2 Jun 2004 19:50:41 -0000	1.11
  +++ KernelMBean.java	4 Jun 2004 04:35:20 -0000	1.12
  @@ -20,6 +20,7 @@
   import java.io.IOException;
   import java.net.URI;
   import java.util.List;
  +import java.util.Set;
   import javax.management.InstanceAlreadyExistsException;
   import javax.management.InstanceNotFoundException;
   import javax.management.MBeanServer;
  @@ -124,4 +125,11 @@
       Object invoke(ObjectName objectName, String methodName, Object[] args, String[] types)
throws Exception;
   
       boolean isLoaded(ObjectName name);
  +
  +    /**
  +     * Return the names of GBeans that match the query.
  +     * @param query the query to be performed
  +     * @return a Set<ObjectName> of the names of online GBeans that match the query
  +     */
  +    Set listGBeans(ObjectName query);
   }
  
  
  
  1.31      +6 -1      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.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Kernel.java	2 Jun 2004 19:50:40 -0000	1.30
  +++ Kernel.java	4 Jun 2004 04:35:20 -0000	1.31
  @@ -26,6 +26,7 @@
   import java.util.Hashtable;
   import java.util.Map;
   import java.util.List;
  +import java.util.Set;
   import javax.management.Attribute;
   import javax.management.InstanceAlreadyExistsException;
   import javax.management.InstanceNotFoundException;
  @@ -285,6 +286,10 @@
           } catch (MBeanRegistrationException e) {
               throw (IllegalStateException) new IllegalStateException("Error unloading GBean
" + name).initCause(e);
           }
  +    }
  +
  +    public Set listGBeans(ObjectName query) {
  +        return mbServer.queryNames(query, null);
       }
   
       public List listConfigurationStores() {
  
  
  

Mime
View raw message