geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject cvs commit: incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/jmx JMXDeploymentManager.java
Date Thu, 22 Jul 2004 03:24:45 GMT
gdamour     2004/07/21 20:24:45

  Modified:    modules/deployment/src/java/org/apache/geronimo/deployment/plugin/jmx
                        JMXDeploymentManager.java
  Log:
  Filters by ModuleType the returned configurations.
  
  Revision  Changes    Path
  1.8       +8 -7      incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
  
  Index: JMXDeploymentManager.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- JMXDeploymentManager.java	6 Jul 2004 05:36:12 -0000	1.7
  +++ JMXDeploymentManager.java	22 Jul 2004 03:24:45 -0000	1.8
  @@ -47,6 +47,7 @@
   import org.apache.geronimo.kernel.Kernel;
   import org.apache.geronimo.kernel.KernelMBean;
   import org.apache.geronimo.kernel.config.ConfigurationInfo;
  +import org.apache.geronimo.kernel.config.ConfigurationModuleType;
   import org.apache.geronimo.kernel.config.NoSuchStoreException;
   import org.apache.geronimo.kernel.jmx.MBeanProxyFactory;
   import org.apache.geronimo.kernel.management.State;
  @@ -95,28 +96,28 @@
           return targets;
       }
   
  -    public TargetModuleID[] getAvailableModules(ModuleType moduleType, Target[] targetList)
throws TargetException {
  +    public TargetModuleID[] getAvailableModules(final ModuleType moduleType, Target[] targetList)
throws TargetException {
           ConfigFilter filter = new ConfigFilter() {
               public boolean accept(ConfigurationInfo info) {
  -                return true;
  +                return info.getType() == ConfigurationModuleType.getFromValue(moduleType.getValue());
               }
           };
           return getModules(targetList, filter);
       }
   
  -    public TargetModuleID[] getNonRunningModules(ModuleType moduleType, Target[] targetList)
throws TargetException {
  +    public TargetModuleID[] getNonRunningModules(final ModuleType moduleType, Target[]
targetList) throws TargetException {
           ConfigFilter filter = new ConfigFilter() {
               public boolean accept(ConfigurationInfo info) {
  -                return info.getState() != State.RUNNING;
  +                return info.getState() != State.RUNNING && info.getType() == ConfigurationModuleType.getFromValue(moduleType.getValue());
               }
           };
           return getModules(targetList, filter);
       }
   
  -    public TargetModuleID[] getRunningModules(ModuleType moduleType, Target[] targetList)
throws TargetException {
  +    public TargetModuleID[] getRunningModules(final ModuleType moduleType, Target[] targetList)
throws TargetException {
           ConfigFilter filter = new ConfigFilter() {
               public boolean accept(ConfigurationInfo info) {
  -                return info.getState() == State.RUNNING;
  +                return info.getState() == State.RUNNING && info.getType() == ConfigurationModuleType.getFromValue(moduleType.getValue());
               }
           };
           return getModules(targetList, filter);
  
  
  

Mime
View raw message