qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kw...@apache.org
Subject svn commit: r1601162 - in /qpid/trunk/qpid/java: bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/ bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/ broker-core/src/main/java/org/apache/qpid/server/model/ broker-co...
Date Sat, 07 Jun 2014 19:00:41 GMT
Author: kwall
Date: Sat Jun  7 19:00:39 2014
New Revision: 1601162

URL: http://svn.apache.org/r1601162
Log:
QPID-5800: [Java Broker] Remove the now redundant MessageStore/DurableConfigurationStore factories

Removed:
    qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreFactory.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/DurableConfigurationStoreFactory.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/MessageStoreFactory.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/JsonFileConfigStoreFactory.java
    qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/TestMemoryMessageStoreFactory.java
    qpid/trunk/qpid/java/broker-core/src/test/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory
    qpid/trunk/qpid/java/broker-core/src/test/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory
    qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java
    qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreFactory.java
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java
Modified:
    qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBVirtualHostNodeImpl.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNode.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/JsonVirtualHostNodeImpl.java
    qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNodeTest.java
    qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/TestVirtualHostNode.java
    qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNode.java
    qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/HelperServlet.java
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/standard/addVirtualHost.js
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNode.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SplitStoreTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/TestUtils.java

Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBVirtualHostNodeImpl.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBVirtualHostNodeImpl.java?rev=1601162&r1=1601161&r2=1601162&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBVirtualHostNodeImpl.java
(original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBVirtualHostNodeImpl.java
Sat Jun  7 19:00:39 2014
@@ -26,8 +26,8 @@ import org.apache.qpid.server.model.Brok
 import org.apache.qpid.server.model.ManagedAttributeField;
 import org.apache.qpid.server.model.ManagedObject;
 import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
-import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
-import org.apache.qpid.server.store.berkeleydb.BDBMessageStoreFactory;
+import org.apache.qpid.server.store.DurableConfigurationStore;
+import org.apache.qpid.server.store.berkeleydb.BDBConfigurationStore;
 import org.apache.qpid.server.virtualhostnode.AbstractStandardVirtualHostNode;
 
 @ManagedObject( category = false, type = "BDB" )
@@ -46,9 +46,9 @@ public class BDBVirtualHostNodeImpl exte
     }
 
     @Override
-    protected DurableConfigurationStoreFactory getDurableConfigurationStoreFactory()
+    protected DurableConfigurationStore createConfigurationStore()
     {
-        return new BDBMessageStoreFactory();
+        return new BDBConfigurationStore();
     }
 
     @Override
@@ -56,7 +56,6 @@ public class BDBVirtualHostNodeImpl exte
     {
         return _environmentConfiguration;
     }
-
     @Override
     public String getStorePath()
     {

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java?rev=1601162&r1=1601161&r2=1601162&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
Sat Jun  7 19:00:39 2014
@@ -41,7 +41,7 @@ public interface Broker<X extends Broker
     String PROCESS_PID = "processPid";
     String PRODUCT_VERSION = "productVersion";
     String SUPPORTED_VIRTUALHOST_TYPES = "supportedVirtualHostTypes";
-    String SUPPORTED_VIRTUALHOST_STORE_TYPES = "supportedVirtualHostStoreTypes";
+    String SUPPORTED_VIRTUALHOSTNODE_TYPES = "supportedVirtualHostNodeTypes";
     String SUPPORTED_AUTHENTICATION_PROVIDERS = "supportedAuthenticationProviders";
     String SUPPORTED_PREFERENCES_PROVIDER_TYPES = "supportedPreferencesProviderTypes";
     String DEFAULT_VIRTUAL_HOST = "defaultVirtualHost";
@@ -93,9 +93,6 @@ public interface Broker<X extends Broker
     Collection<String> getSupportedVirtualHostNodeTypes();
 
     @DerivedAttribute
-    Collection<String> getSupportedVirtualHostStoreTypes();
-
-    @DerivedAttribute
     Collection<String> getSupportedAuthenticationProviders();
 
     @DerivedAttribute

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java?rev=1601162&r1=1601161&r2=1601162&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
Sat Jun  7 19:00:39 2014
@@ -47,7 +47,6 @@ import org.apache.qpid.server.logging.me
 import org.apache.qpid.server.logging.messages.VirtualHostMessages;
 import org.apache.qpid.server.model.*;
 import org.apache.qpid.server.model.port.AbstractPortWithAuthProvider;
-import org.apache.qpid.server.plugin.MessageStoreFactory;
 import org.apache.qpid.server.security.SecurityManager;
 import org.apache.qpid.server.security.SubjectCreator;
 import org.apache.qpid.server.security.access.Operation;
@@ -71,13 +70,10 @@ public class BrokerAdapter extends Abstr
 
 
     private EventLogger _eventLogger;
-    //private final VirtualHostRegistry _virtualHostRegistry;
     private final LogRecorder _logRecorder;
 
     private final SecurityManager _securityManager;
 
-    private final Collection<String> _supportedVirtualHostStoreTypes;
-
     private AuthenticationProvider<?> _managementModeAuthenticationProvider;
     private BrokerOptions _brokerOptions;
 
@@ -109,7 +105,6 @@ public class BrokerAdapter extends Abstr
         _eventLogger = parent.getEventLogger();
         _brokerOptions = parent.getBrokerOptions();
         _securityManager = new SecurityManager(this, _brokerOptions.isManagementMode());
-        _supportedVirtualHostStoreTypes = MessageStoreFactory.FACTORY_LOADER.getSupportedTypes();
         if (_brokerOptions.isManagementMode())
         {
             Map<String,Object> authManagerAttrs = new HashMap<String, Object>();
@@ -311,12 +306,6 @@ public class BrokerAdapter extends Abstr
     }
 
     @Override
-    public Collection<String> getSupportedVirtualHostStoreTypes()
-    {
-        return _supportedVirtualHostStoreTypes;
-    }
-
-    @Override
     public Collection<String> getSupportedVirtualHostTypes()
     {
         return getObjectFactory().getSupportedTypes(VirtualHost.class);

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNode.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNode.java?rev=1601162&r1=1601161&r2=1601162&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNode.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNode.java
Sat Jun  7 19:00:39 2014
@@ -38,9 +38,7 @@ import org.apache.qpid.server.model.Conf
 import org.apache.qpid.server.model.RemoteReplicationNode;
 import org.apache.qpid.server.model.VirtualHost;
 import org.apache.qpid.server.model.VirtualHostNode;
-import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
 import org.apache.qpid.server.security.SecurityManager;
-import org.apache.qpid.server.store.DurableConfigurationStore;
 import org.apache.qpid.server.store.MessageStore;
 import org.apache.qpid.server.store.MessageStoreProvider;
 import org.apache.qpid.server.store.VirtualHostStoreUpgraderAndRecoverer;
@@ -57,16 +55,6 @@ public abstract class AbstractStandardVi
         super(parent, attributes);
     }
 
-    @Override
-    public void onValidate()
-    {
-        super.onValidate();
-        DurableConfigurationStoreFactory durableConfigurationStoreFactory = getDurableConfigurationStoreFactory();
-        Map<String, Object> storeSettings = new HashMap<String, Object>(getActualAttributes());
-        storeSettings.put(DurableConfigurationStore.STORE_TYPE, durableConfigurationStoreFactory.getType());
-        durableConfigurationStoreFactory.validateConfigurationStoreSettings(storeSettings);
-    }
-
     @SuppressWarnings({ "rawtypes", "unchecked" })
     @Override
     protected <C extends ConfiguredObject> C addChild(Class<C> childClass, Map<String,
Object> attributes,
@@ -80,16 +68,6 @@ public abstract class AbstractStandardVi
     }
 
     @Override
-    protected DurableConfigurationStore createConfigurationStore()
-    {
-        DurableConfigurationStoreFactory durableConfigurationStoreFactory = getDurableConfigurationStoreFactory();
-        DurableConfigurationStore store = durableConfigurationStoreFactory.createDurableConfigurationStore();
-        return store;
-    }
-
-    protected abstract DurableConfigurationStoreFactory getDurableConfigurationStoreFactory();
-
-    @Override
     protected void activate()
     {
         if (LOGGER.isDebugEnabled())

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/JsonVirtualHostNodeImpl.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/JsonVirtualHostNodeImpl.java?rev=1601162&r1=1601161&r2=1601162&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/JsonVirtualHostNodeImpl.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/JsonVirtualHostNodeImpl.java
Sat Jun  7 19:00:39 2014
@@ -26,8 +26,8 @@ import org.apache.qpid.server.model.Brok
 import org.apache.qpid.server.model.ManagedAttributeField;
 import org.apache.qpid.server.model.ManagedObject;
 import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
-import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
-import org.apache.qpid.server.store.JsonFileConfigStoreFactory;
+import org.apache.qpid.server.store.DurableConfigurationStore;
+import org.apache.qpid.server.store.JsonFileConfigStore;
 
 @ManagedObject(category=false, type="JSON")
 public class JsonVirtualHostNodeImpl extends AbstractStandardVirtualHostNode<JsonVirtualHostNodeImpl>
implements FileBasedVirtualHostNode<JsonVirtualHostNodeImpl>
@@ -42,9 +42,9 @@ public class JsonVirtualHostNodeImpl ext
     }
 
     @Override
-    protected DurableConfigurationStoreFactory getDurableConfigurationStoreFactory()
+    protected DurableConfigurationStore createConfigurationStore()
     {
-        return new JsonFileConfigStoreFactory();
+        return new JsonFileConfigStore();
     }
 
     @Override
@@ -58,5 +58,4 @@ public class JsonVirtualHostNodeImpl ext
     {
         return getClass().getSimpleName() + " [id=" + getId() + ", name=" + getName() + ",
storePath=" + getStorePath() + "]";
     }
-
 }

Modified: qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNodeTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNodeTest.java?rev=1601162&r1=1601161&r2=1601162&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNodeTest.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNodeTest.java
Sat Jun  7 19:00:39 2014
@@ -37,13 +37,10 @@ import org.apache.qpid.server.model.Stat
 import org.apache.qpid.server.model.SystemContext;
 import org.apache.qpid.server.model.VirtualHost;
 import org.apache.qpid.server.model.VirtualHostNode;
-import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
 import org.apache.qpid.server.store.ConfiguredObjectRecord;
 import org.apache.qpid.server.store.DurableConfigurationStore;
-import org.apache.qpid.server.store.MessageStore;
 import org.apache.qpid.server.store.NullMessageStore;
 import org.apache.qpid.server.store.StoreException;
-import org.apache.qpid.server.store.TestMemoryMessageStore;
 import org.apache.qpid.server.store.handler.ConfiguredObjectRecordHandler;
 import org.apache.qpid.server.util.BrokerTestHelper;
 import org.apache.qpid.server.virtualhost.TestMemoryVirtualHost;
@@ -54,7 +51,6 @@ public class AbstractStandardVirtualHost
     private static final String TEST_VIRTUAL_HOST_NODE_NAME = "testNode";
     private static final String TEST_VIRTUAL_HOST_NAME = "testVirtualHost";
 
-    private DurableConfigurationStoreFactory _configStoreFactory = mock(DurableConfigurationStoreFactory.class);
     private UUID _nodeId = UUID.randomUUID();
     private Broker<?> _broker;
     private DurableConfigurationStore _configStore;
@@ -102,7 +98,6 @@ public class AbstractStandardVirtualHost
                 handler.end();
             }
         };
-        when(_configStoreFactory.createDurableConfigurationStore()).thenReturn(_configStore);
 
         Map<String, Object> nodeAttributes = new HashMap<String, Object>();
         nodeAttributes.put(VirtualHostNode.NAME, TEST_VIRTUAL_HOST_NODE_NAME);
@@ -131,7 +126,6 @@ public class AbstractStandardVirtualHost
                 handler.end();
             }
         };
-        when(_configStoreFactory.createDurableConfigurationStore()).thenReturn(_configStore);
 
         Map<String, Object> nodeAttributes = new HashMap<String, Object>();
         nodeAttributes.put(VirtualHostNode.NAME, TEST_VIRTUAL_HOST_NODE_NAME);
@@ -156,9 +150,6 @@ public class AbstractStandardVirtualHost
         virtualHostAttributes.put(VirtualHost.NAME, TEST_VIRTUAL_HOST_NAME);
         virtualHostAttributes.put(VirtualHost.TYPE, TestMemoryVirtualHost.VIRTUAL_HOST_TYPE);
         virtualHostAttributes.put(VirtualHost.MODEL_VERSION, BrokerModel.MODEL_VERSION);
-        Map<String,Object> messageStoreSettings = new HashMap<String, Object>();
-        virtualHostAttributes.put(VirtualHost.MESSAGE_STORE_SETTINGS, messageStoreSettings);
-        messageStoreSettings.put(MessageStore.STORE_TYPE, TestMemoryMessageStore.TYPE);
 
         ConfiguredObjectRecord record = mock(ConfiguredObjectRecord.class);
         when(record.getId()).thenReturn(virtualHostId);

Modified: qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/TestVirtualHostNode.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/TestVirtualHostNode.java?rev=1601162&r1=1601161&r2=1601162&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/TestVirtualHostNode.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/TestVirtualHostNode.java
Sat Jun  7 19:00:39 2014
@@ -25,11 +25,10 @@ import java.util.Map;
 
 import org.apache.qpid.server.model.Broker;
 import org.apache.qpid.server.model.ManagedObject;
-import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
 import org.apache.qpid.server.store.DurableConfigurationStore;
 import org.apache.qpid.server.store.MessageStore;
 import org.apache.qpid.server.store.TestMemoryMessageStore;
-import org.apache.qpid.server.store.TestMemoryMessageStoreFactory;
+
 @ManagedObject(type="TestMemory", category=false)
 public class TestVirtualHostNode extends AbstractStandardVirtualHostNode<TestVirtualHostNode>
 {
@@ -49,33 +48,9 @@ public class TestVirtualHostNode extends
     }
 
     @Override
-    protected DurableConfigurationStoreFactory getDurableConfigurationStoreFactory()
+    protected DurableConfigurationStore createConfigurationStore()
     {
-        if (_store != null)
-        {
-            return new DurableConfigurationStoreFactory()
-            {
-
-                @Override
-                public void validateConfigurationStoreSettings(Map<String, Object>
attributes)
-                {
-                }
-
-                @Override
-                public String getType()
-                {
-                    return null;
-                }
-
-                @Override
-                public DurableConfigurationStore createDurableConfigurationStore()
-                {
-                    return _store;
-                }
-            };
-        }
-
-        return new TestMemoryMessageStoreFactory();
+        return _store;
     }
 
     @Override

Modified: qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNode.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNode.java?rev=1601162&r1=1601161&r2=1601162&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNode.java
(original)
+++ qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNode.java
Sat Jun  7 19:00:39 2014
@@ -27,8 +27,8 @@ import org.apache.qpid.server.model.Brok
 import org.apache.qpid.server.model.ManagedAttributeField;
 import org.apache.qpid.server.model.ManagedObject;
 import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
-import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
-import org.apache.qpid.server.store.derby.DerbyMessageStoreFactory;
+import org.apache.qpid.server.store.DurableConfigurationStore;
+import org.apache.qpid.server.store.derby.DerbyMessageStore;
 import org.apache.qpid.server.virtualhostnode.AbstractStandardVirtualHostNode;
 import org.apache.qpid.server.virtualhostnode.FileBasedVirtualHostNode;
 
@@ -45,9 +45,9 @@ public class DerbyVirtualHostNode extend
     }
 
     @Override
-    protected DurableConfigurationStoreFactory getDurableConfigurationStoreFactory()
+    protected DurableConfigurationStore createConfigurationStore()
     {
-        return new DerbyMessageStoreFactory();
+        return new DerbyMessageStore();
     }
 
     @Override

Modified: qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java?rev=1601162&r1=1601161&r2=1601162&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java
(original)
+++ qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java
Sat Jun  7 19:00:39 2014
@@ -26,8 +26,8 @@ import org.apache.qpid.server.model.Brok
 import org.apache.qpid.server.model.ManagedAttributeField;
 import org.apache.qpid.server.model.ManagedObject;
 import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
-import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
-import org.apache.qpid.server.store.jdbc.JDBCMessageStoreFactory;
+import org.apache.qpid.server.store.DurableConfigurationStore;
+import org.apache.qpid.server.store.jdbc.JDBCMessageStore;
 import org.apache.qpid.server.virtualhostnode.AbstractStandardVirtualHostNode;
 
 @ManagedObject( category = false, type = "JDBC" )
@@ -58,9 +58,9 @@ public class JDBCVirtualHostNodeImpl ext
     }
 
     @Override
-    protected DurableConfigurationStoreFactory getDurableConfigurationStoreFactory()
+    protected DurableConfigurationStore createConfigurationStore()
     {
-        return new JDBCMessageStoreFactory();
+        return new JDBCMessageStore();
     }
 
     @Override
@@ -98,5 +98,4 @@ public class JDBCVirtualHostNodeImpl ext
     {
         return _blobType;
     }
-
 }

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/HelperServlet.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/HelperServlet.java?rev=1601162&r1=1601161&r2=1601162&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/HelperServlet.java
(original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/HelperServlet.java
Sat Jun  7 19:00:39 2014
@@ -56,7 +56,7 @@ public class HelperServlet extends Abstr
 
         Action[] supportedActions = {
                 new ListAuthenticationProviderAttributes(),
-                new ListBrokerAttribute(Broker.SUPPORTED_VIRTUALHOST_STORE_TYPES, "ListMessageStoreTypes"),
+                new ListBrokerAttribute(Broker.SUPPORTED_VIRTUALHOSTNODE_TYPES, "ListVirtualHostNodeTypes"),
                 new ListBrokerAttribute(Broker.SUPPORTED_VIRTUALHOST_TYPES, "ListVirtualHostTypes"),
                 new ListBrokerAttribute(Broker.SUPPORTED_PREFERENCES_PROVIDER_TYPES, "ListPreferencesProvidersTypes"),
                 new ListBrokerAttribute(Broker.PRODUCT_VERSION, "version"),

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/standard/addVirtualHost.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/standard/addVirtualHost.js?rev=1601162&r1=1601161&r2=1601162&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/standard/addVirtualHost.js
(original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/standard/addVirtualHost.js
Sat Jun  7 19:00:39 2014
@@ -66,7 +66,7 @@ define(["dojo/_base/xhr",
                                 }
                                 xhr.get({
                                     sync: true,
-                                    url: "service/helper?action=ListMessageStoreTypes",
+                                    url: "service/helper?action=ListVirtualHostTypes",
                                     handleAs: "json"
                                 }).then(
                                     function(data) {

Modified: qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNode.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNode.java?rev=1601162&r1=1601161&r2=1601162&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNode.java
(original)
+++ qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNode.java
Sat Jun  7 19:00:39 2014
@@ -25,8 +25,8 @@ import java.util.Map;
 import org.apache.qpid.server.model.Broker;
 import org.apache.qpid.server.model.ManagedObject;
 import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
-import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
-import org.apache.qpid.server.store.MemoryMessageStoreFactory;
+import org.apache.qpid.server.store.DurableConfigurationStore;
+import org.apache.qpid.server.store.MemoryConfigurationStore;
 import org.apache.qpid.server.virtualhostnode.AbstractStandardVirtualHostNode;
 
 @ManagedObject(type="Memory",category=false)
@@ -40,9 +40,8 @@ public class MemoryVirtualHostNode exten
     }
 
     @Override
-    public DurableConfigurationStoreFactory getDurableConfigurationStoreFactory()
+    protected DurableConfigurationStore createConfigurationStore()
     {
-        return new MemoryMessageStoreFactory();
+        return new MemoryConfigurationStore();
     }
-
 }

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SplitStoreTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SplitStoreTest.java?rev=1601162&r1=1601161&r2=1601162&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SplitStoreTest.java
(original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SplitStoreTest.java
Sat Jun  7 19:00:39 2014
@@ -100,7 +100,12 @@ public class SplitStoreTest extends Qpid
         Map<String, Object> messageStoreSettings = new HashMap<String, Object>();
         messageStoreSettings.put(MessageStore.STORE_TYPE, getTestProfileMessageStoreType());
         messageStoreSettings.put(MessageStore.STORE_PATH, _messageStorePath);
-        TestUtils.createStoreWithVirtualHostEntry(messageStoreSettings, config, nodeType);
+
+        // TODO initialise the virtualhost with the required attributes using the virtualhost
blueprint
+        // mechanism.
+
+        //TestUtils.createStoreWithVirtualHostEntry(messageStoreSettings, config, nodeType);
+
         super.startBroker();
     }
 

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java?rev=1601162&r1=1601161&r2=1601162&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java
(original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java
Sat Jun  7 19:00:39 2014
@@ -64,7 +64,7 @@ public class BrokerRestHttpsTest extends
         Map<String, Object> brokerDetails = getRestTestHelper().getJsonAsSingletonList("broker");
 
         Asserts.assertAttributesPresent(brokerDetails, ConfiguredObjectTypeRegistry.getAttributeNames(Broker.class),
-                Broker.PROCESS_PID, Broker.SUPPORTED_VIRTUALHOST_STORE_TYPES,
+                Broker.PROCESS_PID,
                 ConfiguredObject.TYPE,
                 ConfiguredObject.CREATED_BY,
                 ConfiguredObject.CREATED_TIME,

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java?rev=1601162&r1=1601161&r2=1601162&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java
(original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java
Sat Jun  7 19:00:39 2014
@@ -40,7 +40,6 @@ import org.apache.qpid.server.model.Life
 import org.apache.qpid.server.model.Port;
 import org.apache.qpid.server.model.State;
 import org.apache.qpid.server.model.VirtualHostNode;
-import org.apache.qpid.server.plugin.MessageStoreFactory;
 import org.apache.qpid.test.client.UnroutableMessageTestExceptionListener;
 import org.apache.qpid.test.utils.TestBrokerConfiguration;
 import org.apache.qpid.util.SystemUtils;
@@ -234,10 +233,9 @@ public class BrokerRestTest extends Qpid
         assertNotNull("Unexpected value of attribute ports", brokerDetails.get(BROKER_PORTS_ATTRIBUTE));
         assertNotNull("Unexpected value of attribute authenticationproviders", brokerDetails.get(BROKER_AUTHENTICATIONPROVIDERS_ATTRIBUTE));
 
-        @SuppressWarnings("unchecked")
-        Collection<String> supportedVirtualHostStoreTypes = (Collection<String>)brokerDetails.get(Broker.SUPPORTED_VIRTUALHOST_STORE_TYPES);
-        Collection<String> expectedSupportedVirtualHostStoreTypes = MessageStoreFactory.FACTORY_LOADER.getSupportedTypes();
-        assertEquals("Unexpected supported virtual host store types",  new HashSet<String>(expectedSupportedVirtualHostStoreTypes),
new HashSet<String>(supportedVirtualHostStoreTypes));
+        assertNotNull("Unexpected value of attribute supportedVirtualHostTypes", brokerDetails.get(Broker.SUPPORTED_VIRTUALHOST_TYPES));
+        assertNotNull("Unexpected value of attribute supportedVirtualHostNodeTypes", brokerDetails.get(Broker.SUPPORTED_VIRTUALHOSTNODE_TYPES));
+
     }
 
 }

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/TestUtils.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/TestUtils.java?rev=1601162&r1=1601161&r2=1601162&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/TestUtils.java
(original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/TestUtils.java
Sat Jun  7 19:00:39 2014
@@ -20,29 +20,10 @@
  */
 package org.apache.qpid.test.utils;
 
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
 
-import java.io.File;
 import java.lang.management.ManagementFactory;
 import java.lang.management.ThreadInfo;
 import java.lang.management.ThreadMXBean;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.apache.qpid.server.model.BrokerModel;
-import org.apache.qpid.server.model.VirtualHost;
-import org.apache.qpid.server.model.VirtualHostNode;
-import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
-import org.apache.qpid.server.store.ConfiguredObjectRecordImpl;
-import org.apache.qpid.server.store.DurableConfigurationStore;
-import org.apache.qpid.server.store.JsonFileConfigStore;
-import org.apache.qpid.server.store.MemoryConfigurationStore;
-import org.apache.qpid.server.store.MemoryMessageStore;
-import org.apache.qpid.server.virtualhost.ProvidedStoreVirtualHost;
-import org.apache.qpid.util.FileUtils;
-import org.apache.qpid.util.Strings;
 
 public class TestUtils
 {
@@ -71,53 +52,4 @@ public class TestUtils
         }
         return dump.toString();
     }
-
-    public static String createStoreWithVirtualHostEntry(Map<String, Object> messageStoreSettings,
TestBrokerConfiguration config, String configStoreType)
-    {
-        UUID virtualHostId = UUID.randomUUID();
-        Map<String, Object> virtualHostAttributes = new HashMap<String, Object>();
-        virtualHostAttributes.put(VirtualHost.NAME, TestBrokerConfiguration.ENTRY_NAME_VIRTUAL_HOST);
-        virtualHostAttributes.put(VirtualHost.ID, virtualHostId);
-        virtualHostAttributes.put(VirtualHost.TYPE, MemoryMessageStore.TYPE.equals(configStoreType)
? configStoreType : ProvidedStoreVirtualHost.VIRTUAL_HOST_TYPE);
-        virtualHostAttributes.put(VirtualHost.MESSAGE_STORE_SETTINGS, messageStoreSettings);
-        virtualHostAttributes.put(VirtualHost.MODEL_VERSION, BrokerModel.MODEL_VERSION);
-
-        // If using MMS, switch to split store with JSON config store.
-        if (MemoryConfigurationStore.TYPE.equals(configStoreType))
-        {
-            configStoreType =  JsonFileConfigStore.TYPE;
-        }
-        DurableConfigurationStoreFactory storeFactory = DurableConfigurationStoreFactory.FACTORY_LOADER.get(configStoreType);
-        DurableConfigurationStore store = storeFactory.createDurableConfigurationStore();
-
-        config.setObjectAttribute(VirtualHostNode.class, TestBrokerConfiguration.ENTRY_NAME_VIRTUAL_HOST,
VirtualHostNode.TYPE, configStoreType);
-
-        Map<String,Object> nodeAttributes = config.getObjectAttributes(VirtualHostNode.class,
TestBrokerConfiguration.ENTRY_NAME_VIRTUAL_HOST);
-        String storePath = (String)nodeAttributes.get(DurableConfigurationStore.STORE_PATH);
-        String path = Strings.expand(storePath, false, Strings.JAVA_SYS_PROPS_RESOLVER, Strings.ENV_VARS_RESOLVER);
-
-        File pathFile = new File(path);
-        if (pathFile.exists())
-        {
-            FileUtils.delete(pathFile, true);
-        }
-
-        Map<String, Object> attributes =  new HashMap<String, Object>(nodeAttributes);
-        attributes.put(DurableConfigurationStore.STORE_PATH, path);
-
-        VirtualHostNode<?> virtualHostNode = mock(VirtualHostNode.class);
-        when(virtualHostNode.getModel()).thenReturn(BrokerModel.getInstance());
-        when(virtualHostNode.getName()).thenReturn(TestBrokerConfiguration.ENTRY_NAME_VIRTUAL_HOST);
-
-        try
-        {
-            store.openConfigurationStore(virtualHostNode, attributes);
-            store.create(new ConfiguredObjectRecordImpl(virtualHostId, VirtualHost.class.getSimpleName(),
virtualHostAttributes));
-        }
-        finally
-        {
-            store.closeConfigurationStore();
-        }
-        return path;
-    }
 }



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


Mime
View raw message