qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject svn commit: r1502835 - in /qpid/trunk/qpid/java: ./ bdbstore/ bdbstore/jmx/ bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/ broker-plugins/derby-store/ broker-plugins/derby-store/src/main/resources/META-INF/ broker-plugins/derby-store/s...
Date Sat, 13 Jul 2013 18:43:30 GMT
Author: rgodfrey
Date: Sat Jul 13 18:43:28 2013
New Revision: 1502835

URL: http://svn.apache.org/r1502835
Log:
QPID-4983 : [Java Broker] Move store implementations to broker plugins

Added:
    qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/
    qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/
      - copied from r1501682, qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/resources/services/
    qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/store/pool/   (props changed)
      - copied from r1501730, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/pool/
    qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/
    qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/
    qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory
    qpid/trunk/qpid/java/broker-plugins/memory-store/
    qpid/trunk/qpid/java/broker-plugins/memory-store/build.xml
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/org/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java
      - copied, changed from r1501680, qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java
      - copied unchanged from r1501680, qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/store/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/store/memory/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/store/memory/add.js
      - copied unchanged from r1501680, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/store/memory/add.js
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/virtualhost/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/virtualhost/store/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/virtualhost/store/memory/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/resources/virtualhost/store/memory/add.html
      - copied unchanged from r1501680, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/memory/add.html
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/resources/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/
    qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/AbstractMemoryMessageStore.java
      - copied, changed from r1501680, qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java
    qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestMemoryMessageStore.java
      - copied, changed from r1501680, qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java
    qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestMemoryMessageStoreFactory.java
    qpid/trunk/qpid/java/broker/src/test/resources/
    qpid/trunk/qpid/java/broker/src/test/resources/META-INF/
    qpid/trunk/qpid/java/broker/src/test/resources/META-INF/services/
    qpid/trunk/qpid/java/broker/src/test/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/MessageStoreTest.java
      - copied unchanged from r1502489, qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/store/MessageStoreTest.java
Removed:
    qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/resources/services/
    qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/resources/services/
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/store/memory/
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java
    qpid/trunk/qpid/java/broker/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory
    qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/store/MessageStoreTest.java
Modified:
    qpid/trunk/qpid/java/bdbstore/build.xml
    qpid/trunk/qpid/java/bdbstore/jmx/build.xml
    qpid/trunk/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreTest.java
    qpid/trunk/qpid/java/broker-plugins/derby-store/build.xml
    qpid/trunk/qpid/java/broker-plugins/jdbc-store/build.xml
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MessageStoreCreator.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/StandardVirtualHostFactory.java
    qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/ExtractResendAndRequeueTest.java
    qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/startup/VirtualHostRecovererTest.java
    qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/exchange/TopicExchangeTest.java
    qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java
    qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java
    qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/virtualhost/StandardVirtualHostTest.java
    qpid/trunk/qpid/java/build.deps
    qpid/trunk/qpid/java/perftests/build.xml
    qpid/trunk/qpid/java/systests/build.xml
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java

Modified: qpid/trunk/qpid/java/bdbstore/build.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/build.xml?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/build.xml (original)
+++ qpid/trunk/qpid/java/bdbstore/build.xml Sat Jul 13 18:43:28 2013
@@ -18,7 +18,7 @@
  -->
 <project name="bdbstore" xmlns:ivy="antlib:org.apache.ivy.ant" default="build">
     <property name="module.depends" value="common broker" />
-    <property name="module.test.depends" value="client common/tests broker/tests management/common systests broker-plugins/management-jmx" />
+    <property name="module.test.depends" value="client common/tests broker/tests management/common systests broker-plugins/management-jmx broker-plugins/memory-store" />
     <property name="module.genpom" value="true"/>
     <property name="module.genpom.args" value="-Sqpid-common=provided -Sqpid-broker=provided -Sje=provided"/>
 

Modified: qpid/trunk/qpid/java/bdbstore/jmx/build.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/jmx/build.xml?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/jmx/build.xml (original)
+++ qpid/trunk/qpid/java/bdbstore/jmx/build.xml Sat Jul 13 18:43:28 2013
@@ -18,7 +18,7 @@
  -->
 <project name="bdbstore-jmx" default="build">
     <property name="module.depends" value="common broker broker-plugins/management-jmx management/common bdbstore" />
-    <property name="module.test.depends" value="broker/tests common/tests management/common client systests bdbstore/tests" />
+    <property name="module.test.depends" value="broker/tests common/tests management/common client systests bdbstore/tests broker-plugins/memory-store" />
 
     <property name="module.genpom" value="true"/>
     <property name="module.genpom.args" value="-Sqpid-common=provided -Sqpid-broker=provided -Sqpid-broker-plugins-management-jmx=provided -Sqpid-management-common=provided -Sqpid-bdbstore=provided -Sje=provided"/>

Modified: qpid/trunk/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreTest.java?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreTest.java (original)
+++ qpid/trunk/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreTest.java Sat Jul 13 18:43:28 2013
@@ -39,7 +39,7 @@ import org.apache.qpid.server.message.Me
 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.model.VirtualHost;
+import org.apache.qpid.server.store.MessageStoreTest;
 import org.apache.qpid.server.store.MessageMetaDataType;
 import org.apache.qpid.server.store.MessageStore;
 import org.apache.qpid.server.store.StorableMessageMetaData;
@@ -57,13 +57,12 @@ import org.apache.qpid.transport.Message
 
 import static org.mockito.Matchers.eq;
 import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
 
 /**
  * Subclass of MessageStoreTest which runs the standard tests from the superclass against
  * the BDB Store as well as additional tests specific to the BDB store-implementation.
  */
-public class BDBMessageStoreTest extends org.apache.qpid.server.store.MessageStoreTest
+public class BDBMessageStoreTest extends MessageStoreTest
 {
     private static byte[] CONTENT_BYTES = new byte[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
 

Modified: qpid/trunk/qpid/java/broker-plugins/derby-store/build.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/derby-store/build.xml?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/derby-store/build.xml (original)
+++ qpid/trunk/qpid/java/broker-plugins/derby-store/build.xml Sat Jul 13 18:43:28 2013
@@ -22,6 +22,7 @@
 
     <property name="module.genpom" value="true"/>
     <property name="module.genpom.args" value="-Sqpid-common=provided -Sqpid-broker=provided"/>
+    <property name="broker-plugins-derby-store.libs" value="" />
 
     <property name="broker.plugin" value="true"/>
 

Modified: qpid/trunk/qpid/java/broker-plugins/jdbc-store/build.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/jdbc-store/build.xml?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/jdbc-store/build.xml (original)
+++ qpid/trunk/qpid/java/broker-plugins/jdbc-store/build.xml Sat Jul 13 18:43:28 2013
@@ -22,6 +22,7 @@
 
     <property name="module.genpom" value="true"/>
     <property name="module.genpom.args" value="-Sqpid-common=provided -Sqpid-broker=provided"/>
+    <property name="broker-plugins-jdbc-store.libs" value="" />
 
     <property name="broker.plugin" value="true"/>
 

Propchange: qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/store/pool/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Sat Jul 13 18:43:28 2013
@@ -0,0 +1,7 @@
+/qpid/branches/0.5.x-dev/broker-plugins/management-http/src/main/java/resources/virtualhost/store/pool:886720-886722
+/qpid/branches/0.5.x-dev/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/pool:886720-886722,887145,892761,894875,916304,916325,930288,931179
+/qpid/branches/java-broker-0-10/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/pool:795950-829653
+/qpid/branches/java-broker-vhost-refactor/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/pool:1493674-1494547
+/qpid/branches/java-network-refactor/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/pool:805429-821809
+/qpid/branches/qpid-2935/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/pool:1061302-1072333
+/qpid/trunk/qpid/broker-plugins/management-http/src/main/java/resources/virtualhost/store/pool:796646-796653

Added: qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory?rev=1502835&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory (added)
+++ qpid/trunk/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory Sat Jul 13 18:43:28 2013
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+org.apache.qpid.server.store.jdbc.JDBCMessageStoreFactory

Added: qpid/trunk/qpid/java/broker-plugins/memory-store/build.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/memory-store/build.xml?rev=1502835&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/memory-store/build.xml (added)
+++ qpid/trunk/qpid/java/broker-plugins/memory-store/build.xml Sat Jul 13 18:43:28 2013
@@ -0,0 +1,32 @@
+<!--
+ - Licensed to the Apache Software Foundation (ASF) under one
+ - or more contributor license agreements.  See the NOTICE file
+ - distributed with this work for additional information
+ - regarding copyright ownership.  The ASF licenses this file
+ - to you under the Apache License, Version 2.0 (the
+ - "License"); you may not use this file except in compliance
+ - with the License.  You may obtain a copy of the License at
+ - 
+ -   http://www.apache.org/licenses/LICENSE-2.0
+ - 
+ - Unless required by applicable law or agreed to in writing,
+ - software distributed under the License is distributed on an
+ - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ - KIND, either express or implied.  See the License for the
+ - specific language governing permissions and limitations
+ - under the License.
+ -->
+<project name="Qpid Broker-Plugins Memory Store" default="build">
+    <property name="module.depends" value="common broker" />
+    <property name="module.test.depends" value="common/tests broker/tests" />
+
+    <property name="module.genpom" value="true"/>
+    <property name="module.genpom.args" value="-Sqpid-common=provided -Sqpid-broker=provided"/>
+
+    <property name="broker.plugin" value="true"/>
+    <property name="broker-plugins-memory-store.libs" value="" />
+
+    <import file="../../module.xml" />
+
+    <target name="bundle" depends="bundle-tasks"/>
+</project>

Copied: qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java (from r1501680, qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java?p2=qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java&p1=qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java&r1=1501680&r2=1502835&rev=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java (original)
+++ qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java Sat Jul 13 18:43:28 2013
@@ -20,127 +20,11 @@
  */
 package org.apache.qpid.server.store;
 
-import java.util.Map;
-import java.util.UUID;
-import org.apache.qpid.AMQStoreException;
-import org.apache.qpid.server.message.EnqueableMessage;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-import org.apache.qpid.server.model.VirtualHost;
 
 /** A simple message store that stores the messages in a thread-safe structure in memory. */
-public class MemoryMessageStore extends NullMessageStore
+public class MemoryMessageStore extends AbstractMemoryMessageStore
 {
     public static final String TYPE = "Memory";
-    private final AtomicLong _messageId = new AtomicLong(1);
-    private final AtomicBoolean _closed = new AtomicBoolean(false);
-
-    private static final Transaction IN_MEMORY_TRANSACTION = new Transaction()
-    {
-        @Override
-        public StoreFuture commitTranAsync() throws AMQStoreException
-        {
-            return StoreFuture.IMMEDIATE_FUTURE;
-        }
-
-        @Override
-        public void enqueueMessage(TransactionLogResource queue, EnqueableMessage message) throws AMQStoreException
-        {
-        }
-
-        @Override
-        public void dequeueMessage(TransactionLogResource  queue, EnqueableMessage message) throws AMQStoreException
-        {
-        }
-
-        @Override
-        public void commitTran() throws AMQStoreException
-        {
-        }
-
-        @Override
-        public void abortTran() throws AMQStoreException
-        {
-        }
-
-        @Override
-        public void removeXid(long format, byte[] globalId, byte[] branchId)
-        {
-        }
-
-        @Override
-        public void recordXid(long format, byte[] globalId, byte[] branchId, Record[] enqueues, Record[] dequeues)
-        {
-        }
-    };
-
-    private final StateManager _stateManager;
-    private final EventManager _eventManager = new EventManager();
-
-    public MemoryMessageStore()
-    {
-        _stateManager = new StateManager(_eventManager);
-    }
-
-    @Override
-    public void configureConfigStore(String name,
-                                     ConfigurationRecoveryHandler recoveryHandler,
-                                     VirtualHost virtualHost) throws Exception
-    {
-        _stateManager.attainState(State.INITIALISING);
-    }
-
-    @Override
-    public void configureMessageStore(String name,
-                                      MessageStoreRecoveryHandler recoveryHandler,
-                                      TransactionLogRecoveryHandler tlogRecoveryHandler) throws Exception
-    {
-        _stateManager.attainState(State.INITIALISED);
-    }
-
-    @Override
-    public void activate() throws Exception
-    {
-        _stateManager.attainState(State.ACTIVATING);
-
-        _stateManager.attainState(State.ACTIVE);
-    }
-
-    @Override
-    public StoredMessage addMessage(StorableMessageMetaData metaData)
-    {
-        final long id = _messageId.getAndIncrement();
-        StoredMemoryMessage message = new StoredMemoryMessage(id, metaData);
-
-        return message;
-    }
-
-    @Override
-    public Transaction newTransaction()
-    {
-        return IN_MEMORY_TRANSACTION;
-    }
-
-    @Override
-    public boolean isPersistent()
-    {
-        return false;
-    }
-
-    @Override
-    public void close() throws Exception
-    {
-        _stateManager.attainState(State.CLOSING);
-        _closed.getAndSet(true);
-        _stateManager.attainState(State.CLOSED);
-    }
-
-    @Override
-    public void addEventListener(EventListener eventListener, Event... events)
-    {
-        _eventManager.addEventListener(eventListener, events);
-    }
 
     @Override
     public String getStoreType()

Added: qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory?rev=1502835&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory (added)
+++ qpid/trunk/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory Sat Jul 13 18:43:28 2013
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+org.apache.qpid.server.store.MemoryMessageStoreFactory

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java Sat Jul 13 18:43:28 2013
@@ -26,7 +26,6 @@ import org.apache.commons.configuration.
 
 import org.apache.qpid.server.configuration.plugins.AbstractConfiguration;
 import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.store.MemoryMessageStore;
 
 import java.io.File;
 import java.util.HashMap;
@@ -129,7 +128,7 @@ public class VirtualHostConfiguration ex
 
     public String getMessageStoreClass()
     {
-        return getStringValue("store.class", MemoryMessageStore.class.getName());
+        return getStringValue("store.class", null);
     }
 
     public void setMessageStoreClass(String storeFactoryClass)

Copied: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/AbstractMemoryMessageStore.java (from r1501680, qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/AbstractMemoryMessageStore.java?p2=qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/AbstractMemoryMessageStore.java&p1=qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java&r1=1501680&r2=1502835&rev=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/AbstractMemoryMessageStore.java Sat Jul 13 18:43:28 2013
@@ -20,19 +20,15 @@
  */
 package org.apache.qpid.server.store;
 
-import java.util.Map;
-import java.util.UUID;
-import org.apache.qpid.AMQStoreException;
-import org.apache.qpid.server.message.EnqueableMessage;
-
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicLong;
+import org.apache.qpid.AMQStoreException;
+import org.apache.qpid.server.message.EnqueableMessage;
 import org.apache.qpid.server.model.VirtualHost;
 
 /** A simple message store that stores the messages in a thread-safe structure in memory. */
-public class MemoryMessageStore extends NullMessageStore
+abstract public class AbstractMemoryMessageStore extends NullMessageStore
 {
-    public static final String TYPE = "Memory";
     private final AtomicLong _messageId = new AtomicLong(1);
     private final AtomicBoolean _closed = new AtomicBoolean(false);
 
@@ -78,7 +74,7 @@ public class MemoryMessageStore extends 
     private final StateManager _stateManager;
     private final EventManager _eventManager = new EventManager();
 
-    public MemoryMessageStore()
+    public AbstractMemoryMessageStore()
     {
         _stateManager = new StateManager(_eventManager);
     }
@@ -142,9 +138,4 @@ public class MemoryMessageStore extends 
         _eventManager.addEventListener(eventListener, events);
     }
 
-    @Override
-    public String getStoreType()
-    {
-        return TYPE;
-    }
 }

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MessageStoreCreator.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MessageStoreCreator.java?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MessageStoreCreator.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MessageStoreCreator.java Sat Jul 13 18:43:28 2013
@@ -61,7 +61,8 @@ public class MessageStoreCreator
         MessageStoreFactory factory = _factories.get(storeType.toLowerCase());
         if (factory == null)
         {
-            throw new IllegalConfigurationException("Unknown store type: " + storeType);
+            throw new IllegalConfigurationException("Unknown store type: " + storeType
+                                                    + ". Supported types: " + _factories.keySet());
         }
         return factory.createMessageStore();
     }

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/StandardVirtualHostFactory.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/StandardVirtualHostFactory.java?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/StandardVirtualHostFactory.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/StandardVirtualHostFactory.java Sat Jul 13 18:43:28 2013
@@ -19,20 +19,14 @@ package org.apache.qpid.server.virtualho
  *
  */
 
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
 import java.util.LinkedHashMap;
-import java.util.List;
 import java.util.Map;
 import org.apache.commons.configuration.Configuration;
-import org.apache.commons.configuration.ConfigurationException;
 import org.apache.qpid.server.configuration.VirtualHostConfiguration;
 import org.apache.qpid.server.model.adapter.VirtualHostAdapter;
 import org.apache.qpid.server.plugin.MessageStoreFactory;
 import org.apache.qpid.server.plugin.VirtualHostFactory;
 import org.apache.qpid.server.stats.StatisticsGatherer;
-import org.apache.qpid.server.store.MemoryMessageStore;
 import org.apache.qpid.server.store.MessageStoreConstants;
 import org.apache.qpid.server.store.MessageStoreCreator;
 
@@ -89,17 +83,6 @@ public class StandardVirtualHostFactory 
                 factory.validateAttributes(attributes);
             }
         }
-        // TODO - each store type should validate its own attributes
-        if(!((String) storeType).equalsIgnoreCase(MemoryMessageStore.TYPE))
-        {
-        /*    Object storePath = attributes.get(STORE_PATH_ATTRIBUTE);
-            if(!(storePath instanceof String))
-            {
-                throw new IllegalArgumentException("Attribute '"+ STORE_PATH_ATTRIBUTE
-                                                               +"' is required and must be of type String.");
-
-            }*/
-        }
 
     }
 

Modified: qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/ExtractResendAndRequeueTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/ExtractResendAndRequeueTest.java?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/ExtractResendAndRequeueTest.java (original)
+++ qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/ExtractResendAndRequeueTest.java Sat Jul 13 18:43:28 2013
@@ -31,8 +31,8 @@ import org.apache.qpid.server.queue.Mock
 import org.apache.qpid.server.queue.QueueEntry;
 import org.apache.qpid.server.queue.QueueEntryIterator;
 import org.apache.qpid.server.queue.SimpleQueueEntryList;
-import org.apache.qpid.server.store.MemoryMessageStore;
 import org.apache.qpid.server.store.MessageStore;
+import org.apache.qpid.server.store.TestMemoryMessageStore;
 import org.apache.qpid.server.subscription.MockSubscription;
 import org.apache.qpid.server.subscription.Subscription;
 
@@ -63,7 +63,7 @@ public class ExtractResendAndRequeueTest
     private UnacknowledgedMessageMapImpl _unacknowledgedMessageMap;
     private static final int INITIAL_MSG_COUNT = 10;
     private AMQQueue _queue = new MockAMQQueue(getName());
-    private MessageStore _messageStore = new MemoryMessageStore();
+    private MessageStore _messageStore = new TestMemoryMessageStore();
     private LinkedList<QueueEntry> _referenceList = new LinkedList<QueueEntry>();
 
     @Override

Modified: qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/startup/VirtualHostRecovererTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/startup/VirtualHostRecovererTest.java?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/startup/VirtualHostRecovererTest.java (original)
+++ qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/startup/VirtualHostRecovererTest.java Sat Jul 13 18:43:28 2013
@@ -78,7 +78,7 @@ public class VirtualHostRecovererTest ex
         attributes.put(VirtualHost.NAME, getName());
         attributes.put(VirtualHost.TYPE, StandardVirtualHostFactory.TYPE);
 
-        attributes.put(VirtualHost.STORE_TYPE, "MEMORY");
+        attributes.put(VirtualHost.STORE_TYPE, "TESTMEMORY");
         when(entry.getAttributes()).thenReturn(attributes);
 
         VirtualHost host = recoverer.create(null, entry, parent);

Modified: qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/exchange/TopicExchangeTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/exchange/TopicExchangeTest.java?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/exchange/TopicExchangeTest.java (original)
+++ qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/exchange/TopicExchangeTest.java Sat Jul 13 18:43:28 2013
@@ -35,8 +35,8 @@ import org.apache.qpid.server.queue.AMQQ
 import org.apache.qpid.server.queue.AMQQueueFactory;
 import org.apache.qpid.server.queue.BaseQueue;
 import org.apache.qpid.server.queue.IncomingMessage;
-import org.apache.qpid.server.store.MemoryMessageStore;
 import org.apache.qpid.server.store.MessageStore;
+import org.apache.qpid.server.store.TestMemoryMessageStore;
 import org.apache.qpid.server.util.BrokerTestHelper;
 import org.apache.qpid.server.virtualhost.VirtualHost;
 import org.apache.qpid.test.utils.QpidTestCase;
@@ -56,7 +56,7 @@ public class TopicExchangeTest extends Q
         BrokerTestHelper.setUp();
         _exchange = new TopicExchange();
         _vhost = BrokerTestHelper.createVirtualHost(getName());
-        _store = new MemoryMessageStore();
+        _store = new TestMemoryMessageStore();
     }
 
     @Override

Modified: qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java (original)
+++ qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java Sat Jul 13 18:43:28 2013
@@ -38,9 +38,8 @@ import org.apache.qpid.server.logging.Sy
 import org.apache.qpid.server.logging.actors.CurrentActor;
 import org.apache.qpid.server.logging.actors.TestLogActor;
 import org.apache.qpid.server.stats.StatisticsGatherer;
-import org.apache.qpid.server.store.MemoryMessageStore;
+import org.apache.qpid.server.store.TestMemoryMessageStore;
 import org.apache.qpid.server.util.BrokerTestHelper;
-import org.apache.qpid.server.virtualhost.StandardVirtualHost;
 import org.apache.qpid.server.virtualhost.StandardVirtualHostFactory;
 
 public class VirtualHostTest extends TestCase
@@ -92,7 +91,7 @@ public class VirtualHostTest extends Tes
         Map<String, Object> attributes = new HashMap<String, Object>();
         attributes.put(VirtualHost.NAME, getName());
         attributes.put(VirtualHost.TYPE, StandardVirtualHostFactory.TYPE);
-        attributes.put(VirtualHost.STORE_TYPE, MemoryMessageStore.TYPE);
+        attributes.put(VirtualHost.STORE_TYPE, TestMemoryMessageStore.TYPE);
         attributes.put(VirtualHost.STATE, State.QUIESCED);
 
         VirtualHost host = createHost(attributes);
@@ -131,7 +130,7 @@ public class VirtualHostTest extends Tes
         Map<String, Object> attributes = new HashMap<String, Object>();
         attributes.put(VirtualHost.NAME, getName());
         attributes.put(VirtualHost.TYPE, StandardVirtualHostFactory.TYPE);
-        attributes.put(VirtualHost.STORE_TYPE, MemoryMessageStore.TYPE);
+        attributes.put(VirtualHost.STORE_TYPE, TestMemoryMessageStore.TYPE);
 
         VirtualHost host = createHost(attributes);
         return host;

Copied: qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestMemoryMessageStore.java (from r1501680, qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestMemoryMessageStore.java?p2=qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestMemoryMessageStore.java&p1=qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java&r1=1501680&r2=1502835&rev=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java (original)
+++ qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestMemoryMessageStore.java Sat Jul 13 18:43:28 2013
@@ -20,127 +20,11 @@
  */
 package org.apache.qpid.server.store;
 
-import java.util.Map;
-import java.util.UUID;
-import org.apache.qpid.AMQStoreException;
-import org.apache.qpid.server.message.EnqueableMessage;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-import org.apache.qpid.server.model.VirtualHost;
 
 /** A simple message store that stores the messages in a thread-safe structure in memory. */
-public class MemoryMessageStore extends NullMessageStore
+public class TestMemoryMessageStore extends AbstractMemoryMessageStore
 {
-    public static final String TYPE = "Memory";
-    private final AtomicLong _messageId = new AtomicLong(1);
-    private final AtomicBoolean _closed = new AtomicBoolean(false);
-
-    private static final Transaction IN_MEMORY_TRANSACTION = new Transaction()
-    {
-        @Override
-        public StoreFuture commitTranAsync() throws AMQStoreException
-        {
-            return StoreFuture.IMMEDIATE_FUTURE;
-        }
-
-        @Override
-        public void enqueueMessage(TransactionLogResource queue, EnqueableMessage message) throws AMQStoreException
-        {
-        }
-
-        @Override
-        public void dequeueMessage(TransactionLogResource  queue, EnqueableMessage message) throws AMQStoreException
-        {
-        }
-
-        @Override
-        public void commitTran() throws AMQStoreException
-        {
-        }
-
-        @Override
-        public void abortTran() throws AMQStoreException
-        {
-        }
-
-        @Override
-        public void removeXid(long format, byte[] globalId, byte[] branchId)
-        {
-        }
-
-        @Override
-        public void recordXid(long format, byte[] globalId, byte[] branchId, Record[] enqueues, Record[] dequeues)
-        {
-        }
-    };
-
-    private final StateManager _stateManager;
-    private final EventManager _eventManager = new EventManager();
-
-    public MemoryMessageStore()
-    {
-        _stateManager = new StateManager(_eventManager);
-    }
-
-    @Override
-    public void configureConfigStore(String name,
-                                     ConfigurationRecoveryHandler recoveryHandler,
-                                     VirtualHost virtualHost) throws Exception
-    {
-        _stateManager.attainState(State.INITIALISING);
-    }
-
-    @Override
-    public void configureMessageStore(String name,
-                                      MessageStoreRecoveryHandler recoveryHandler,
-                                      TransactionLogRecoveryHandler tlogRecoveryHandler) throws Exception
-    {
-        _stateManager.attainState(State.INITIALISED);
-    }
-
-    @Override
-    public void activate() throws Exception
-    {
-        _stateManager.attainState(State.ACTIVATING);
-
-        _stateManager.attainState(State.ACTIVE);
-    }
-
-    @Override
-    public StoredMessage addMessage(StorableMessageMetaData metaData)
-    {
-        final long id = _messageId.getAndIncrement();
-        StoredMemoryMessage message = new StoredMemoryMessage(id, metaData);
-
-        return message;
-    }
-
-    @Override
-    public Transaction newTransaction()
-    {
-        return IN_MEMORY_TRANSACTION;
-    }
-
-    @Override
-    public boolean isPersistent()
-    {
-        return false;
-    }
-
-    @Override
-    public void close() throws Exception
-    {
-        _stateManager.attainState(State.CLOSING);
-        _closed.getAndSet(true);
-        _stateManager.attainState(State.CLOSED);
-    }
-
-    @Override
-    public void addEventListener(EventListener eventListener, Event... events)
-    {
-        _eventManager.addEventListener(eventListener, events);
-    }
+    public static final String TYPE = "TestMemory";
 
     @Override
     public String getStoreType()

Added: qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestMemoryMessageStoreFactory.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestMemoryMessageStoreFactory.java?rev=1502835&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestMemoryMessageStoreFactory.java (added)
+++ qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestMemoryMessageStoreFactory.java Sat Jul 13 18:43:28 2013
@@ -0,0 +1,54 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.qpid.server.store;
+
+import java.util.Collections;
+import java.util.Map;
+import org.apache.commons.configuration.Configuration;
+import org.apache.qpid.server.plugin.MessageStoreFactory;
+
+public class TestMemoryMessageStoreFactory implements MessageStoreFactory
+{
+
+    @Override
+    public String getType()
+    {
+        return TestMemoryMessageStore.TYPE;
+    }
+
+    @Override
+    public MessageStore createMessageStore()
+    {
+        return new TestMemoryMessageStore();
+    }
+
+    @Override
+    public Map<String, Object> convertStoreConfiguration(Configuration configuration)
+    {
+        return Collections.emptyMap();
+    }
+
+    @Override
+    public void validateAttributes(Map<String, Object> attributes)
+    {
+    }
+}

Modified: qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java (original)
+++ qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java Sat Jul 13 18:43:28 2013
@@ -32,7 +32,7 @@ import java.util.concurrent.atomic.Atomi
 /**
  * Adds some extra methods to the memory message store for testing purposes.
  */
-public class TestableMemoryMessageStore extends MemoryMessageStore
+public class TestableMemoryMessageStore extends TestMemoryMessageStore
 {
     private final Map<Long, AMQQueue> _messages = new HashMap<Long, AMQQueue>();
     private final AtomicInteger _messageCount = new AtomicInteger(0);

Modified: qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/virtualhost/StandardVirtualHostTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/virtualhost/StandardVirtualHostTest.java?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/virtualhost/StandardVirtualHostTest.java (original)
+++ qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/virtualhost/StandardVirtualHostTest.java Sat Jul 13 18:43:28 2013
@@ -20,7 +20,9 @@
  */
 package org.apache.qpid.server.virtualhost;
 
+import static org.mockito.Matchers.eq;
 import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
 
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.configuration.ConfigurationException;
@@ -34,7 +36,7 @@ import org.apache.qpid.server.model.Brok
 import org.apache.qpid.server.queue.AMQQueue;
 import org.apache.qpid.server.security.SecurityManager;
 import org.apache.qpid.server.stats.StatisticsGatherer;
-import org.apache.qpid.server.store.MemoryMessageStore;
+import org.apache.qpid.server.store.TestMemoryMessageStore;
 import org.apache.qpid.server.util.BrokerTestHelper;
 import org.apache.qpid.test.utils.QpidTestCase;
 
@@ -306,7 +308,7 @@ public class StandardVirtualHostTest ext
             writer.write("      <" + vhostName + ">");
             writer.write("          <type>" + StandardVirtualHostFactory.TYPE + "</type>");
             writer.write("              <store>");
-            writer.write("                <class>" + MemoryMessageStore.class.getName() + "</class>");
+            writer.write("                <class>" + TestMemoryMessageStore.class.getName() + "</class>");
             writer.write("              </store>");
             if(exchangeName != null && !dontDeclare)
             {
@@ -363,10 +365,11 @@ public class StandardVirtualHostTest ext
         _virtualHostRegistry = broker.getVirtualHostRegistry();
 
         Configuration config = new PropertiesConfiguration();
-        config.setProperty("store.type", MemoryMessageStore.TYPE);
         VirtualHostConfiguration configuration = new  VirtualHostConfiguration(virtualHostName, config, broker);
+        final org.apache.qpid.server.model.VirtualHost virtualHost = mock(org.apache.qpid.server.model.VirtualHost.class);
+        when(virtualHost.getAttribute(eq(org.apache.qpid.server.model.VirtualHost.STORE_TYPE))).thenReturn(TestMemoryMessageStore.TYPE);
         VirtualHost host = new StandardVirtualHostFactory().createVirtualHost(_virtualHostRegistry, mock(StatisticsGatherer.class), new SecurityManager(mock(Broker.class), false), configuration,
-                mock(org.apache.qpid.server.model.VirtualHost.class));
+                virtualHost);
         _virtualHostRegistry.registerVirtualHost(host);
         return host;
     }

Added: qpid/trunk/qpid/java/broker/src/test/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/test/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory?rev=1502835&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker/src/test/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory (added)
+++ qpid/trunk/qpid/java/broker/src/test/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory Sat Jul 13 18:43:28 2013
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+org.apache.qpid.server.store.TestMemoryMessageStoreFactory

Modified: qpid/trunk/qpid/java/build.deps
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/build.deps?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/build.deps (original)
+++ qpid/trunk/qpid/java/build.deps Sat Jul 13 18:43:28 2013
@@ -98,6 +98,7 @@ broker-plugins-management-http.test.libs
 broker-plugins-management-jmx.test.libs=${test.libs}
 broker-plugins-jdbc-store.test.libs=${test.libs}
 broker-plugins-derby-store.test.libs=${test.libs}
+broker-plugins-memory-store.test.libs=${test.libs}
 
 management-common.test.libs=${test.libs}
 

Modified: qpid/trunk/qpid/java/perftests/build.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/build.xml?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/build.xml (original)
+++ qpid/trunk/qpid/java/perftests/build.xml Sat Jul 13 18:43:28 2013
@@ -33,7 +33,7 @@
     </condition>
 
     <property name="module.depends" value="client common"/>
-    <property name="module.test.depends" value="systests broker common/tests management/common ${perftests.optional.test.depends}"/>
+    <property name="module.test.depends" value="systests broker broker-plugins/memory-store broker-plugins/derby-store common/tests management/common ${perftests.optional.test.depends}"/>
 
     <import file="../module.xml"/>
 

Modified: qpid/trunk/qpid/java/systests/build.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/build.xml?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/build.xml (original)
+++ qpid/trunk/qpid/java/systests/build.xml Sat Jul 13 18:43:28 2013
@@ -34,7 +34,7 @@ nn - or more contributor license agreeme
 
     <!-- The jca module is unusual in that it produces a jar with the name ra rather than jca.  Unfortunately this means we
           need to add both jca (finds jca's jar dependencies) and ra (to find the qpid-ra jar file itself).  -->
-    <property name="module.depends" value="client management/common broker broker/tests common amqp-1-0-common common/tests jca ra broker-plugins/access-control broker-plugins/management-http broker-plugins/management-jmx ${systests.optional.depends}"/>
+    <property name="module.depends" value="client management/common broker broker/tests common amqp-1-0-common common/tests jca ra broker-plugins/access-control broker-plugins/management-http broker-plugins/management-jmx broker-plugins/memory-store broker-plugins/derby-store ${systests.optional.depends}"/>
     <property name="module.test.src" location="src/main/java"/>
     <property name="module.test.excludes"
               value="**/DropInTest.java,**/TestClientControlledTest.java"/>

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/SlowMessageStore.java Sat Jul 13 18:43:28 2013
@@ -40,8 +40,8 @@ public class SlowMessageStore implements
     private HashMap<String, Long> _preDelays = new HashMap<String, Long>();
     private HashMap<String, Long> _postDelays = new HashMap<String, Long>();
     private long _defaultDelay = 0L;
-    private MessageStore _realStore = new MemoryMessageStore();
-    private DurableConfigurationStore _durableConfigurationStore = (MemoryMessageStore) _realStore;
+    private MessageStore _realStore = new MessageStoreCreator().createMessageStore("Memory");
+    private DurableConfigurationStore _durableConfigurationStore = (DurableConfigurationStore) _realStore;
     private static final String PRE = "pre";
     private static final String POST = "post";
     private String DEFAULT_DELAY = "default";

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java?rev=1502835&r1=1502834&r2=1502835&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java Sat Jul 13 18:43:28 2013
@@ -66,7 +66,6 @@ import org.apache.qpid.server.model.Port
 import org.apache.qpid.server.model.VirtualHost;
 import org.apache.qpid.server.plugin.MessageStoreFactory;
 import org.apache.qpid.server.protocol.AmqpProtocolVersion;
-import org.apache.qpid.server.store.MemoryMessageStore;
 import org.apache.qpid.server.store.MessageStoreConstants;
 import org.apache.qpid.server.store.MessageStoreCreator;
 import org.apache.qpid.url.URLSyntaxException;
@@ -1433,10 +1432,10 @@ public class QpidBrokerTestCase extends 
     public String getTestProfileMessageStoreType()
     {
         final String storeClass = getTestProfileMessageStoreClassName();
-        if (storeClass == null)
+       /* if (storeClass == null)
         {
-            return MemoryMessageStore.TYPE;
-        }
+            return "Memory";
+        }*/
         return supportedStoresClassToTypeMapping.get(storeClass);
     }
 



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


Mime
View raw message