User: d_jencks
  Date: 02/04/03 18:17:22

  Modified:    src/main/org/jboss/deployment MainDeployer.java
  Log:
  implemented automatic dependency management between mbeans and the classes their 
ObjectInstance indicates they require.  ClassNotFoundException results in the 
deployment waiting until new classes are available. Undeploying classes undeploys 
mbeans known to be using them, saving the current configuration until the classes once 
again become available.
  
  Revision  Changes    Path
  1.22      +34 -2     jboss-system/src/main/org/jboss/deployment/MainDeployer.java
  
  Index: MainDeployer.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss-system/src/main/org/jboss/deployment/MainDeployer.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- MainDeployer.java 3 Apr 2002 08:18:59 -0000       1.21
  +++ MainDeployer.java 4 Apr 2002 02:17:22 -0000       1.22
  @@ -40,6 +40,7 @@
   import javax.management.MalformedObjectNameException;
   import javax.management.Notification;
   import javax.management.ObjectName;
  +import org.jboss.system.ServiceControllerMBean;
   import org.jboss.system.ServiceMBeanSupport;
   import org.jboss.system.server.ServerConfig;
   import org.jboss.system.server.ServerConfigLocator;
  @@ -56,7 +57,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Marc Fleury</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Scott Stark</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>David Jencks</a>
  - * @version $Revision: 1.21 $
  + * @version $Revision: 1.22 $
    *
    * @jmx:mbean name="jboss.system:service=MainDeployer"
    *            extends="org.jboss.system.ServiceMBean, 
org.jboss.deployment.DeployerMBean"
  @@ -180,7 +181,7 @@
      
      /**
       * The <code>removeDeployer</code> method unregisters a deployer with the 
MainDeployer.
  -    * Currently deployed packages deployed with this deployer are not undeployed.
  +    * Deployed packages deployed with this deployer are undeployed.
       *
       * @param deployer a <code>SubDeployer</code> value
       * @jmx:managed-operation
  @@ -194,6 +195,24 @@
         {
            deployers.remove(deployer); 
         }
  +      List copy = null;
  +      synchronized(deploymentList)
  +      {
  +      copy = new ArrayList(deploymentList);
  +      }
  +      for (Iterator i = copy.iterator(); i.hasNext(); )
  +      {
  +      DeploymentInfo di = (DeploymentInfo)i.next();
  +      if (di.deployer == deployer)
  +      {
  +         undeploy(di);
  +         di.deployer = null;
  +         synchronized (waitingDeployments)
  +         {
  +            waitingDeployments.add(di);
  +         }
  +      }
  +      }
      }
   
      /**
  @@ -525,6 +544,19 @@
               makeLocalCopy(deployment);
               // initialize the unified classloaders for this deployment
               deployment.createClassLoaders();
  +         //See if this lets us deploy any waiting configurations.
  +         try
  +         {
  +            getServer().invoke(ServiceControllerMBean.OBJECT_NAME, 
  +                               "newClassLoaderNotification",
  +                               new Object[] {},
  +                               new String[] {});
  +         }
  +         catch (Exception e)
  +            {
  +            log.info("Exception notifying class removed", e);
  +         }
  +         //serviceController.newClassLoaderNotification();
            } // end of if ()
            
            
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to