Author: ritchiem
Date: 2008-10-03 07:09:19 -0400 (Fri, 03 Oct 2008)
New Revision: 2584
Modified:
store/branches/java/broker-queue-refactor/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
store/branches/java/broker-queue-refactor/java/bdbstore/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgrade.java
Log:
BDBMessageStore : Removed debug logging that was committed by mistake
BDBStoreUpgrade : Corrected default usage line and added ' to end of a log statement.
Modified:
store/branches/java/broker-queue-refactor/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
===================================================================
---
store/branches/java/broker-queue-refactor/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2008-10-03
10:44:49 UTC (rev 2583)
+++
store/branches/java/broker-queue-refactor/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2008-10-03
11:09:19 UTC (rev 2584)
@@ -342,8 +342,6 @@
try
{
_environment = new Environment(environmentPath, envConfig);
- System.err.println("Created("+this+")
Environment:"+_environment);
- new Exception().printStackTrace();
return false;
}
catch (DatabaseException de)
@@ -356,12 +354,9 @@
{
_environment.cleanLog();
_environment.close();
- System.err.println("Close("+this+")
Environment:"+_environment);
}
_environment = new Environment(environmentPath, envConfig);
- System.err.println("Created("+this+")
Environment:"+_environment);
- new Exception().printStackTrace();
-
+
return true;
}
else
@@ -456,7 +451,6 @@
// get a chance to finish.
_environment.cleanLog();
_environment.close();
- System.err.println("Close("+this+")
Environment:"+_environment);
}
}
Modified:
store/branches/java/broker-queue-refactor/java/bdbstore/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgrade.java
===================================================================
---
store/branches/java/broker-queue-refactor/java/bdbstore/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgrade.java 2008-10-03
10:44:49 UTC (rev 2583)
+++
store/branches/java/broker-queue-refactor/java/bdbstore/src/tools/java/org/apache/qpid/server/store/berkeleydb/BDBStoreUpgrade.java 2008-10-03
11:09:19 UTC (rev 2584)
@@ -128,15 +128,10 @@
if (userInteract("Upgrade destination exists do you wish to replace
it?"))
{
- try
+ if (!FileUtils.delete(_toDir, true))
{
- FileUtils.delete(_toDir, true);
+ throw new IllegalArgumentException("Unable to remove upgrade
destination '" + toDir + "'");
}
- catch (IOException e)
- {
- throw new IllegalArgumentException("Unable to remove upgrade
destination '" + toDir + "':"
- + e.getMessage());
- }
}
else
{
@@ -147,15 +142,10 @@
{
if (force)
{
- try
+ if (!FileUtils.delete(_toDir, true))
{
- FileUtils.delete(_toDir, true);
+ throw new IllegalArgumentException("Unable to remove upgrade
destination '" + toDir + "'");
}
- catch (IOException e)
- {
- throw new IllegalArgumentException("Unable to remove upgrade
destination '" + toDir + "':"
- + e.getMessage());
- }
}
else
{
@@ -265,7 +255,7 @@
*/
public void upgradeFromVersion(int version, File fromDir, File toDir, File backupDir,
boolean force) throws Exception
{
- _logger.info("Located store to upgrade at '" + fromDir);
+ _logger.info("Located store to upgrade at '" + fromDir +
"'");
if (_interactive)
{
@@ -468,7 +458,7 @@
private static void usage()
{
System.out.println("usage: BDBStoreUpgrade:\n [-h|--help] [-q|--quiet]
[-f|--force] [-b|--backup <Path to backup-db>] " +
- "-o|--input <Path to input-db> -o|--output <Path
to upgraded-db>");
+ "-i|--input <Path to input-db> -o|--output <Path
to upgraded-db>");
}
private static void help()