diff options
| author | Keith Wall <kwall@apache.org> | 2014-03-17 17:04:05 +0000 |
|---|---|---|
| committer | Keith Wall <kwall@apache.org> | 2014-03-17 17:04:05 +0000 |
| commit | 8ad99bd6b07efe9f91ed9cde2b2121028005c317 (patch) | |
| tree | 8a9b33c0294fe1745b617ca1399fccd654de1759 /qpid/java/broker-plugins/derby-store/src | |
| parent | ec486999608568e37a55dc9c81d9be133d95ebc3 (diff) | |
| download | qpid-python-8ad99bd6b07efe9f91ed9cde2b2121028005c317.tar.gz | |
QPID-5624: Introduce configurationStoreSettings VH attributes
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/java-broker-bdb-ha2@1578463 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker-plugins/derby-store/src')
2 files changed, 8 insertions, 4 deletions
diff --git a/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStore.java b/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStore.java index 25ce3b8adc..f7b65075f7 100644 --- a/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStore.java +++ b/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStore.java @@ -132,12 +132,13 @@ public class DerbyMessageStore extends AbstractJDBCMessageStore implements Messa //Update to pick up QPID_WORK and use that as the default location not just derbyDB Map<String, Object> messageStoreSettings = virtualHost.getMessageStoreSettings(); + Map<String, Object> configurationStoreSettings = virtualHost.getConfigurationStoreSettings(); _driverClass = (Class<Driver>) Class.forName(SQL_DRIVER_NAME); String databasePath = null; if (isConfigStoreOnly()) { - databasePath = (String) virtualHost.getAttribute(VirtualHost.CONFIG_STORE_PATH); + databasePath = (String) configurationStoreSettings.get(DurableConfigurationStore.STORE_PATH); } else { diff --git a/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java b/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java index 4e81c4e9ba..a3610901c5 100644 --- a/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java +++ b/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java @@ -65,12 +65,15 @@ public class DerbyMessageStoreFactory implements MessageStoreFactory, DurableCon } } - if(getType().equals(attributes.get(VirtualHost.CONFIG_STORE_TYPE))) + + @SuppressWarnings("unchecked") + Map<String, Object> configurationStoreSettings = (Map<String, Object>) attributes.get(VirtualHost.CONFIGURATION_STORE_SETTINGS); + if(getType().equals(configurationStoreSettings.get(DurableConfigurationStore.STORE_TYPE))) { - Object storePath = attributes.get(VirtualHost.CONFIG_STORE_PATH); + Object storePath = configurationStoreSettings.get(DurableConfigurationStore.STORE_PATH); if(!(storePath instanceof String)) { - throw new IllegalArgumentException("Attribute '"+ VirtualHost.CONFIG_STORE_PATH + throw new IllegalArgumentException("Setting '"+ DurableConfigurationStore.STORE_PATH +"' is required and must be of type String."); } |
