[jboss-cvs] JBossAS SVN: r95216 - projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 20 18:17:49 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-10-20 18:17:49 -0400 (Tue, 20 Oct 2009)
New Revision: 95216
Modified:
projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerImpl.java
Log:
Undeploy only if we have a diff
Modified: projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerImpl.java
===================================================================
--- projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerImpl.java 2009-10-20 22:16:36 UTC (rev 95215)
+++ projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerImpl.java 2009-10-20 22:17:49 UTC (rev 95216)
@@ -182,15 +182,18 @@
logBundleDeployments("OLD diff", diff);
// Undeploy the bundles through the DeployerService
- try
+ if (diff.size() > 0)
{
- Deployment[] depArr = diff.toArray(new Deployment[diff.size()]);
- deployer.undeploy(depArr);
+ try
+ {
+ Deployment[] depArr = diff.toArray(new Deployment[diff.size()]);
+ deployer.undeploy(depArr);
+ }
+ catch (Exception ex)
+ {
+ log.error("Cannot undeploy bundles", ex);
+ }
}
- catch (Exception ex)
- {
- log.error("Cannot undeploy bundles", ex);
- }
return diff.size();
}
More information about the jboss-cvs-commits
mailing list