Author: borges
Date: 2012-01-12 07:09:47 -0500 (Thu, 12 Jan 2012)
New Revision: 12014
Modified:
trunk/hornetq-bootstrap/src/main/java/org/hornetq/integration/bootstrap/HornetQBootstrapServer.java
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFile.java
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/SyncSpeedTest.java
Log:
Log error if file fails to delete.
Modified:
trunk/hornetq-bootstrap/src/main/java/org/hornetq/integration/bootstrap/HornetQBootstrapServer.java
===================================================================
---
trunk/hornetq-bootstrap/src/main/java/org/hornetq/integration/bootstrap/HornetQBootstrapServer.java 2012-01-12
12:09:19 UTC (rev 12013)
+++
trunk/hornetq-bootstrap/src/main/java/org/hornetq/integration/bootstrap/HornetQBootstrapServer.java 2012-01-12
12:09:47 UTC (rev 12014)
@@ -32,9 +32,8 @@
import org.jboss.kernel.spi.deployment.KernelDeployment;
/**
- * This is the method in which the HornetQ server can be deployed externall outside of
jBoss. Alternatively a user can embed
- * by using the same code as in main
- *
+ * This is the method in which the HornetQ server can be deployed externally outside of
jBoss.
+ * Alternatively a user can embed by using the same code as in main
* @author <a href="ataylor(a)redhat.com">Andy Taylor</a>
*/
public class HornetQBootstrapServer extends BasicBootstrap
@@ -84,7 +83,10 @@
final File file = new File(dirName + "/STOP_ME");
if (file.exists())
{
- file.delete();
+ if (!file.delete())
+ {
+ log.error("Failed to delete " + file.getAbsolutePath());
+ }
}
final Timer timer = new Timer("HornetQ Server Shutdown Timer", true);
timer.scheduleAtFixedRate(new TimerTask()
Modified:
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFile.java
===================================================================
---
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFile.java 2012-01-12
12:09:19 UTC (rev 12013)
+++
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFile.java 2012-01-12
12:09:47 UTC (rev 12014)
@@ -103,7 +103,10 @@
close();
}
- file.delete();
+ if (!file.delete())
+ {
+ log.error("Failed to delete file " + this);
+ }
}
public void copyTo(SequentialFile newFileName) throws Exception
Modified:
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/SyncSpeedTest.java
===================================================================
---
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/SyncSpeedTest.java 2012-01-12
12:09:19 UTC (rev 12013)
+++
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/SyncSpeedTest.java 2012-01-12
12:09:47 UTC (rev 12014)
@@ -28,7 +28,7 @@
/**
* A SyncSpeedTest
- *
+ *
* This class just provides some diagnostics on how fast your disk can sync
* Useful when determining performance issues
*
@@ -168,7 +168,11 @@
if (file.exists())
{
- file.delete();
+ if (!file.delete())
+ {
+ log.error("failed to delete file " + file);
+ }
+
}
file.createNewFile();
Show replies by date