geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject cvs commit: incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/deployment DeploymentController.java
Date Mon, 29 Sep 2003 13:03:00 GMT
janb        2003/09/29 06:03:00

  Modified:    modules/kernel/src/java/org/apache/geronimo/kernel/deployment
                        DeploymentController.java
  Log:
  Fixed problem whereby if a url could not be deployed because there was no deployer for it,
  another duplicate deploy goal would be added for it next time the scanner ran.
  
  Revision  Changes    Path
  1.2       +13 -3     incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/deployment/DeploymentController.java
  
  Index: DeploymentController.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/deployment/DeploymentController.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DeploymentController.java	8 Sep 2003 04:38:33 -0000	1.1
  +++ DeploymentController.java	29 Sep 2003 13:03:00 -0000	1.2
  @@ -148,23 +148,33 @@
        * @jmx:managed-operation
        */
       public synchronized void planDeployment(ObjectName source, Set urlInfos) {
  +
  +
  +        Set lastScan = (Set) scanResults.get(source);
  +
           // find new and existing urlInfos
           for (Iterator i = urlInfos.iterator(); i.hasNext();) {
               URLInfo urlInfo = (URLInfo) i.next();
               URL url = urlInfo.getUrl();
  +
  +
               if (!isDeployed(url)) {
  -                goals.add(new DeployURL(url, urlInfo.getType()));
  +                //only add a new deployment goal if we don't already have one. One can
already exist if
  +                //there was no deployer available when the url was scanned
  +                if ((lastScan == null) || ((lastScan != null) &&!lastScan.contains
(urlInfo))){
  +                    goals.add(new DeployURL(url, urlInfo.getType()));
  +                }
               } else {
                   goals.add(new RedeployURL(url));
               }
           }
   
           // create remove goals for all urlInfos that were found last time but not now
  -        Set lastScan = (Set) scanResults.get(source);
           if (lastScan != null) {
               for (Iterator i = lastScan.iterator(); i.hasNext();) {
                   URLInfo urlInfo = (URLInfo) i.next();
                   URL url = urlInfo.getUrl();
  +	       
                   if (!urlInfos.contains(urlInfo) && isDeployed(url)) {
                       goals.add(new UndeployURL(url));
                   }
  
  
  

Mime
View raw message