geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/deployment/service ServiceDeploymentPlanner.java
Date Tue, 11 Nov 2003 04:39:09 GMT
dain        2003/11/10 20:39:09

  Modified:    modules/kernel/src/java/org/apache/geronimo/kernel/deployment/service
                        ServiceDeploymentPlanner.java
  Log:
  GeronimoMBeans now use a single DeployGeronimoMBean tast instead of the complex plan
  a general MBean takes to start.
  
  Revision  Changes    Path
  1.5       +14 -9     incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/deployment/service/ServiceDeploymentPlanner.java
  
  Index: ServiceDeploymentPlanner.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/deployment/service/ServiceDeploymentPlanner.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ServiceDeploymentPlanner.java	27 Oct 2003 21:29:46 -0000	1.4
  +++ ServiceDeploymentPlanner.java	11 Nov 2003 04:39:08 -0000	1.5
  @@ -92,6 +92,7 @@
   import org.apache.geronimo.kernel.deployment.task.RegisterMBeanInstance;
   import org.apache.geronimo.kernel.deployment.task.StartMBeanInstance;
   import org.apache.geronimo.kernel.deployment.task.StopMBeanInstance;
  +import org.apache.geronimo.kernel.deployment.task.DeployGeronimoMBean;
   import org.apache.geronimo.kernel.jmx.JMXUtil;
   import org.apache.geronimo.kernel.service.GeronimoMBeanInfoXMLLoader;
   
  @@ -221,7 +222,6 @@
           // register a plan to create each mbean
           NodeList nl = doc.getElementsByTagName("mbean");
           for (int i = 0; i < nl.getLength(); i++) {
  -            DeploymentPlan createPlan = new DeploymentPlan();
   
               Element mbeanElement = (Element) nl.item(i);
               metadata = mbeanLoader.loadXML(baseURI, mbeanElement);
  @@ -231,14 +231,19 @@
               metadata.setLoaderName(loaderName);
               metadata.setParentName(deploymentName);
               metadata.setBaseURI(baseURI);
  -            CreateMBeanInstance createTask = new CreateMBeanInstance(server, metadata);
  -            createPlan.addTask(createTask);
  -            InitializeMBeanInstance initTask = new InitializeMBeanInstance(server, metadata);
  -            createPlan.addTask(initTask);
  -            StartMBeanInstance startTask = new StartMBeanInstance(server, metadata);
  -            createPlan.addTask(startTask);
  +            if (metadata.isGeronimoMBean()) {
  +                plans.add(new DeploymentPlan(new DeployGeronimoMBean(server, metadata)));
  +            } else {
  +                DeploymentPlan createPlan = new DeploymentPlan();
  +                CreateMBeanInstance createTask = new CreateMBeanInstance(server, metadata);
  +                createPlan.addTask(createTask);
  +                InitializeMBeanInstance initTask = new InitializeMBeanInstance(server,
metadata);
  +                createPlan.addTask(initTask);
  +                StartMBeanInstance startTask = new StartMBeanInstance(server, metadata);
  +                createPlan.addTask(startTask);
  +                plans.add(createPlan);
  +            }
   
  -            plans.add(createPlan);
           }
   
           goals.remove(goal);
  
  
  

Mime
View raw message