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/deployment/src/java/org/apache/geronimo/deployment/plugin/jmx JMXDeploymentManager.java
Date Wed, 02 Jun 2004 07:05:30 GMT
jboynes     2004/06/02 00:05:30

  Modified:    modules/deployment/src/java/org/apache/geronimo/deployment/plugin/jmx
                        JMXDeploymentManager.java
  Log:
  Check for disconnection
  
  Revision  Changes    Path
  1.2       +14 -5     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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JMXDeploymentManager.java	2 Jun 2004 06:50:41 -0000	1.1
  +++ JMXDeploymentManager.java	2 Jun 2004 07:05:30 -0000	1.2
  @@ -42,8 +42,8 @@
   import org.apache.geronimo.deployment.plugin.TargetImpl;
   
   /**
  - * 
  - * 
  + *
  + *
    * @version $Revision$ $Date$
    */
   public class JMXDeploymentManager implements DeploymentManager {
  @@ -69,6 +69,9 @@
       }
   
       public Target[] getTargets() {
  +        if (kernel == null) {
  +            throw new IllegalStateException("Disconnected");
  +        }
           Target target = new TargetImpl("default", null);
           return new Target[]{target};
       }
  @@ -81,7 +84,7 @@
           throw new UnsupportedOperationException();
       }
   
  -    public TargetModuleID[] getRunningModules(ModuleType moduleType, Target[] targetList)
throws TargetException{
  +    public TargetModuleID[] getRunningModules(ModuleType moduleType, Target[] targetList)
throws TargetException {
           throw new UnsupportedOperationException();
       }
   
  @@ -94,12 +97,18 @@
       }
   
       public ProgressObject start(TargetModuleID[] moduleIDList) {
  +        if (kernel == null) {
  +            throw new IllegalStateException("Disconnected");
  +        }
           StartCommand command = new StartCommand(kernel, moduleIDList);
           new Thread(command).start();
           return command;
       }
   
       public ProgressObject stop(TargetModuleID[] moduleIDList) {
  +        if (kernel == null) {
  +            throw new IllegalStateException("Disconnected");
  +        }
           StopCommand command = new StopCommand(kernel, moduleIDList);
           new Thread(command).start();
           return command;
  @@ -110,7 +119,7 @@
       }
   
       public boolean isRedeploySupported() {
  -        throw new UnsupportedOperationException();
  +        return false;
       }
   
       public ProgressObject redeploy(TargetModuleID[] moduleIDList, File moduleArchive, File
deploymentPlan) {
  
  
  

Mime
View raw message