geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r613388 - in /geronimo/server: branches/2.0/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
Date Sat, 19 Jan 2008 12:54:01 GMT
Author: vamsic007
Date: Sat Jan 19 04:53:59 2008
New Revision: 613388

URL: http://svn.apache.org/viewvc?rev=613388&view=rev
Log:
GERONIMO-3764 DeployerReaper fails to cleanup the temp directories left behind by deployer
 o DepoymentReaper needs full path, not just the filename.
 o DeploymentUtil.recursiveDelete() returns true upon successful deletion.
 o Remove the dirName, not deleteDir from pendingDeletionIndex.

Modified:
    geronimo/server/branches/2.0/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
    geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java

Modified: geronimo/server/branches/2.0/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java?rev=613388&r1=613387&r2=613388&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
Sat Jan 19 04:53:59 2008
@@ -130,7 +130,8 @@
         } finally {
             if (tmpDir != null) {
                 if (!DeploymentUtil.recursiveDelete(tmpDir)) {
-                    pendingDeletionIndex.setProperty(tmpDir.getName(), "delete");
+                    log.debug("Queued deployment directory to be reaped "+tmpDir);
+                    pendingDeletionIndex.setProperty(tmpDir.getAbsolutePath(), "delete");
                 }
             }
         }
@@ -415,7 +416,7 @@
             ConfigurationData configurationData = (ConfigurationData) iterator.next();
             File configurationDir = configurationData.getConfigurationDir();
             if (!DeploymentUtil.recursiveDelete(configurationDir)) {
-                pendingDeletionIndex.setProperty(configurationDir.getName(), "delete");
+                pendingDeletionIndex.setProperty(configurationDir.getAbsolutePath(), "delete");
                 log.debug("Queued deployment directory to be reaped " + configurationDir);
             }
         }
@@ -464,8 +465,8 @@
                 String dirName = (String) list.nextElement();
                 File deleteDir = new File(dirName);
 
-                if (!DeploymentUtil.recursiveDelete(deleteDir)) {
-                    pendingDeletionIndex.remove(deleteDir);
+                if (DeploymentUtil.recursiveDelete(deleteDir)) {
+                    pendingDeletionIndex.remove(dirName);
                     log.debug("Reaped deployment directory " + deleteDir);
                 }
             }

Modified: geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java?rev=613388&r1=613387&r2=613388&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
Sat Jan 19 04:53:59 2008
@@ -129,7 +129,7 @@
         } finally {
             if (tmpDir != null) {
                 if (!DeploymentUtil.recursiveDelete(tmpDir)) {
-                    reaper.delete(tmpDir.getName(), "delete");
+                    reaper.delete(tmpDir.getAbsolutePath(), "delete");
                 }
             }
         }
@@ -458,7 +458,7 @@
             ConfigurationData configurationData = (ConfigurationData) iterator.next();
             File configurationDir = configurationData.getConfigurationDir();
             if (!DeploymentUtil.recursiveDelete(configurationDir)) {
-                reaper.delete(configurationDir.getName(), "delete");
+                reaper.delete(configurationDir.getAbsolutePath(), "delete");
             }
         }
     }
@@ -534,8 +534,8 @@
                 String dirName = (String) list.nextElement();
                 File deleteDir = new File(dirName);
 
-                if (!DeploymentUtil.recursiveDelete(deleteDir)) {
-                    pendingDeletionIndex.remove(deleteDir);
+                if (DeploymentUtil.recursiveDelete(deleteDir)) {
+                    pendingDeletionIndex.remove(dirName);
                     log.debug("Reaped deployment directory " + deleteDir);
                 }
             }



Mime
View raw message