summaryrefslogtreecommitdiff
path: root/qpid/java
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2010-06-10 09:05:03 +0000
committerRobert Gemmell <robbie@apache.org>2010-06-10 09:05:03 +0000
commit0e0c82bec1cb5a99e29040f5339b1ccd729204dc (patch)
treee8ef3cd90b7a46b0289a9365b252aaa2bb3088c9 /qpid/java
parentbfd0ea5b4582f99fe423ec18d206e7f3d2a635dc (diff)
downloadqpid-python-0e0c82bec1cb5a99e29040f5339b1ccd729204dc.tar.gz
QPID-2650: revert change in r952930 which removed the extraneous vhost subdir. A slightly larger change is required as it turns out derby wont use a provided empty directory
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@953254 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java
index aeec8798d5..bea4648b30 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java
@@ -218,8 +218,9 @@ public class DerbyMessageStore implements MessageStore
{
initialiseDriver();
- final String databasePath = storeConfiguration.getString(ENVIRONMENT_PATH_PROPERTY,
- System.getProperty("QPID_WORK")+"/derbyDB/" + name);
+ //Update to pick up QPID_WORK and use that as the default location not just derbyDB
+
+ final String databasePath = storeConfiguration.getString(ENVIRONMENT_PATH_PROPERTY, System.getProperty("QPID_WORK")+"/derbyDB");
File environmentPath = new File(databasePath);
if (!environmentPath.exists())
@@ -233,7 +234,7 @@ public class DerbyMessageStore implements MessageStore
CurrentActor.get().message(_logSubject, MessageStoreMessages.MST_STORE_LOCATION(environmentPath.getAbsolutePath()));
- createOrOpenDatabase(databasePath);
+ createOrOpenDatabase(name, databasePath);
}
private static synchronized void initialiseDriver() throws ClassNotFoundException
@@ -244,9 +245,10 @@ public class DerbyMessageStore implements MessageStore
}
}
- private void createOrOpenDatabase(final String environmentPath) throws SQLException
+ private void createOrOpenDatabase(String name, final String environmentPath) throws SQLException
{
- _connectionURL = "jdbc:derby:" + environmentPath + ";create=true";
+ //FIXME this the _vhost name should not be added here, but derby wont use an empty directory as was possibly just created.
+ _connectionURL = "jdbc:derby:" + environmentPath + "/" + name + ";create=true";
Connection conn = newAutoCommitConnection();