diff options
| author | Robert Gemmell <robbie@apache.org> | 2010-06-10 09:05:03 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2010-06-10 09:05:03 +0000 |
| commit | 2872aed36a931f33fb47c101b00467e6a03cc400 (patch) | |
| tree | 0b3eb98c2510f1e4c6167fdb5d9d2399e0ad9c0c /java | |
| parent | 1951f9cf0c246b53d1cddf65dfdb059ad8662377 (diff) | |
| download | qpid-python-2872aed36a931f33fb47c101b00467e6a03cc400.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/qpid@953254 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
| -rw-r--r-- | java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java b/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java index aeec8798d5..bea4648b30 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java +++ b/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(); |
