qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject svn commit: r1576732 [1/4] - in /qpid/branches/java-broker-bdb-ha2/qpid/java: ./ bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/ bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/ bdbstore/systests/src/main/java/org/apache/...
Date Wed, 12 Mar 2014 13:19:32 GMT
Author: orudyy
Date: Wed Mar 12 13:19:29 2014
New Revision: 1576732

URL: http://svn.apache.org/r1576732
Log:
QPID-5624: Remove virtualhost xml configuration. Move virtual host configuration into broker configuration store"

Added:
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/TestableMemoryMessageStoreFactory.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/server/store/QuotaMessageStoreFactory.java
Removed:
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/ExchangeConfiguration.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/QueueConfiguration.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/XmlConfigurationUtilities.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/plugins/AbstractConfiguration.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/QueueConfigurationTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/VirtualHostConfigurationTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/plugins/AbstractConfigurationTest.java
Modified:
    qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHost.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostFactory.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreFactory.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/VirtualHostTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBBackupTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBUpgradeTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HAClusterManagementTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HAClusterTwoNodeTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HATestClusterCreator.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/MemoryConfigurationEntryStore.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AbstractConfiguredObject.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/VirtualHostAdapter.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/DurableConfigurationStoreFactory.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/JDBCConnectionProviderFactory.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/MessageStoreFactory.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/VirtualHostFactory.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/AMQQueueFactory.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/StandardVirtualHost.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/StandardVirtualHostFactory.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/VirtualHostRecovererTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/store/ConfigurationEntryStoreTestCase.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/store/ManagementModeStoreHandlerTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/logging/messages/AbstractTestMessages.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/PriorityQueueListTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/AbstractDurableConfigurationStoreTestCase.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/TestMemoryMessageStoreFactory.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/util/BrokerTestHelper.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/MockVirtualHost.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/StandardVirtualHostTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/test/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControl.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/PlainConfigurationTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProvider.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProviderFactory.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreFactory.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/ManagedObjectRegistry.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/module.xml
    qpid/branches/java-broker-bdb-ha2/qpid/java/qpid-test-utils/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/etc/config-systests.json
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/client/ssl/SSLTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/AbstractACLTestCase.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/server/security/auth/manager/ExternalAuthenticationTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/server/store/MessageStoreTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/server/store/QuotaMessageStore.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStoreFactory.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/server/store/StoreOverfullTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/AccessControlProviderRestTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/AnonymousAccessRestTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/Asserts.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BasicAuthRestTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BindingRestTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsClientCertAuthTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/ExchangeRestTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/PreferencesProviderRestTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/PreferencesRestTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/QpidRestTestCase.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/QueueRestTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/RestTestHelper.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/SaslRestTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/StructureRestTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/UserPreferencesRestTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/VirtualHostRestTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/acl/BrokerACLTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/acl/ExchangeRestACLTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/acl/GroupRestACLTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/acl/LogViewerACLTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/acl/QueueRestACLTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/acl/UserPreferencesRestACLTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/acl/UserRestACLTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/test/client/timeouts/SyncWaitDelayTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/MaxDeliveryCountTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutDisabledTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutTest.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/TestBrokerConfiguration.java
    qpid/branches/java-broker-bdb-ha2/qpid/java/systests/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-bdb-spawn.0-10.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-bdb-spawn.0-8.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-bdb-spawn.0-9-1.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-bdb-spawn.0-9.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-bdb.0-10.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-bdb.0-8.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-bdb.0-9-1.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-bdb.0-9.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-dby-mem.0-10.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-dby-mem.0-8.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-dby-mem.0-9-1.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-dby-mem.0-9.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-dby-spawn.0-10.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-dby-spawn.0-8.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-dby-spawn.0-9.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-dby.0-10.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-dby.0-8.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-dby.0-9-1.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-dby.0-9.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-mms-spawn.0-10.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-mms-spawn.0-8.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-mms-spawn.0-9.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-mms.0-10.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-mms.0-8.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-mms.0-9-1.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/java-mms.0-9.testprofile
    qpid/branches/java-broker-bdb-ha2/qpid/java/test-profiles/testprofile.defaults

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHost.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHost.java?rev=1576732&r1=1576731&r2=1576732&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHost.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHost.java Wed Mar 12 13:19:29 2014
@@ -21,7 +21,6 @@ package org.apache.qpid.server.store.ber
  */
 
 import org.apache.log4j.Logger;
-import org.apache.qpid.server.configuration.VirtualHostConfiguration;
 import org.apache.qpid.server.connection.IConnectionRegistry;
 import org.apache.qpid.server.logging.subjects.MessageStoreLogSubject;
 import org.apache.qpid.server.model.VirtualHost;
@@ -54,13 +53,12 @@ public class BDBHAVirtualHost extends Ab
     BDBHAVirtualHost(VirtualHostRegistry virtualHostRegistry,
                      StatisticsGatherer brokerStatisticsGatherer,
                      org.apache.qpid.server.security.SecurityManager parentSecurityManager,
-                     VirtualHostConfiguration hostConfig,
                      VirtualHost virtualHost)
     {
-        super(virtualHostRegistry, brokerStatisticsGatherer, parentSecurityManager, hostConfig, virtualHost);
+        super(virtualHostRegistry, brokerStatisticsGatherer, parentSecurityManager, virtualHost);
     }
 
-    protected void initialiseStorage(VirtualHostConfiguration hostConfig, VirtualHost virtualHost)
+    protected void initialiseStorage(VirtualHost virtualHost)
     {
         _messageStore = new BDBMessageStore(new ReplicatedEnvironmentFacadeFactory());
 
@@ -179,7 +177,7 @@ public class BDBHAVirtualHost extends Ab
         @Override
         public void event(Event event)
         {
-            initialiseModel(getConfiguration());
+            initialiseModel();
         }
     }
 

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostFactory.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostFactory.java?rev=1576732&r1=1576731&r2=1576732&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostFactory.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostFactory.java Wed Mar 12 13:19:29 2014
@@ -19,16 +19,11 @@ package org.apache.qpid.server.store.ber
  *
  */
 
-import java.util.HashMap;
 import java.util.LinkedHashMap;
-import java.util.List;
 import java.util.Map;
-import org.apache.commons.configuration.Configuration;
-import org.apache.qpid.server.configuration.VirtualHostConfiguration;
 import org.apache.qpid.server.model.adapter.VirtualHostAdapter;
 import org.apache.qpid.server.plugin.VirtualHostFactory;
 import org.apache.qpid.server.stats.StatisticsGatherer;
-import org.apache.qpid.server.store.MessageStoreConstants;
 import org.apache.qpid.server.virtualhost.VirtualHost;
 import org.apache.qpid.server.virtualhost.VirtualHostRegistry;
 
@@ -47,13 +42,11 @@ public class BDBHAVirtualHostFactory imp
     public VirtualHost createVirtualHost(VirtualHostRegistry virtualHostRegistry,
                                          StatisticsGatherer brokerStatisticsGatherer,
                                          org.apache.qpid.server.security.SecurityManager parentSecurityManager,
-                                         VirtualHostConfiguration hostConfig,
                                          org.apache.qpid.server.model.VirtualHost virtualHost)
     {
         return new BDBHAVirtualHost(virtualHostRegistry,
                                     brokerStatisticsGatherer,
                                     parentSecurityManager,
-                                    hostConfig,
                                     virtualHost);
     }
 
@@ -86,73 +79,4 @@ public class BDBHAVirtualHostFactory imp
         return convertedMap;
     }
 
-    public Map<String, Object> convertVirtualHostConfiguration(Configuration configuration)
-    {
-
-        LinkedHashMap<String,Object> convertedMap = new LinkedHashMap<String, Object>();
-
-        Configuration storeConfiguration = configuration.subset("store");
-
-        convertedMap.put(org.apache.qpid.server.model.VirtualHost.STORE_PATH, storeConfiguration.getString(MessageStoreConstants.ENVIRONMENT_PATH_PROPERTY));
-        convertedMap.put(MessageStoreConstants.OVERFULL_SIZE_ATTRIBUTE, storeConfiguration.getString(MessageStoreConstants.OVERFULL_SIZE_PROPERTY));
-        convertedMap.put(MessageStoreConstants.UNDERFULL_SIZE_ATTRIBUTE, storeConfiguration.getString(MessageStoreConstants.UNDERFULL_SIZE_PROPERTY));
-        convertedMap.put("haGroupName", configuration.getString("store.highAvailability.groupName"));
-        convertedMap.put("haNodeName", configuration.getString("store.highAvailability.nodeName"));
-        convertedMap.put("haNodeAddress", configuration.getString("store.highAvailability.nodeHostPort"));
-        convertedMap.put("haHelperAddress", configuration.getString("store.highAvailability.helperHostPort"));
-
-        final Object haDurability = configuration.getString("store.highAvailability.durability");
-        if(haDurability !=null)
-        {
-            convertedMap.put("haDurability", haDurability);
-        }
-
-        final Object designatedPrimary = configuration.getString("store.highAvailability.designatedPrimary");
-        if(designatedPrimary!=null)
-        {
-            convertedMap.put("haDesignatedPrimary", designatedPrimary);
-        }
-
-        final Object coalescingSync = configuration.getString("store.highAvailability.coalescingSync");
-        if(coalescingSync!=null)
-        {
-            convertedMap.put("haCoalescingSync", coalescingSync);
-        }
-
-
-        Map<String, String> attributes = getEnvironmentMap(storeConfiguration, "envConfig");
-
-        if(!attributes.isEmpty())
-        {
-            convertedMap.put("bdbEnvironmentConfig",attributes);
-        }
-
-        attributes = getEnvironmentMap(storeConfiguration, "repConfig");
-
-        if(!attributes.isEmpty())
-        {
-            convertedMap.put("haReplicationConfig",attributes);
-        }
-
-        return convertedMap;
-
-    }
-
-    private Map<String, String> getEnvironmentMap(Configuration storeConfiguration, String configName)
-    {
-        final List<Object> argumentNames = storeConfiguration.getList(configName +".name");
-        final List<Object> argumentValues = storeConfiguration.getList(configName +".value");
-        final int initialSize = argumentNames.size();
-
-        final Map<String,String> attributes = new HashMap<String,String>(initialSize);
-
-        for (int i = 0; i < argumentNames.size(); i++)
-        {
-            final String argName = argumentNames.get(i).toString();
-            final String argValue = argumentValues.get(i).toString();
-
-            attributes.put(argName, argValue);
-        }
-        return attributes;
-    }
 }

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreFactory.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreFactory.java?rev=1576732&r1=1576731&r2=1576732&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreFactory.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreFactory.java Wed Mar 12 13:19:29 2014
@@ -20,12 +20,7 @@
  */
 package org.apache.qpid.server.store.berkeleydb;
 
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
-
-import org.apache.commons.configuration.Configuration;
 import org.apache.qpid.server.model.VirtualHost;
 import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
 import org.apache.qpid.server.plugin.MessageStoreFactory;
@@ -54,35 +49,6 @@ public class BDBMessageStoreFactory impl
     }
 
     @Override
-    public Map<String, Object> convertStoreConfiguration(Configuration storeConfiguration)
-    {
-        final List<Object> argumentNames = storeConfiguration.getList("envConfig.name");
-        final List<Object> argumentValues = storeConfiguration.getList("envConfig.value");
-        final int initialSize = argumentNames.size();
-
-        final Map<String,String> attributes = new HashMap<String,String>(initialSize);
-
-        for (int i = 0; i < argumentNames.size(); i++)
-        {
-            final String argName = argumentNames.get(i).toString();
-            final String argValue = argumentValues.get(i).toString();
-
-            attributes.put(argName, argValue);
-        }
-
-        if(initialSize != 0)
-        {
-            return Collections.singletonMap(BDBMessageStore.ENVIRONMENT_CONFIGURATION, (Object)attributes);
-        }
-        else
-        {
-            return Collections.emptyMap();
-        }
-
-
-    }
-
-    @Override
     public void validateAttributes(Map<String, Object> attributes)
     {
         if(getType().equals(attributes.get(VirtualHost.STORE_TYPE)))

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/VirtualHostTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/VirtualHostTest.java?rev=1576732&r1=1576731&r2=1576732&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/VirtualHostTest.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/VirtualHostTest.java Wed Mar 12 13:19:29 2014
@@ -27,7 +27,6 @@ import java.io.File;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Set;
 import java.util.UUID;
 
 import org.apache.qpid.server.configuration.ConfigurationEntry;
@@ -41,24 +40,21 @@ import org.apache.qpid.server.model.Virt
 import org.apache.qpid.server.stats.StatisticsGatherer;
 import org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacade;
 import org.apache.qpid.server.util.BrokerTestHelper;
-import org.apache.qpid.server.virtualhost.StandardVirtualHostFactory;
 import org.apache.qpid.test.utils.QpidTestCase;
-import org.apache.qpid.test.utils.TestFileUtils;
 import org.apache.qpid.util.FileUtils;
 
-import com.sleepycat.je.EnvironmentConfig;
 import com.sleepycat.je.rep.ReplicatedEnvironment;
 import com.sleepycat.je.rep.ReplicationConfig;
 
 public class VirtualHostTest extends QpidTestCase
 {
 
-    private Broker _broker;
+    private Broker<?> _broker;
     private StatisticsGatherer _statisticsGatherer;
     private RecovererProvider _recovererProvider;
     private File _configFile;
     private File _bdbStorePath;
-    private VirtualHost _host;
+    private VirtualHost<?> _host;
     private ConfigurationEntryStore _store;
 
     @Override
@@ -103,106 +99,64 @@ public class VirtualHostTest extends Qpi
         }
     }
 
-
-    public void testCreateBdbVirtualHostFromConfigurationFile()
-    {
-        String hostName = getName();
-        long logFileMax = 2000000;
-        _host = createHostFromConfiguration(hostName, logFileMax);
-        _host.setDesiredState(State.INITIALISING, State.ACTIVE);
-        assertEquals("Unexpected host name", hostName, _host.getName());
-        assertEquals("Unexpected host type", StandardVirtualHostFactory.TYPE, _host.getType());
-        assertEquals("Unexpected store type", new BDBMessageStoreFactory().getType(), _host.getAttribute(VirtualHost.STORE_TYPE));
-        assertEquals("Unexpected store path", _bdbStorePath.getAbsolutePath(), _host.getAttribute(VirtualHost.STORE_PATH));
-
-        BDBMessageStore messageStore = (BDBMessageStore) _host.getMessageStore();
-        EnvironmentConfig envConfig = messageStore.getEnvironmentFacade().getEnvironment().getConfig();
-        assertEquals("Unexpected JE log file max", String.valueOf(logFileMax), envConfig.getConfigParam(EnvironmentConfig.LOG_FILE_MAX));
-
-    }
-
-    public void testCreateBdbHaVirtualHostFromConfigurationFile()
+    public void testCreateBdbHaVirtualHostFromConfigurationEntry()
     {
-        String hostName = getName();
-
         String repStreamTimeout = "2 h";
         String nodeName = "node";
         String groupName = "group";
         String nodeHostPort = "localhost:" + findFreePort();
         String helperHostPort = nodeHostPort;
         String durability = "NO_SYNC,SYNC,NONE";
-        _host = createHaHostFromConfiguration(hostName, groupName, nodeName, nodeHostPort, helperHostPort, durability, repStreamTimeout);
+        String hostName = getName();
+
+        Map<String, Object> virtualHostAttributes = new HashMap<String, Object>();
+        virtualHostAttributes.put("haNodeName", nodeName);
+        virtualHostAttributes.put("haGroupName", groupName);
+        virtualHostAttributes.put("haNodeAddress", nodeHostPort);
+        virtualHostAttributes.put("haHelperAddress", helperHostPort);
+        virtualHostAttributes.put("haDurability", durability);
+        virtualHostAttributes.put(VirtualHost.STORE_PATH, _bdbStorePath.getAbsolutePath());
+        virtualHostAttributes.put("haReplicationConfig",
+                Collections.singletonMap(ReplicationConfig.REP_STREAM_TIMEOUT, repStreamTimeout));
+        virtualHostAttributes.put(VirtualHost.NAME, hostName);
+        virtualHostAttributes.put(VirtualHost.TYPE, BDBHAVirtualHostFactory.TYPE);
+
+        _host = createHost(virtualHostAttributes);
         _host.setDesiredState(State.INITIALISING, State.ACTIVE);
+
         assertEquals("Unexpected host name", hostName, _host.getName());
         assertEquals("Unexpected host type", BDBHAVirtualHostFactory.TYPE, _host.getType());
         assertEquals("Unexpected store type", ReplicatedEnvironmentFacade.TYPE, _host.getAttribute(VirtualHost.STORE_TYPE));
+
+        assertEquals(nodeName, _host.getAttribute("haNodeName"));
+        assertEquals(groupName, _host.getAttribute("haGroupName"));
+        assertEquals(nodeHostPort, _host.getAttribute("haNodeAddress"));
+        assertEquals(helperHostPort, _host.getAttribute("haHelperAddress"));
+        assertEquals(durability, _host.getAttribute("haDurability"));
         assertEquals("Unexpected store path", _bdbStorePath.getAbsolutePath(), _host.getAttribute(VirtualHost.STORE_PATH));
 
         BDBMessageStore messageStore = (BDBMessageStore) _host.getMessageStore();
         ReplicatedEnvironment environment = (ReplicatedEnvironment) messageStore.getEnvironmentFacade().getEnvironment();
-        ReplicationConfig repConfig = environment.getRepConfig();
-        assertEquals("Unexpected JE replication groupName", groupName, repConfig.getConfigParam(ReplicationConfig.GROUP_NAME));
-        assertEquals("Unexpected JE replication nodeName", nodeName, repConfig.getConfigParam(ReplicationConfig.NODE_NAME));
-        assertEquals("Unexpected JE replication nodeHostPort", nodeHostPort, repConfig.getConfigParam(ReplicationConfig.NODE_HOST_PORT));
-        assertEquals("Unexpected JE replication nodeHostPort", helperHostPort, repConfig.getConfigParam(ReplicationConfig.HELPER_HOSTS));
-        assertEquals("Unexpected JE replication nodeHostPort", "false", repConfig.getConfigParam(ReplicationConfig.DESIGNATED_PRIMARY));
-        assertEquals("Unexpected JE replication stream timeout", repStreamTimeout, repConfig.getConfigParam(ReplicationConfig.REP_STREAM_TIMEOUT));
-    }
+        ReplicationConfig replicationConfig = environment.getRepConfig();
 
-    private VirtualHost createHost(Map<String, Object> attributes, Set<UUID> children)
-    {
-        ConfigurationEntry entry = new ConfigurationEntry(UUID.randomUUID(), VirtualHost.class.getSimpleName(), attributes,
-                children, _store);
+        assertEquals(nodeName, environment.getNodeName());
+        assertEquals(groupName, environment.getGroup().getName());
+        assertEquals(nodeHostPort, replicationConfig.getNodeHostPort());
+        assertEquals(helperHostPort, replicationConfig.getHelperHosts());
+        assertEquals(durability, environment.getConfig().getDurability().toString());
+        assertEquals("Unexpected JE replication stream timeout", repStreamTimeout, replicationConfig.getConfigParam(ReplicationConfig.REP_STREAM_TIMEOUT));
 
-        return new VirtualHostRecoverer(_statisticsGatherer).create(_recovererProvider, entry, _broker);
     }
 
-    private VirtualHost createHost(Map<String, Object> attributes)
-    {
-        return createHost(attributes, Collections.<UUID> emptySet());
-    }
 
-    private VirtualHost createHostFromConfiguration(String hostName, long logFileMax)
+    private VirtualHost<?> createHost(Map<String, Object> attributes)
     {
-        String content = "<virtualhosts><virtualhost><name>" + hostName + "</name><" + hostName + ">"
-                        + "<store><class>" + BDBMessageStore.class.getName() + "</class>"
-                        + "<environment-path>" + _bdbStorePath.getAbsolutePath() + "</environment-path>"
-                        + "<envConfig><name>" + EnvironmentConfig.LOG_FILE_MAX + "</name><value>" + logFileMax + "</value></envConfig>"
-                        + "</store>"
-                        + "</" + hostName + "></virtualhost></virtualhosts>";
-        Map<String, Object> attributes = writeConfigAndGenerateAttributes(content);
-        return createHost(attributes);
-    }
-
+        ConfigurationEntry entry = new ConfigurationEntry(UUID.randomUUID(), VirtualHost.class.getSimpleName(), attributes,
+                Collections.<UUID>emptySet(), _store);
 
-    private VirtualHost createHaHostFromConfiguration(String hostName, String groupName, String nodeName, String nodeHostPort, String helperHostPort, String durability, String repStreamTimeout)
-    {
-        String content = "<virtualhosts><virtualhost><name>" + hostName + "</name><" + hostName + ">"
-                        + "<type>" + BDBHAVirtualHostFactory.TYPE + "</type>"
-                        + "<store><class>" + BDBMessageStore.class.getName() + "</class>"
-                        + "<environment-path>" + _bdbStorePath.getAbsolutePath() + "</environment-path>"
-                        + "<highAvailability>"
-                        + "<groupName>" + groupName + "</groupName>"
-                        + "<nodeName>" + nodeName + "</nodeName>"
-                        + "<nodeHostPort>" + nodeHostPort + "</nodeHostPort>"
-                        + "<helperHostPort>" + helperHostPort + "</helperHostPort>"
-                        + "<durability>" + durability.replaceAll(",", "\\\\,") + "</durability>"
-                        + "</highAvailability>"
-                        + "<repConfig><name>" + ReplicationConfig.REP_STREAM_TIMEOUT + "</name><value>" + repStreamTimeout + "</value></repConfig>"
-                        + "</store>"
-                        + "</" + hostName + "></virtualhost></virtualhosts>";
-        Map<String, Object> attributes = writeConfigAndGenerateAttributes(content);
-        return createHost(attributes);
+        return new VirtualHostRecoverer(_statisticsGatherer).create(_recovererProvider, entry, _broker);
     }
 
-    private Map<String, Object> writeConfigAndGenerateAttributes(String content)
-    {
-        _configFile = TestFileUtils.createTempFile(this, ".virtualhost.xml", content);
-        Map<String, Object> attributes = new HashMap<String, Object>();
-        attributes.put(VirtualHost.NAME, getName());
-        attributes.put(VirtualHost.CONFIG_PATH, _configFile.getAbsolutePath());
-        return attributes;
-    }
 }
 
     
\ No newline at end of file

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBBackupTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBBackupTest.java?rev=1576732&r1=1576731&r2=1576732&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBBackupTest.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBBackupTest.java Wed Mar 12 13:19:29 2014
@@ -31,6 +31,7 @@ import javax.jms.MessageConsumer;
 import javax.jms.Session;
 
 import org.apache.log4j.Logger;
+import org.apache.qpid.server.model.VirtualHost;
 import org.apache.qpid.test.utils.Piper;
 import org.apache.qpid.test.utils.QpidBrokerTestCase;
 import org.apache.qpid.util.FileUtils;
@@ -59,12 +60,8 @@ public class BDBBackupTest extends QpidB
         super.setUp();
         _backupToDir = new File(SYSTEM_TMP_DIR + File.separator + getTestName());
         _backupToDir.mkdirs();
-
-        final String qpidWork = getBroker(DEFAULT_PORT).getWorkingDirectory();
-
-        // It would be preferable to lookup the store path using #getConfigurationStringProperty("virtualhosts...")
-        // but the config as known to QBTC does not pull-in the virtualhost section from its separate source file
-        _backupFromDir = new File(qpidWork + File.separator + TEST_VHOST + "-store");
+        Map<String, Object> virtualHostAttributes = getBrokerConfiguration().getObjectAttributes(TEST_VHOST);
+        _backupFromDir = new File((String)virtualHostAttributes.get(VirtualHost.STORE_PATH));
         boolean fromDirExistsAndIsDir = _backupFromDir.isDirectory();
         assertTrue("backupFromDir " + _backupFromDir + " should already exist", fromDirExistsAndIsDir);
     }

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreTest.java?rev=1576732&r1=1576731&r2=1576732&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreTest.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreTest.java Wed Mar 12 13:19:29 2014
@@ -29,7 +29,6 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.UUID;
 
-import org.apache.qpid.server.store.StoreException;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.framing.BasicContentHeaderProperties;
 import org.apache.qpid.framing.ContentHeaderBody;
@@ -38,18 +37,19 @@ import org.apache.qpid.framing.ProtocolV
 import org.apache.qpid.framing.abstraction.MessagePublishInfo;
 import org.apache.qpid.server.message.AMQMessageHeader;
 import org.apache.qpid.server.message.EnqueueableMessage;
-import org.apache.qpid.server.protocol.v0_10.MessageMetaDataType_0_10;
-import org.apache.qpid.server.protocol.v0_8.MessageMetaData;
-import org.apache.qpid.server.protocol.v0_10.MessageMetaData_0_10;
 import org.apache.qpid.server.message.MessageReference;
 import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.server.model.UUIDGenerator;
+import org.apache.qpid.server.protocol.v0_10.MessageMetaDataType_0_10;
+import org.apache.qpid.server.protocol.v0_10.MessageMetaData_0_10;
+import org.apache.qpid.server.protocol.v0_8.MessageMetaData;
 import org.apache.qpid.server.protocol.v0_8.MessageMetaDataType_0_8;
+import org.apache.qpid.server.store.MessageStore;
 import org.apache.qpid.server.store.MessageStoreRecoveryHandler;
 import org.apache.qpid.server.store.MessageStoreRecoveryHandler.StoredMessageRecoveryHandler;
 import org.apache.qpid.server.store.MessageStoreTest;
-import org.apache.qpid.server.store.MessageStore;
 import org.apache.qpid.server.store.StorableMessageMetaData;
+import org.apache.qpid.server.store.StoreException;
 import org.apache.qpid.server.store.StoredMessage;
 import org.apache.qpid.server.store.Transaction;
 import org.apache.qpid.server.store.TransactionLogResource;

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBUpgradeTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBUpgradeTest.java?rev=1576732&r1=1576731&r2=1576732&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBUpgradeTest.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBUpgradeTest.java Wed Mar 12 13:19:29 2014
@@ -22,6 +22,7 @@ package org.apache.qpid.server.store.ber
 
 import java.io.File;
 import java.io.InputStream;
+import java.util.Map;
 
 import javax.jms.Connection;
 import javax.jms.DeliveryMode;
@@ -43,8 +44,10 @@ import javax.management.openmbean.Tabula
 
 import org.apache.qpid.management.common.mbeans.ManagedExchange;
 import org.apache.qpid.management.common.mbeans.ManagedQueue;
+import org.apache.qpid.server.model.VirtualHost;
 import org.apache.qpid.test.utils.JMXTestUtils;
 import org.apache.qpid.test.utils.QpidBrokerTestCase;
+import org.apache.qpid.test.utils.TestBrokerConfiguration;
 import org.apache.qpid.util.FileUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -80,7 +83,8 @@ public class BDBUpgradeTest extends Qpid
     public void setUp() throws Exception
     {
         assertNotNull("QPID_WORK must be set", QPID_WORK_ORIG);
-        _storeLocation = getWorkDirBaseDir() + File.separator + "test-store";
+        Map<String, Object> virtualHostAttributes = getBrokerConfiguration().getObjectAttributes(TestBrokerConfiguration.ENTRY_NAME_VIRTUAL_HOST);
+        _storeLocation = (String)virtualHostAttributes.get(VirtualHost.STORE_PATH);
 
         //Clear the two target directories if they exist.
         File directory = new File(_storeLocation);

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HAClusterManagementTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HAClusterManagementTest.java?rev=1576732&r1=1576731&r2=1576732&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HAClusterManagementTest.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HAClusterManagementTest.java Wed Mar 12 13:19:29 2014
@@ -184,7 +184,7 @@ public class HAClusterManagementTest ext
         final int oldBdbPort = _clusterCreator.getBdbPortForBrokerPort(brokerPortNumberToBeMoved);
         final int newBdbPort = getNextAvailable(oldBdbPort + 1);
 
-        storeBean.updateAddress(_clusterCreator.getNodeNameForNodeAt(oldBdbPort), _clusterCreator.getIpAddressOfBrokerHost(), newBdbPort);
+        storeBean.updateAddress(_clusterCreator.getNodeNameForNodeAt(oldBdbPort), "localhost", newBdbPort);
 
         _clusterCreator.modifyClusterNodeBdbAddress(brokerPortNumberToBeMoved, newBdbPort);
 

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HAClusterTwoNodeTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HAClusterTwoNodeTest.java?rev=1576732&r1=1576731&r2=1576732&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HAClusterTwoNodeTest.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HAClusterTwoNodeTest.java Wed Mar 12 13:19:29 2014
@@ -34,8 +34,6 @@ import org.apache.qpid.server.store.berk
 import org.apache.qpid.test.utils.JMXTestUtils;
 import org.apache.qpid.test.utils.QpidBrokerTestCase;
 
-import com.sleepycat.je.rep.ReplicationConfig;
-
 public class HAClusterTwoNodeTest extends QpidBrokerTestCase
 {
     private static final long RECEIVE_TIMEOUT = 5000l;
@@ -83,15 +81,6 @@ public class HAClusterTwoNodeTest extend
     private void startCluster(boolean designedPrimary) throws Exception
     {
         setSystemProperty("java.util.logging.config.file", "etc" + File.separator + "log.properties");
-
-        String storeConfigKeyPrefix = _clusterCreator.getStoreConfigKeyPrefix();
-
-        setVirtualHostConfigurationProperty(storeConfigKeyPrefix + ".repConfig(0).name", ReplicationConfig.INSUFFICIENT_REPLICAS_TIMEOUT);
-        setVirtualHostConfigurationProperty(storeConfigKeyPrefix + ".repConfig(0).value", "2 s");
-
-        setVirtualHostConfigurationProperty(storeConfigKeyPrefix + ".repConfig(1).name", ReplicationConfig.ELECTIONS_PRIMARY_RETRIES);
-        setVirtualHostConfigurationProperty(storeConfigKeyPrefix + ".repConfig(1).value", "0");
-
         _clusterCreator.configureClusterNodes();
         _clusterCreator.setDesignatedPrimaryOnFirstBroker(designedPrimary);
         _brokerFailoverUrl = _clusterCreator.getConnectionUrlForAllClusterNodes();

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HATestClusterCreator.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HATestClusterCreator.java?rev=1576732&r1=1576731&r2=1576732&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HATestClusterCreator.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HATestClusterCreator.java Wed Mar 12 13:19:29 2014
@@ -19,6 +19,7 @@
  */
 package org.apache.qpid.server.store.berkeleydb;
 
+import java.io.File;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.HashMap;
@@ -26,7 +27,6 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Map.Entry;
 import java.util.Set;
 import java.util.TreeMap;
 import java.util.concurrent.Callable;
@@ -38,15 +38,17 @@ import java.util.concurrent.TimeUnit;
 
 import javax.jms.Connection;
 
-import org.apache.commons.configuration.XMLConfiguration;
 import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
 import org.apache.qpid.client.AMQConnection;
 import org.apache.qpid.client.AMQConnectionURL;
+import org.apache.qpid.server.model.VirtualHost;
 import org.apache.qpid.test.utils.TestBrokerConfiguration;
 import org.apache.qpid.test.utils.QpidBrokerTestCase;
 import org.apache.qpid.url.URLSyntaxException;
 
+import com.sleepycat.je.rep.ReplicationConfig;
+
 public class HATestClusterCreator
 {
     protected static final Logger LOGGER = Logger.getLogger(HATestClusterCreator.class);
@@ -65,17 +67,14 @@ public class HATestClusterCreator
     private static final int CONNECTDELAY = 75;
 
     private final QpidBrokerTestCase _testcase;
-    private final Map<Integer, Integer> _brokerPortToBdbPortMap = new HashMap<Integer, Integer>();
-    private final Map<Integer, BrokerConfigHolder> _brokerConfigurations = new TreeMap<Integer, BrokerConfigHolder>();
+    private final Map<Integer, Integer> _brokerPortToBdbPortMap = new TreeMap<Integer, Integer>();
     private final String _virtualHostName;
-    private final String _vhostStoreConfigKeyPrefix;
 
     private final String _ipAddressOfBroker;
     private final String _groupName ;
     private final int _numberOfNodes;
     private int _bdbHelperPort;
     private int _primaryBrokerPort;
-    private String _vhostConfigKeyPrefix;
 
     public HATestClusterCreator(QpidBrokerTestCase testcase, String virtualHostName, int numberOfNodes)
     {
@@ -84,8 +83,6 @@ public class HATestClusterCreator
         _groupName = "group" + _testcase.getName();
         _ipAddressOfBroker = getIpAddressOfBrokerHost();
         _numberOfNodes = numberOfNodes;
-        _vhostConfigKeyPrefix = "virtualhosts.virtualhost." + _virtualHostName + ".";
-        _vhostStoreConfigKeyPrefix = _vhostConfigKeyPrefix + "store.";
         _bdbHelperPort = 0;
     }
 
@@ -104,13 +101,23 @@ public class HATestClusterCreator
                 _bdbHelperPort = bdbPort;
             }
 
-            configureClusterNode(brokerPort, bdbPort);
             TestBrokerConfiguration brokerConfiguration = _testcase.getBrokerConfiguration(brokerPort);
             brokerConfiguration.addJmxManagementConfiguration();
-            collectConfig(brokerPort, brokerConfiguration, _testcase.getTestVirtualhosts());
+            String nodeName = getNodeNameForNodeAt(bdbPort);
+            brokerConfiguration.setObjectAttribute(_virtualHostName, VirtualHost.TYPE, BDBHAVirtualHostFactory.TYPE);
+            brokerConfiguration.setObjectAttribute(_virtualHostName, VirtualHost.STORE_PATH, System.getProperty("QPID_WORK") + File.separator + brokerPort);
+            brokerConfiguration.setObjectAttribute(_virtualHostName, "haGroupName", _groupName);
+            brokerConfiguration.setObjectAttribute(_virtualHostName, "haNodeName", nodeName);
+            brokerConfiguration.setObjectAttribute(_virtualHostName, "haNodeAddress", getNodeHostPortForNodeAt(bdbPort));
+            brokerConfiguration.setObjectAttribute(_virtualHostName, "haHelperAddress", getHelperHostPort());
+            Map<String, String> repSettings = new HashMap<String, String>();
+            repSettings.put(ReplicationConfig.INSUFFICIENT_REPLICAS_TIMEOUT, "2 s");
+            repSettings.put(ReplicationConfig.ELECTIONS_PRIMARY_RETRIES, "0");
+            brokerConfiguration.setObjectAttribute(_virtualHostName, "haReplicationConfig", repSettings );
 
             brokerPort = _testcase.getNextAvailable(bdbPort + 1);
         }
+        _primaryBrokerPort = getPrimaryBrokerPort();
     }
 
     public void setDesignatedPrimaryOnFirstBroker(boolean designatedPrimary) throws Exception
@@ -119,35 +126,24 @@ public class HATestClusterCreator
         {
             throw new IllegalArgumentException("Only two nodes groups have the concept of primary");
         }
-
-        final Entry<Integer, BrokerConfigHolder> brokerConfigEntry = _brokerConfigurations.entrySet().iterator().next();
-        final String configKey = getConfigKey("highAvailability.designatedPrimary");
-        brokerConfigEntry.getValue().getTestVirtualhosts().setProperty(configKey, Boolean.toString(designatedPrimary));
-        _primaryBrokerPort = brokerConfigEntry.getKey();
+        TestBrokerConfiguration config = _testcase.getBrokerConfiguration(_primaryBrokerPort);
+        config.setObjectAttribute("test", "haDesignatedPrimary", designatedPrimary);
+        config.setSaved(false);
     }
 
-    /**
-     * @param configKeySuffix "highAvailability.designatedPrimary", for example
-     * @return "virtualhost.test.store.highAvailability.designatedPrimary", for example
-     */
-    private String getConfigKey(String configKeySuffix)
+    private int getPrimaryBrokerPort()
     {
-        final String configKey = StringUtils.substringAfter(_vhostStoreConfigKeyPrefix + configKeySuffix, "virtualhosts.");
-        return configKey;
+        return _brokerPortToBdbPortMap.keySet().iterator().next();
     }
 
     public void startNode(final int brokerPortNumber) throws Exception
     {
-        final BrokerConfigHolder brokerConfigHolder = _brokerConfigurations.get(brokerPortNumber);
-
-        _testcase.setTestVirtualhosts(brokerConfigHolder.getTestVirtualhosts());
-
         _testcase.startBroker(brokerPortNumber);
     }
 
     public void startCluster() throws Exception
     {
-        for (final Integer brokerPortNumber : _brokerConfigurations.keySet())
+        for (final Integer brokerPortNumber : _brokerPortToBdbPortMap.keySet())
         {
             startNode(brokerPortNumber);
         }
@@ -155,21 +151,20 @@ public class HATestClusterCreator
 
     public void startClusterParallel() throws Exception
     {
-        final ExecutorService executor = Executors.newFixedThreadPool(_brokerConfigurations.size());
+        final ExecutorService executor = Executors.newFixedThreadPool(_brokerPortToBdbPortMap.size());
         try
         {
             List<Future<Object>> brokers = new CopyOnWriteArrayList<Future<Object>>();
-            for (final Integer brokerPortNumber : _brokerConfigurations.keySet())
+            for (final Integer brokerPortNumber : _brokerPortToBdbPortMap.keySet())
             {
-                final BrokerConfigHolder brokerConfigHolder = _brokerConfigurations.get(brokerPortNumber);
+                final TestBrokerConfiguration brokerConfig = _testcase.getBrokerConfiguration(brokerPortNumber);
                 Future<Object> future = executor.submit(new Callable<Object>()
                 {
                     public Object call()
                     {
                         try
                         {
-                            _testcase.startBroker(brokerPortNumber, brokerConfigHolder.getTestConfiguration(),
-                                    brokerConfigHolder.getTestVirtualhosts());
+                            _testcase.startBroker(brokerPortNumber, brokerConfig);
                             return "OK";
                         }
                         catch (Exception e)
@@ -213,7 +208,7 @@ public class HATestClusterCreator
 
     public void stopCluster() throws Exception
     {
-        for (final Integer brokerPortNumber : _brokerConfigurations.keySet())
+        for (final Integer brokerPortNumber : _brokerPortToBdbPortMap.keySet())
         {
             try
             {
@@ -345,22 +340,9 @@ public class HATestClusterCreator
 
     public Set<Integer> getBrokerPortNumbersForNodes()
     {
-        return new HashSet<Integer>(_brokerConfigurations.keySet());
+        return new HashSet<Integer>(_brokerPortToBdbPortMap.keySet());
     }
 
-    private void configureClusterNode(final int brokerPort, final int bdbPort) throws Exception
-    {
-        final String nodeName = getNodeNameForNodeAt(bdbPort);
-
-
-        _testcase.setVirtualHostConfigurationProperty(_vhostConfigKeyPrefix + "type", BDBHAVirtualHostFactory.TYPE);
-        _testcase.setVirtualHostConfigurationProperty(_vhostStoreConfigKeyPrefix + "class", "org.apache.qpid.server.store.berkeleydb.BDBHAMessageStore");
-
-        _testcase.setVirtualHostConfigurationProperty(_vhostStoreConfigKeyPrefix + "highAvailability.groupName", _groupName);
-        _testcase.setVirtualHostConfigurationProperty(_vhostStoreConfigKeyPrefix + "highAvailability.nodeName", nodeName);
-        _testcase.setVirtualHostConfigurationProperty(_vhostStoreConfigKeyPrefix + "highAvailability.nodeHostPort", getNodeHostPortForNodeAt(bdbPort));
-        _testcase.setVirtualHostConfigurationProperty(_vhostStoreConfigKeyPrefix + "highAvailability.helperHostPort", getHelperHostPort());
-    }
 
     public String getIpAddressOfBrokerHost()
     {
@@ -375,55 +357,16 @@ public class HATestClusterCreator
         }
     }
 
-    private void collectConfig(final int brokerPortNumber, TestBrokerConfiguration testConfiguration, XMLConfiguration testVirtualhosts)
-    {
-        _brokerConfigurations.put(brokerPortNumber, new BrokerConfigHolder(testConfiguration,
-                                                                    (XMLConfiguration) testVirtualhosts.clone()));
-    }
-
-    public class BrokerConfigHolder
-    {
-        private final TestBrokerConfiguration _testConfiguration;
-        private final XMLConfiguration _testVirtualhosts;
-
-        public BrokerConfigHolder(TestBrokerConfiguration testConfiguration, XMLConfiguration testVirtualhosts)
-        {
-            _testConfiguration = testConfiguration;
-            _testVirtualhosts = testVirtualhosts;
-        }
-
-        public TestBrokerConfiguration getTestConfiguration()
-        {
-            return _testConfiguration;
-        }
-
-        public XMLConfiguration getTestVirtualhosts()
-        {
-            return _testVirtualhosts;
-        }
-    }
-
     public void modifyClusterNodeBdbAddress(int brokerPortNumberToBeMoved, int newBdbPort)
     {
-        final BrokerConfigHolder brokerConfigHolder = _brokerConfigurations.get(brokerPortNumberToBeMoved);
-        final XMLConfiguration virtualHostConfig = brokerConfigHolder.getTestVirtualhosts();
-
-        final String configKey = getConfigKey("highAvailability.nodeHostPort");
-        final String oldBdbHostPort = virtualHostConfig.getString(configKey);
-
-        final String[] oldHostAndPort = StringUtils.split(oldBdbHostPort, ":");
-        final String oldHost = oldHostAndPort[0];
-
-        final String newBdbHostPort = oldHost + ":" + newBdbPort;
-
-        virtualHostConfig.setProperty(configKey, newBdbHostPort);
-        collectConfig(brokerPortNumberToBeMoved, brokerConfigHolder.getTestConfiguration(), virtualHostConfig);
+        TestBrokerConfiguration config = _testcase.getBrokerConfiguration(brokerPortNumberToBeMoved);
+        config.setObjectAttribute(_virtualHostName, "haNodeAddress", "localhost:" + newBdbPort);
+        String oldBdbHostPort = (String)config.getObjectAttributes(_virtualHostName).get("haNodeAddress");
+        String[] oldHostAndPort = StringUtils.split(oldBdbHostPort, ":");
+        String oldHost = oldHostAndPort[0];
+        String newBdbHostPort = oldHost + ":" + newBdbPort;
+        config.setObjectAttribute(_virtualHostName, "haNodeAddress", newBdbHostPort);
+        config.setSaved(false);
     }
 
-    public String getStoreConfigKeyPrefix()
-    {
-        return _vhostStoreConfigKeyPrefix;
-    }
-
-
 }

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/MemoryConfigurationEntryStore.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/MemoryConfigurationEntryStore.java?rev=1576732&r1=1576731&r2=1576732&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/MemoryConfigurationEntryStore.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/MemoryConfigurationEntryStore.java Wed Mar 12 13:19:29 2014
@@ -545,7 +545,7 @@ public class MemoryConfigurationEntrySto
             }
             else if (fieldNode.isObject())
             {
-                // ignore, in-line objects are not supported yet
+                attributes.put(fieldName, toObject(fieldNode) );
             }
             else
             {

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java?rev=1576732&r1=1576731&r2=1576732&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java Wed Mar 12 13:19:29 2014
@@ -22,8 +22,6 @@ package org.apache.qpid.server.model;
 
 import java.util.Collection;
 
-import org.apache.qpid.server.message.MessageInstance;
-import org.apache.qpid.server.queue.QueueEntry;
 import org.apache.qpid.server.queue.QueueEntryVisitor;
 
 @ManagedObject

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java?rev=1576732&r1=1576731&r2=1576732&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java Wed Mar 12 13:19:29 2014
@@ -56,7 +56,8 @@ public interface VirtualHost<X extends V
     String SUPPORTED_QUEUE_TYPES                = "supportedQueueTypes";
     String DURABLE                              = "durable";
     String LIFETIME_POLICY                      = "lifetimePolicy";
-    String CONFIG_PATH                          = "configPath";
+    String SECURITY_ACL                         = "securityAcl";
+    String HOUSE_KEEPING_THREAD_COUNT           = "houseKeepingThreadCount";
 
     // Attributes
 
@@ -123,7 +124,10 @@ public interface VirtualHost<X extends V
     long getQueue_alertThresholdQueueDepthMessages();
 
     @ManagedAttribute
-    String getConfigPath();
+    String getSecurityAcl();
+
+    @ManagedAttribute
+    int getHouseKeepingThreadCount();
 
     @ManagedStatistic
     long getQueueCount();

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AbstractConfiguredObject.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AbstractConfiguredObject.java?rev=1576732&r1=1576731&r2=1576732&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AbstractConfiguredObject.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AbstractConfiguredObject.java Wed Mar 12 13:19:29 2014
@@ -377,6 +377,25 @@ public abstract class AbstractConfigured
         }
     }
 
+    <T extends ConfiguredObject<?>> Object getAttribute(String name, T parent, String parentAttributeName)
+    {
+        Object value = getActualAttribute(name);
+        if (value != null )
+        {
+            return value;
+        }
+        if (parent != null)
+        {
+            value = parent.getAttribute(parentAttributeName);
+            if (value != null)
+            {
+                return value;
+            }
+        }
+        return getDefaultAttribute(name);
+    }
+
+
     @Override
     public String getDescription()
     {

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/VirtualHostAdapter.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/VirtualHostAdapter.java?rev=1576732&r1=1576731&r2=1576732&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/VirtualHostAdapter.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/VirtualHostAdapter.java Wed Mar 12 13:19:29 2014
@@ -20,7 +20,6 @@
  */
 package org.apache.qpid.server.model.adapter;
 
-import java.io.File;
 import java.lang.reflect.Type;
 import java.security.AccessControlException;
 import java.util.ArrayList;
@@ -31,15 +30,9 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
-import org.apache.commons.configuration.CompositeConfiguration;
-import org.apache.commons.configuration.ConfigurationException;
-import org.apache.commons.configuration.PropertiesConfiguration;
-import org.apache.commons.configuration.SystemConfiguration;
 import org.apache.log4j.Logger;
 import org.apache.qpid.server.exchange.AMQUnknownExchangeType;
 import org.apache.qpid.server.configuration.IllegalConfigurationException;
-import org.apache.qpid.server.configuration.VirtualHostConfiguration;
-import org.apache.qpid.server.configuration.XmlConfigurationUtilities.MyConfiguration;
 import org.apache.qpid.server.exchange.ExchangeImpl;
 import org.apache.qpid.server.message.MessageInstance;
 import org.apache.qpid.server.message.ServerMessage;
@@ -75,8 +68,32 @@ public final class VirtualHostAdapter ex
         put(TYPE, String.class);
         put(STORE_PATH, String.class);
         put(STORE_TYPE, String.class);
-        put(CONFIG_PATH, String.class);
         put(STATE, State.class);
+
+        put(QUEUE_ALERT_REPEAT_GAP, Long.class);
+        put(QUEUE_ALERT_THRESHOLD_MESSAGE_AGE, Long.class);
+        put(QUEUE_ALERT_THRESHOLD_MESSAGE_SIZE, Long.class);
+        put(QUEUE_ALERT_THRESHOLD_QUEUE_DEPTH_BYTES, Long.class);
+        put(QUEUE_ALERT_THRESHOLD_QUEUE_DEPTH_MESSAGES, Long.class);
+        put(QUEUE_DEAD_LETTER_QUEUE_ENABLED, Boolean.class);
+        put(QUEUE_MAXIMUM_DELIVERY_ATTEMPTS, Integer.class);
+        put(QUEUE_FLOW_CONTROL_SIZE_BYTES, Long.class);
+        put(QUEUE_FLOW_RESUME_SIZE_BYTES, Long.class);
+
+        put(HOUSEKEEPING_CHECK_PERIOD, Long.class);
+        put(STORE_TRANSACTION_IDLE_TIMEOUT_CLOSE, Long.class);
+        put(STORE_TRANSACTION_IDLE_TIMEOUT_WARN, Long.class);
+        put(STORE_TRANSACTION_OPEN_TIMEOUT_CLOSE, Long.class);
+        put(STORE_TRANSACTION_OPEN_TIMEOUT_WARN, Long.class);
+
+        put(CONFIG_STORE_TYPE, String.class);
+        put(CONFIG_STORE_PATH, String.class);
+
+    }});
+
+    @SuppressWarnings("serial")
+    private static final Map<String, Object> DEFAULTS = Collections.unmodifiableMap(new HashMap<String, Object>(){{
+        put(HOUSE_KEEPING_THREAD_COUNT, Runtime.getRuntime().availableProcessors());
     }});
 
     private org.apache.qpid.server.virtualhost.VirtualHost _virtualHost;
@@ -90,7 +107,7 @@ public final class VirtualHostAdapter ex
 
     public VirtualHostAdapter(UUID id, Map<String, Object> attributes, Broker<?> broker, StatisticsGatherer brokerStatisticsGatherer, TaskExecutor taskExecutor)
     {
-        super(id, Collections.<String,Object>emptyMap(), MapValueConverter.convert(attributes, ATTRIBUTE_TYPES, false), taskExecutor, false);
+        super(id, DEFAULTS, MapValueConverter.convert(attributes, ATTRIBUTE_TYPES, false), taskExecutor, false);
         _broker = broker;
         _brokerStatisticsGatherer = brokerStatisticsGatherer;
         validateAttributes();
@@ -104,43 +121,10 @@ public final class VirtualHostAdapter ex
         {
             throw new IllegalConfigurationException("Virtual host name must be specified");
         }
-
-        String configurationFile = (String) getAttribute(CONFIG_PATH);
-        String type = (String) getAttribute(TYPE);
-
-        boolean invalidAttributes = false;
-        if (configurationFile == null)
-        {
-            if (type == null)
-            {
-                invalidAttributes = true;
-            }
-            else
-            {
-                validateAttributes(type);
-            }
-        }/*
-        else
-        {
-            if (type != null)
-            {
-                invalidAttributes = true;
-            }
-
-        }*/
-        if (invalidAttributes)
-        {
-            throw new IllegalConfigurationException("Please specify either the 'configPath' attribute or 'type' attributes");
-        }
-
-        // pre-load the configuration in order to validate
-        try
-        {
-            createVirtualHostConfiguration(name);
-        }
-        catch(ConfigurationException e)
+        String type = getType();
+        if (type == null || "".equals(type.trim()))
         {
-            throw new IllegalConfigurationException("Failed to validate configuration", e);
+            throw new IllegalConfigurationException("Virtual host type must be specified");
         }
     }
 
@@ -682,95 +666,96 @@ public final class VirtualHostAdapter ex
         {
             return LifetimePolicy.PERMANENT;
         }
-        else if (_virtualHost != null)
+        else if(QUEUE_ALERT_REPEAT_GAP.equals(name))
         {
-            return getAttributeFromVirtualHostImplementation(name);
+            return getAttribute(QUEUE_ALERT_REPEAT_GAP, Broker.QUEUE_ALERT_REPEAT_GAP);
         }
-        return super.getAttribute(name);
-    }
-
-    private Object getAttributeFromVirtualHostImplementation(String name)
-    {
-        if(SUPPORTED_EXCHANGE_TYPES.equals(name))
+        else if(QUEUE_ALERT_THRESHOLD_MESSAGE_AGE.equals(name))
         {
-            List<String> types = new ArrayList<String>();
-            for(@SuppressWarnings("rawtypes") ExchangeType type : _virtualHost.getExchangeTypes())
-            {
-                types.add(type.getType());
-            }
-            return Collections.unmodifiableCollection(types);
+            return getAttribute(QUEUE_ALERT_THRESHOLD_MESSAGE_AGE, Broker.QUEUE_ALERT_THRESHOLD_MESSAGE_AGE);
         }
-        else if(SUPPORTED_QUEUE_TYPES.equals(name))
+        else if(QUEUE_ALERT_THRESHOLD_MESSAGE_SIZE.equals(name))
         {
-            // TODO
+            return getAttribute(QUEUE_ALERT_THRESHOLD_MESSAGE_SIZE, Broker.QUEUE_ALERT_THRESHOLD_MESSAGE_SIZE);
         }
-        else if(QUEUE_DEAD_LETTER_QUEUE_ENABLED.equals(name))
+        else if(QUEUE_ALERT_THRESHOLD_QUEUE_DEPTH_BYTES.equals(name))
         {
-            return _virtualHost.getConfiguration().isDeadLetterQueueEnabled();
+            return getAttribute(QUEUE_ALERT_THRESHOLD_QUEUE_DEPTH_BYTES, Broker.QUEUE_ALERT_THRESHOLD_QUEUE_DEPTH_BYTES);
         }
-        else if(HOUSEKEEPING_CHECK_PERIOD.equals(name))
+        else if(QUEUE_ALERT_THRESHOLD_QUEUE_DEPTH_MESSAGES.equals(name))
         {
-            return _virtualHost.getConfiguration().getHousekeepingCheckPeriod();
+            return getAttribute(QUEUE_ALERT_THRESHOLD_QUEUE_DEPTH_MESSAGES, Broker.QUEUE_ALERT_THRESHOLD_QUEUE_DEPTH_MESSAGES);
+        }
+        else if(QUEUE_DEAD_LETTER_QUEUE_ENABLED.equals(name))
+        {
+            return getAttribute(QUEUE_DEAD_LETTER_QUEUE_ENABLED, Broker.QUEUE_DEAD_LETTER_QUEUE_ENABLED);
         }
         else if(QUEUE_MAXIMUM_DELIVERY_ATTEMPTS.equals(name))
         {
-            return _virtualHost.getConfiguration().getMaxDeliveryCount();
+            return getAttribute(QUEUE_MAXIMUM_DELIVERY_ATTEMPTS, Broker.QUEUE_MAXIMUM_DELIVERY_ATTEMPTS);
         }
         else if(QUEUE_FLOW_CONTROL_SIZE_BYTES.equals(name))
         {
-            return _virtualHost.getConfiguration().getCapacity();
+            return getAttribute(QUEUE_FLOW_CONTROL_SIZE_BYTES, Broker.QUEUE_FLOW_CONTROL_SIZE_BYTES);
         }
         else if(QUEUE_FLOW_RESUME_SIZE_BYTES.equals(name))
         {
-            return _virtualHost.getConfiguration().getFlowResumeCapacity();
+            return getAttribute(QUEUE_FLOW_RESUME_SIZE_BYTES, Broker.QUEUE_FLOW_CONTROL_RESUME_SIZE_BYTES);
         }
-        else if(STORE_TYPE.equals(name))
-        {
-            return _virtualHost.getMessageStore().getStoreType();
-        }
-        else if(STORE_PATH.equals(name))
+        else if(HOUSEKEEPING_CHECK_PERIOD.equals(name))
         {
-            return _virtualHost.getMessageStore().getStoreLocation();
+            return getAttribute(HOUSEKEEPING_CHECK_PERIOD, Broker.VIRTUALHOST_HOUSEKEEPING_CHECK_PERIOD);
         }
         else if(STORE_TRANSACTION_IDLE_TIMEOUT_CLOSE.equals(name))
         {
-            return _virtualHost.getConfiguration().getTransactionTimeoutIdleClose();
+            return getAttribute(STORE_TRANSACTION_IDLE_TIMEOUT_CLOSE, Broker.VIRTUALHOST_STORE_TRANSACTION_IDLE_TIMEOUT_CLOSE);
         }
         else if(STORE_TRANSACTION_IDLE_TIMEOUT_WARN.equals(name))
         {
-            return _virtualHost.getConfiguration().getTransactionTimeoutIdleWarn();
+            return getAttribute(STORE_TRANSACTION_IDLE_TIMEOUT_WARN, Broker.VIRTUALHOST_STORE_TRANSACTION_IDLE_TIMEOUT_WARN);
         }
         else if(STORE_TRANSACTION_OPEN_TIMEOUT_CLOSE.equals(name))
         {
-            return _virtualHost.getConfiguration().getTransactionTimeoutOpenClose();
+            return getAttribute(STORE_TRANSACTION_OPEN_TIMEOUT_CLOSE, Broker.VIRTUALHOST_STORE_TRANSACTION_OPEN_TIMEOUT_CLOSE);
         }
         else if(STORE_TRANSACTION_OPEN_TIMEOUT_WARN.equals(name))
         {
-            return _virtualHost.getConfiguration().getTransactionTimeoutOpenWarn();
-        }
-        else if(QUEUE_ALERT_REPEAT_GAP.equals(name))
-        {
-            return _virtualHost.getConfiguration().getMinimumAlertRepeatGap();
-        }
-        else if(QUEUE_ALERT_THRESHOLD_MESSAGE_AGE.equals(name))
-        {
-            return _virtualHost.getConfiguration().getMaximumMessageAge();
-        }
-        else if(QUEUE_ALERT_THRESHOLD_MESSAGE_SIZE.equals(name))
-        {
-            return _virtualHost.getConfiguration().getMaximumMessageSize();
+            return getAttribute(STORE_TRANSACTION_OPEN_TIMEOUT_CLOSE, Broker.VIRTUALHOST_STORE_TRANSACTION_OPEN_TIMEOUT_WARN);
         }
-        else if(QUEUE_ALERT_THRESHOLD_QUEUE_DEPTH_BYTES.equals(name))
-        {
-            return _virtualHost.getConfiguration().getMaximumQueueDepth();
-        }
-        else if(QUEUE_ALERT_THRESHOLD_QUEUE_DEPTH_MESSAGES.equals(name))
+        else if (_virtualHost != null)
         {
-            return _virtualHost.getConfiguration().getMaximumMessageCount();
+            if(SUPPORTED_EXCHANGE_TYPES.equals(name))
+            {
+                List<String> types = new ArrayList<String>();
+                for(@SuppressWarnings("rawtypes") ExchangeType type : _virtualHost.getExchangeTypes())
+                {
+                    types.add(type.getType());
+                }
+                return Collections.unmodifiableCollection(types);
+            }
+            else if(SUPPORTED_QUEUE_TYPES.equals(name))
+            {
+                // TODO
+            }
+            else if(STORE_TYPE.equals(name))
+            {
+                return _virtualHost.getMessageStore().getStoreType();
+            }
+            else if(STORE_PATH.equals(name))
+            {
+                return _virtualHost.getMessageStore().getStoreLocation();
+            }
         }
         return super.getAttribute(name);
     }
 
+
+    Object getAttribute(String name, String brokerAttributeName)
+    {
+        return getAttribute(name, _broker, brokerAttributeName);
+    }
+
+
     @Override
     public Collection<String> getAttributeNames()
     {
@@ -807,31 +792,31 @@ public final class VirtualHostAdapter ex
     @Override
     public boolean isQueue_deadLetterQueueEnabled()
     {
-        return _virtualHost.getConfiguration().isDeadLetterQueueEnabled();
+        return (Boolean)getAttribute(VirtualHost.QUEUE_DEAD_LETTER_QUEUE_ENABLED);
     }
 
     @Override
     public long getHousekeepingCheckPeriod()
     {
-        return _virtualHost.getConfiguration().getHousekeepingCheckPeriod();
+        return (Long)getAttribute(VirtualHost.HOUSEKEEPING_CHECK_PERIOD);
     }
 
     @Override
     public int getQueue_maximumDeliveryAttempts()
     {
-        return _virtualHost.getConfiguration().getMaxDeliveryCount();
+        return (Integer)getAttribute(VirtualHost.QUEUE_MAXIMUM_DELIVERY_ATTEMPTS);
     }
 
     @Override
     public long getQueue_flowControlSizeBytes()
     {
-        return _virtualHost.getConfiguration().getCapacity();
+        return (Long)getAttribute(VirtualHost.QUEUE_FLOW_CONTROL_SIZE_BYTES);
     }
 
     @Override
     public long getQueue_flowResumeSizeBytes()
     {
-        return _virtualHost.getConfiguration().getFlowResumeCapacity();
+        return (Long)getAttribute(VirtualHost.QUEUE_FLOW_RESUME_SIZE_BYTES);
     }
 
     @Override
@@ -843,7 +828,7 @@ public final class VirtualHostAdapter ex
     @Override
     public String getConfigStorePath()
     {
-        return (String) getAttribute(CONFIG_PATH);
+        return (String) getAttribute(CONFIG_STORE_PATH);
     }
 
     @Override
@@ -861,61 +846,55 @@ public final class VirtualHostAdapter ex
     @Override
     public long getStoreTransactionIdleTimeoutClose()
     {
-        return _virtualHost.getConfiguration().getTransactionTimeoutIdleClose();
+        return (Long)getAttribute(VirtualHost.STORE_TRANSACTION_IDLE_TIMEOUT_CLOSE);
     }
 
     @Override
     public long getStoreTransactionIdleTimeoutWarn()
     {
-        return _virtualHost.getConfiguration().getTransactionTimeoutIdleWarn();
+        return (Long)getAttribute(VirtualHost.STORE_TRANSACTION_IDLE_TIMEOUT_WARN);
     }
 
     @Override
     public long getStoreTransactionOpenTimeoutClose()
     {
-        return _virtualHost.getConfiguration().getTransactionTimeoutOpenClose();
+        return (Long)getAttribute(VirtualHost.STORE_TRANSACTION_OPEN_TIMEOUT_CLOSE);
     }
 
     @Override
     public long getStoreTransactionOpenTimeoutWarn()
     {
-        return _virtualHost.getConfiguration().getTransactionTimeoutOpenWarn();
+        return (Long)getAttribute(VirtualHost.STORE_TRANSACTION_OPEN_TIMEOUT_WARN);
     }
 
     @Override
     public long getQueue_alertRepeatGap()
     {
-        return _virtualHost.getConfiguration().getMinimumAlertRepeatGap();
+        return (Long)getAttribute(VirtualHost.QUEUE_ALERT_REPEAT_GAP);
     }
 
     @Override
     public long getQueue_alertThresholdMessageAge()
     {
-        return _virtualHost.getConfiguration().getMaximumMessageAge();
+        return (Long)getAttribute(VirtualHost.QUEUE_ALERT_THRESHOLD_MESSAGE_AGE);
     }
 
     @Override
     public long getQueue_alertThresholdMessageSize()
     {
-        return _virtualHost.getConfiguration().getMaximumMessageSize();
+        return (Long)getAttribute(VirtualHost.QUEUE_ALERT_THRESHOLD_MESSAGE_SIZE);
     }
 
     @Override
     public long getQueue_alertThresholdQueueDepthBytes()
     {
-        return _virtualHost.getConfiguration().getMaximumQueueDepth();
+        return (Long)getAttribute(VirtualHost.QUEUE_ALERT_THRESHOLD_QUEUE_DEPTH_BYTES);
     }
 
     @Override
     public long getQueue_alertThresholdQueueDepthMessages()
     {
-        return _virtualHost.getConfiguration().getMaximumMessageCount();
-    }
-
-    @Override
-    public String getConfigPath()
-    {
-        return (String) getAttribute(CONFIG_PATH);
+        return (Long)getAttribute(VirtualHost.QUEUE_ALERT_THRESHOLD_QUEUE_DEPTH_MESSAGES);
     }
 
     @Override
@@ -960,6 +939,17 @@ public final class VirtualHostAdapter ex
         return _virtualHost.getMessageDeliveryStatistics().getTotal();
     }
 
+    @Override
+    public String getSecurityAcl()
+    {
+        return (String)getAttribute(SECURITY_ACL);
+    }
+
+    @Override
+    public int getHouseKeepingThreadCount()
+    {
+        return (Integer)getAttribute(HOUSE_KEEPING_THREAD_COUNT);
+    }
 
     @Override
     protected boolean setState(State currentState, State desiredState)
@@ -1041,8 +1031,7 @@ public final class VirtualHostAdapter ex
         String virtualHostName = getName();
         try
         {
-            VirtualHostConfiguration configuration = createVirtualHostConfiguration(virtualHostName);
-            String type = configuration.getType();
+            String type = (String) getAttribute(TYPE);
             final VirtualHostFactory factory = VirtualHostFactory.FACTORIES.get(type);
             if(factory == null)
             {
@@ -1053,11 +1042,10 @@ public final class VirtualHostAdapter ex
                 _virtualHost = factory.createVirtualHost(_broker.getVirtualHostRegistry(),
                                                          _brokerStatisticsGatherer,
                                                          _broker.getSecurityManager(),
-                                                         configuration,
                                                          this);
             }
         }
-        catch (ConfigurationException e)
+        catch (Exception e)
         {
             throw new ServerScopedRuntimeException("Failed to create virtual host " + virtualHostName, e);
         }
@@ -1078,53 +1066,6 @@ public final class VirtualHostAdapter ex
         }
     }
 
-    private VirtualHostConfiguration createVirtualHostConfiguration(String virtualHostName) throws ConfigurationException
-    {
-        VirtualHostConfiguration configuration;
-        String configurationFile = (String)getAttribute(CONFIG_PATH);
-        if (configurationFile == null)
-        {
-            final MyConfiguration basicConfiguration = new MyConfiguration();
-            PropertiesConfiguration config = new PropertiesConfiguration();
-            final String type = (String) getAttribute(TYPE);
-            config.addProperty("type", type);
-            VirtualHostFactory factory = VirtualHostFactory.FACTORIES.get(type);
-            if(factory != null)
-            {
-                for(Map.Entry<String,Object> entry : factory.createVirtualHostConfiguration(this).entrySet())
-                {
-                    config.addProperty(entry.getKey(), entry.getValue());
-                }
-            }
-            basicConfiguration.addConfiguration(config);
-
-            CompositeConfiguration compositeConfiguration = new CompositeConfiguration();
-            compositeConfiguration.addConfiguration(new SystemConfiguration());
-            compositeConfiguration.addConfiguration(basicConfiguration);
-            configuration = new VirtualHostConfiguration(virtualHostName, compositeConfiguration , _broker);
-        }
-        else
-        {
-            if (!new File(configurationFile).exists())
-            {
-                throw new IllegalConfigurationException("Configuration file '" + configurationFile + "' does not exist");
-            }
-            configuration = new VirtualHostConfiguration(virtualHostName, new File(configurationFile) , _broker);
-            String type = configuration.getType();
-            changeAttribute(TYPE,null,type);
-            VirtualHostFactory factory = VirtualHostFactory.FACTORIES.get(type);
-            if(factory != null)
-            {
-                for(Map.Entry<String,Object> entry : factory.convertVirtualHostConfiguration(configuration.getConfig()).entrySet())
-                {
-                    changeAttribute(entry.getKey(), getAttribute(entry.getKey()), entry.getValue());
-                }
-            }
-
-        }
-        return configuration;
-    }
-
     @Override
     public SecurityManager getSecurityManager()
     {

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/DurableConfigurationStoreFactory.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/DurableConfigurationStoreFactory.java?rev=1576732&r1=1576731&r2=1576732&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/DurableConfigurationStoreFactory.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/DurableConfigurationStoreFactory.java Wed Mar 12 13:19:29 2014
@@ -21,9 +21,7 @@
 package org.apache.qpid.server.plugin;
 
 import java.util.Map;
-import org.apache.commons.configuration.Configuration;
 import org.apache.qpid.server.store.DurableConfigurationStore;
-import org.apache.qpid.server.store.MessageStore;
 
 public interface DurableConfigurationStoreFactory extends Pluggable
 {

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/JDBCConnectionProviderFactory.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/JDBCConnectionProviderFactory.java?rev=1576732&r1=1576731&r2=1576732&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/JDBCConnectionProviderFactory.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/JDBCConnectionProviderFactory.java Wed Mar 12 13:19:29 2014
@@ -25,7 +25,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
-import org.apache.commons.configuration.Configuration;
 import org.apache.qpid.server.model.VirtualHost;
 import org.apache.qpid.server.store.jdbc.ConnectionProvider;
 

Modified: qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/MessageStoreFactory.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/MessageStoreFactory.java?rev=1576732&r1=1576731&r2=1576732&view=diff
==============================================================================
--- qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/MessageStoreFactory.java (original)
+++ qpid/branches/java-broker-bdb-ha2/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/MessageStoreFactory.java Wed Mar 12 13:19:29 2014
@@ -21,7 +21,6 @@
 package org.apache.qpid.server.plugin;
 
 import java.util.Map;
-import org.apache.commons.configuration.Configuration;
 import org.apache.qpid.server.store.MessageStore;
 
 public interface MessageStoreFactory extends Pluggable
@@ -30,7 +29,5 @@ public interface MessageStoreFactory ext
 
     MessageStore createMessageStore();
 
-    public Map<String, Object> convertStoreConfiguration(Configuration configuration);
-
     void validateAttributes(Map<String, Object> attributes);
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message