[jboss-cvs] JBossAS SVN: r86167 - branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/hotdeploy.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Mar 20 11:15:48 EDT 2009


Author: emuckenhuber
Date: 2009-03-20 11:15:48 -0400 (Fri, 20 Mar 2009)
New Revision: 86167

Modified:
   branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java
Log:
only check modified deployments to avoid duplicate error messages.

Modified: branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java
===================================================================
--- branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java	2009-03-20 15:14:36 UTC (rev 86166)
+++ branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java	2009-03-20 15:15:48 UTC (rev 86167)
@@ -21,6 +21,7 @@
  */
 package org.jboss.system.server.profileservice.hotdeploy;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
@@ -50,6 +51,7 @@
  * @author adrian at jboss.org
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ * 
  * @version $Revision$
  * @see MainDeployer
  * @see ProfileService
@@ -283,6 +285,7 @@
 
       // Get the modified deployments
       boolean modified = false;
+      Collection<String> modifiedDeploymentNames = new ArrayList<String>();
       for (ProfileKey key : activeProfiles)
       {
          // The profile
@@ -315,6 +318,7 @@
                case ADDED:
                case MODIFIED:
                   deployer.addDeployment(ctx);
+                  modifiedDeploymentNames.add(ctx.getName());
                   break;
                case REMOVED:
                   deployer.removeDeployment(ctx.getName());
@@ -326,21 +330,25 @@
             modified = true;
       }
 
-      // Process the changes
       try
       {
+         // Process the changes
          if (modified)
          {
             deployer.process();
-            // Can be nulled by a shutdown
-            if (deployer != null)
-               deployer.checkComplete();
+            
+            // Only check the modified deployments to avoid duplicate errors
+            for(String name : modifiedDeploymentNames)
+            {
+               // Can be nulled by a shutdown
+               if (deployer != null)
+                  deployer.checkComplete(name);
+            }
          }
       }
       catch (Exception e)
       {
          log.warn("Failed to process changes", e);
-         // TODO: somehow need to ignore bad deployments to avoid repeated errors
          return;
       }
 




More information about the jboss-cvs-commits mailing list