rename the activemq-leveldb module to activemq-leveldb-store to be consistent with other store modules. Move more spring/xbean support bits into the activemq-spring module.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1406726 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2012-11-07 17:26:31 +00:00
parent c5cf03806d
commit bfbe90b399
76 changed files with 202 additions and 111 deletions

View File

@ -33,7 +33,6 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import javax.net.ssl.SSLServerSocket;
import javax.net.ssl.SSLServerSocketFactory;
import javax.net.ssl.SSLSocketFactory;
import org.slf4j.Logger;

View File

@ -90,6 +90,12 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-broker</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test</artifactId>

View File

@ -437,7 +437,7 @@
<phase>generate-sources</phase>
<configuration>
<sourceDirectory>${basedir}/src/main/grammar</sourceDirectory>
<outputDirectory>${basedir}/target/generated-javacc</outputDirectory>
<outputDirectory>${basedir}/target/generated-sources/javacc</outputDirectory>
<packageName>org.apache.activemq.selector</packageName>
</configuration>
<goals>

View File

@ -49,12 +49,15 @@
<!-- activemq related dependencies -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-core</artifactId>
<artifactId>activemq-spring</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-core</artifactId>
<type>test-jar</type>
<artifactId>activemq-amq-store</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-kahadb-store</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
@ -100,17 +103,19 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-broker</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<!-- needed for TestPurgeCommand, but not for compile. -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>

View File

@ -18,6 +18,8 @@
package org.apache.activemq.leveldb
import org.apache.activemq.console.Main
import scala.Array
import scala.Predef._
object IDERunner {
def main(args:Array[String]) ={

View File

@ -76,7 +76,7 @@
<!-- =============================== -->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
<artifactId>activemq-spring</artifactId>
</dependency>
<dependency>
@ -91,6 +91,10 @@
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-amq-store</artifactId>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-leveldb-store</artifactId>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
@ -200,6 +204,13 @@
<!-- =============================== -->
<!-- Testing Dependencies -->
<!-- =============================== -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-broker</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>

View File

@ -17,11 +17,9 @@
package org.apache.activemq;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.CountDownLatch;

View File

@ -22,8 +22,6 @@ import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.util.Wait;
import org.apache.log4j.Logger;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.LinkedBlockingQueue;

View File

@ -0,0 +1,45 @@
package org.apache.activemq.leveldb;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.BrokerTest;
import org.apache.activemq.store.PersistenceAdapter;
import java.io.File;
import java.io.IOException;
/**
* @author <a href="http://hiramchirino.com">Hiram Chirino</a>
*/
public class LevelDBStoreBrokerTest extends BrokerTest {
// def suite: Test = {
// return new TestSuite(classOf[LevelDBStoreBrokerTest])
// }
//
// def main(args: Array[String]): Unit = {
// junit.textui.TestRunner.run(suite)
// }
@Override
protected BrokerService createBroker() throws Exception {
BrokerService broker = new BrokerService();
broker.setPersistenceAdapter(createPersistenceAdapter(true));
return broker;
}
protected PersistenceAdapter createPersistenceAdapter(boolean delete) {
LevelDBStore store = new LevelDBStore();
store.setDirectory(new File("target/activemq-data/leveldb"));
if (delete) {
store.deleteAllMessages();
}
return store;
}
protected BrokerService createRestartedBroker() throws IOException {
BrokerService broker = new BrokerService();
broker.setPersistenceAdapter(createPersistenceAdapter(false));
return broker;
}
}

View File

@ -28,7 +28,6 @@ import java.util.concurrent.ConcurrentHashMap;
import javax.jms.BytesMessage;
import javax.jms.Connection;
import javax.jms.DeliveryMode;
import javax.jms.Destination;
import javax.jms.MapMessage;
import javax.jms.Message;
import javax.jms.MessageConsumer;
@ -43,7 +42,6 @@ import org.apache.activemq.command.ActiveMQBytesMessage;
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.command.ActiveMQMapMessage;
import org.apache.activemq.command.ActiveMQObjectMessage;
import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.ActiveMQStreamMessage;
import org.apache.activemq.command.ActiveMQTextMessage;
import org.apache.activemq.command.ActiveMQTopic;

View File

@ -31,7 +31,6 @@ import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.Session;
import javax.jms.TopicSubscriber;
import javax.management.InstanceNotFoundException;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;

View File

@ -31,7 +31,6 @@ import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.ActiveMQPrefetchPolicy;
import org.apache.activemq.CombinationTestSupport;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.region.policy.PendingDurableSubscriberMessageStoragePolicy;
import org.apache.activemq.broker.region.policy.PolicyEntry;
import org.apache.activemq.broker.region.policy.PolicyMap;
import org.apache.activemq.broker.region.policy.SharedDeadLetterStrategy;

View File

@ -20,11 +20,9 @@ import junit.framework.TestCase;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.TransportConnector;
import org.apache.activemq.broker.region.Destination;
import org.apache.activemq.util.ConsumerThread;
import org.apache.activemq.util.ProducerThread;
import org.apache.activemq.util.Wait;
import org.omg.CORBA.PUBLIC_MEMBER;
import javax.jms.Connection;
import javax.jms.Queue;

View File

@ -23,7 +23,6 @@ import javax.jms.TextMessage;
import org.apache.activemq.ActiveMQConnection;
import org.apache.activemq.broker.BrokerRegistry;
import org.apache.activemq.broker.policy.IndividualDeadLetterViaXmlTest;
import org.apache.activemq.broker.region.DestinationStatistics;
import org.apache.activemq.broker.region.RegionBroker;
import org.apache.activemq.util.Wait;

View File

@ -34,8 +34,6 @@ import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.region.policy.PolicyEntry;
import org.apache.activemq.broker.region.policy.PolicyMap;
import org.apache.activemq.command.ActiveMQTopic;
import org.apache.activemq.store.PersistenceAdapter;
import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
import org.apache.activemq.util.Wait;
public class DurableSubscriptionSelectorTest extends org.apache.activemq.TestSupport {

View File

@ -33,7 +33,6 @@ import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.CombinationTestSupport;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.region.DestinationStatistics;
import org.apache.activemq.broker.region.RegionBroker;
import org.apache.activemq.broker.region.policy.PolicyEntry;
import org.apache.activemq.broker.region.policy.PolicyMap;
import org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePolicy;

View File

@ -34,7 +34,6 @@ import javax.jms.TextMessage;
import org.apache.activemq.ActiveMQConnection;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.ActiveMQSession;
import org.apache.activemq.CombinationTestSupport;
import org.apache.activemq.JmsMultipleBrokersTestSupport;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.TransportConnector;

View File

@ -45,7 +45,6 @@ import org.apache.activemq.ActiveMQConnection;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.ActiveMQMessageConsumer;
import org.apache.activemq.JmsMultipleBrokersTestSupport;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.TransportConnector;
import org.apache.activemq.broker.jmx.DestinationViewMBean;
import org.apache.activemq.command.ActiveMQDestination;

View File

@ -92,6 +92,12 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-broker</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.aggregate</groupId>

View File

@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>tests</artifactId>
<artifactId>activemq-parent</artifactId>
<version>5.8-SNAPSHOT</version>
</parent>

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -25,11 +25,11 @@
<version>5.8-SNAPSHOT</version>
</parent>
<artifactId>activemq-leveldb</artifactId>
<artifactId>activemq-leveldb-store</artifactId>
<packaging>jar</packaging>
<name>ActiveMQ :: LevelDB</name>
<description>ActiveMQ LevelDB based store</description>
<name>ActiveMQ :: LevelDB Store</name>
<description>ActiveMQ LevelDB Store Implementation</description>
<dependencies>
@ -43,7 +43,7 @@
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<artifactId>activemq-broker</artifactId>
<scope>provided</scope>
</dependency>
@ -194,13 +194,14 @@
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<artifactId>activemq-broker</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-console</artifactId>
<artifactId>activemq-kahadb-store</artifactId>
<scope>test</scope>
</dependency>
@ -334,6 +335,7 @@
<failIfNoTests>false</failIfNoTests>
<excludes>
<exclude>**/EnqueueRateScenariosTest.*</exclude>
<exclude>**/HALevelDB*.*</exclude>
</excludes>
</configuration>
</plugin>

View File

@ -1,61 +0,0 @@
/**
* 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.activemq.leveldb
import org.apache.activemq.broker.BrokerService
import org.apache.activemq.broker.BrokerTest
import org.apache.activemq.store.PersistenceAdapter
import java.io.File
import junit.framework.{TestSuite, Test}
/**
* @author <a href="http://hiramchirino.com">Hiram Chirino</a>
*/
object LevelDBStoreBrokerTest {
def suite: Test = {
return new TestSuite(classOf[LevelDBStoreBrokerTest])
}
def main(args: Array[String]): Unit = {
junit.textui.TestRunner.run(suite)
}
}
class LevelDBStoreBrokerTest extends BrokerTest {
protected def createPersistenceAdapter(delete: Boolean): PersistenceAdapter = {
var store: LevelDBStore = new LevelDBStore
store.setDirectory(new File("target/activemq-data/leveldb"))
if (delete) {
store.deleteAllMessages
}
return store
}
protected override def createBroker: BrokerService = {
var broker: BrokerService = new BrokerService
broker.setPersistenceAdapter(createPersistenceAdapter(true))
return broker
}
protected def createRestartedBroker: BrokerService = {
var broker: BrokerService = new BrokerService
broker.setPersistenceAdapter(createPersistenceAdapter(false))
return broker
}
}

View File

@ -46,6 +46,12 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-broker</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activeio-core</artifactId>

View File

@ -53,7 +53,7 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-core</artifactId>
<artifactId>activemq-client</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
@ -80,7 +80,7 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-core</artifactId>
<artifactId>activemq-broker</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

View File

@ -45,7 +45,11 @@
<!-- activemq -->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<artifactId>activemq-broker</artifactId>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-kahadb-store</artifactId>
</dependency>
<dependency>
@ -54,7 +58,7 @@
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<artifactId>activemq-broker</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<scope>test</scope>

View File

@ -54,8 +54,38 @@
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-core</artifactId>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-jdbc-store</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-kahadb-store</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-amq-store</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-leveldb-store</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-mqtt</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-stomp</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
@ -89,7 +119,7 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-core</artifactId>
<artifactId>activemq-broker</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

View File

@ -86,6 +86,12 @@
<scope>test</scope>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-broker</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activeio-core</artifactId>

View File

@ -83,6 +83,13 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-broker</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
</dependencies>
<build>

View File

@ -41,6 +41,19 @@
<groupId>${project.groupId}</groupId>
<artifactId>activemq-camel</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activeio-core</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-client</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-broker</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-core</artifactId>
@ -50,14 +63,33 @@
<artifactId>activemq-core</artifactId>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activeio-core</artifactId>
<artifactId>activemq-leveldb-store</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-leveldb</artifactId>
<artifactId>activemq-amq-store</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-kahadb-store</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-jdbc-store</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-mqtt</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-stomp</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-console</artifactId>

19
pom.xml
View File

@ -204,6 +204,7 @@
<module>activemq-kahadb-store</module>
<module>activemq-amq-store</module>
<module>activemq-jdbc-store</module>
<module>activemq-leveldb-store</module>
<module>activemq-core</module>
<module>activemq-all</module>
@ -213,7 +214,6 @@
<module>activemq-jaas</module>
<module>activemq-blueprint</module>
<module>activemq-karaf</module>
<module>activemq-leveldb</module>
<module>activemq-openwire-generator</module>
<module>activemq-optional</module>
<module>activemq-pool</module>
@ -257,6 +257,11 @@
<artifactId>activemq-jdbc-store</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-leveldb-store</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
@ -301,6 +306,13 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-jaas</artifactId>
@ -321,11 +333,6 @@
<artifactId>activemq-web</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-leveldb</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-xmpp</artifactId>