activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r1302494 - in /activemq/trunk/activemq-core: ./ src/main/java/org/apache/activemq/store/leveldb/ src/test/java/org/apache/activemq/store/leveldb/
Date Mon, 19 Mar 2012 15:01:13 GMT
Author: rajdavies
Date: Mon Mar 19 15:01:12 2012
New Revision: 1302494

URL: http://svn.apache.org/viewvc?rev=1302494&view=rev
Log:
updated for https://issues.apache.org/jira/browse/AMQ-3772

Added:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/leveldb/
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/leveldb/LevelDBPersistenceAdapter.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/store/leveldb/
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/store/leveldb/LevelDBStoreBrokerTest.java
      - copied, changed from r1302225, activemq/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java
Modified:
    activemq/trunk/activemq-core/pom.xml

Modified: activemq/trunk/activemq-core/pom.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/pom.xml?rev=1302494&r1=1302493&r2=1302494&view=diff
==============================================================================
--- activemq/trunk/activemq-core/pom.xml (original)
+++ activemq/trunk/activemq-core/pom.xml Mon Mar 19 15:01:12 2012
@@ -92,6 +92,10 @@
       <artifactId>activemq-protobuf</artifactId>
       <optional>false</optional>
     </dependency>
+		<dependency>
+      <groupId>org.fusesource.fuse-extra</groupId>
+      <artifactId>fusemq-leveldb</artifactId>
+    </dependency>
 
     <!-- =============================== -->
     <!-- Optional Dependencies           -->
@@ -172,6 +176,7 @@
       <optional>true</optional>
     </dependency>
 
+    
     <!-- =============================== -->
     <!-- Testing Dependencies            -->
     <!-- =============================== -->

Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/leveldb/LevelDBPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/leveldb/LevelDBPersistenceAdapter.java?rev=1302494&view=auto
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/leveldb/LevelDBPersistenceAdapter.java
(added)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/leveldb/LevelDBPersistenceAdapter.java
Mon Mar 19 15:01:12 2012
@@ -0,0 +1,30 @@
+/**
+ * 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.store.leveldb;
+
+import org.fusesource.mq.leveldb.LevelDBStore;
+
+
+/**
+ * An implementation of {@link org.apache.activemq.store.PersistenceAdapter} designed for
use with
+ * LevelDB - Embedded Lightweight Non-Relational Database
+ *
+ * @org.apache.xbean.XBean element="levelDB"
+ *
+ */
+public class LevelDBPersistenceAdapter extends LevelDBStore {
+}

Copied: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/store/leveldb/LevelDBStoreBrokerTest.java
(from r1302225, activemq/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java)
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/store/leveldb/LevelDBStoreBrokerTest.java?p2=activemq/trunk/activemq-core/src/test/java/org/apache/activemq/store/leveldb/LevelDBStoreBrokerTest.java&p1=activemq/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java&r1=1302225&r2=1302494&rev=1302494&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/store/leveldb/LevelDBStoreBrokerTest.java
Mon Mar 19 15:01:12 2012
@@ -14,22 +14,23 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.activemq.store.kahadb;
+package org.apache.activemq.store.leveldb;
 
 import java.io.File;
 
 import junit.framework.Test;
-
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.BrokerTest;
+import org.apache.activemq.store.kahadb.KahaDBStore;
 import org.apache.activemq.util.IOHelper;
+import org.fusesource.mq.leveldb.LevelDBStore;
 
 /**
  * Once the wire format is completed we can test against real persistence storage.
  * 
  * 
  */
-public class KahaDBStoreBrokerTest extends BrokerTest {
+public class LevelDBStoreBrokerTest extends BrokerTest {
 
     protected void setUp() throws Exception {
         this.setAutoFail(true);
@@ -38,26 +39,26 @@ public class KahaDBStoreBrokerTest exten
     
     protected BrokerService createBroker() throws Exception {
         BrokerService broker = new BrokerService();
-        KahaDBStore kaha = new KahaDBStore();
-        File directory = new File("target/activemq-data/kahadb");
+        LevelDBStore levelDBStore = new LevelDBStore();
+        File directory = new File("target/activemq-data/leveldb");
         IOHelper.deleteChildren(directory);
-        kaha.setDirectory(directory);
-        kaha.deleteAllMessages();
-        broker.setPersistenceAdapter(kaha);
+        levelDBStore.setDirectory(directory);
+        levelDBStore.deleteAllMessages();
+        broker.setPersistenceAdapter(levelDBStore);
         return broker;
     }
     
     protected BrokerService createRestartedBroker() throws Exception {
         BrokerService broker = new BrokerService();
         KahaDBStore kaha = new KahaDBStore();
-        kaha.setDirectory(new File("target/activemq-data/kahadb"));
+        kaha.setDirectory(new File("target/activemq-data/leveldb"));
         broker.setPersistenceAdapter(kaha);
         return broker;
     }
     
     
     public static Test suite() {
-        return suite(KahaDBStoreBrokerTest.class);
+        return suite(LevelDBStoreBrokerTest.class);
     }
     
     public static void main(String[] args) {



Mime
View raw message