From 4bef5e359966d2844e910e8f2f52b40d67031b75 Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Tue, 6 Mar 2007 10:51:19 +0000 Subject: [PATCH] AMQPersistenceAdapter is now used instead of the QuickPersistenceAdapter git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@515065 13f79535-47bb-0310-9956-ffa450edef68 --- .../activemq/store/jpa/JPAPersistenceAdapter.java | 10 ++++++++++ .../broker/store/QuickJPAStoreRecoveryBrokerTest.java | 8 +++----- .../store/QuickJPAStoreXARecoveryBrokerTest.java | 8 +++----- .../apache/activemq/broker/store/quickjpabroker.xml | 2 +- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAPersistenceAdapter.java b/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAPersistenceAdapter.java index 0bc44f9bab..18080081a5 100755 --- a/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAPersistenceAdapter.java +++ b/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAPersistenceAdapter.java @@ -17,6 +17,7 @@ */ package org.apache.activemq.store.jpa; +import java.io.File; import java.io.IOException; import java.util.HashSet; import java.util.List; @@ -244,4 +245,13 @@ public class JPAPersistenceAdapter implements PersistenceAdapter { this.wireFormat = wireFormat; } + public void checkpoint(boolean sync) throws IOException{ + } + + public void setBrokerName(String brokerName){ + } + + public void setDirectory(File dir){ + } + } diff --git a/activemq-jpa-store/src/test/java/org/apache/activemq/broker/store/QuickJPAStoreRecoveryBrokerTest.java b/activemq-jpa-store/src/test/java/org/apache/activemq/broker/store/QuickJPAStoreRecoveryBrokerTest.java index 66142fa298..419d7bf8c8 100644 --- a/activemq-jpa-store/src/test/java/org/apache/activemq/broker/store/QuickJPAStoreRecoveryBrokerTest.java +++ b/activemq-jpa-store/src/test/java/org/apache/activemq/broker/store/QuickJPAStoreRecoveryBrokerTest.java @@ -18,13 +18,11 @@ package org.apache.activemq.broker.store; import java.util.Properties; - import junit.framework.Test; - import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.RecoveryBrokerTest; +import org.apache.activemq.store.amq.AMQPersistenceAdapter; import org.apache.activemq.store.jpa.JPAReferenceStoreAdapter; -import org.apache.activemq.store.quick.QuickPersistenceAdapter; /** * Used to verify that recovery works correctly against @@ -36,7 +34,7 @@ public class QuickJPAStoreRecoveryBrokerTest extends RecoveryBrokerTest { protected BrokerService createBroker() throws Exception { BrokerService service = new BrokerService(); service.setDeleteAllMessagesOnStartup(true); - QuickPersistenceAdapter pa = new QuickPersistenceAdapter(); + AMQPersistenceAdapter pa = new AMQPersistenceAdapter(); JPAReferenceStoreAdapter rfa = new JPAReferenceStoreAdapter(); Properties props = new Properties(); @@ -53,7 +51,7 @@ public class QuickJPAStoreRecoveryBrokerTest extends RecoveryBrokerTest { protected BrokerService createRestartedBroker() throws Exception { BrokerService service = new BrokerService(); - QuickPersistenceAdapter pa = new QuickPersistenceAdapter(); + AMQPersistenceAdapter pa = new AMQPersistenceAdapter(); JPAReferenceStoreAdapter rfa = new JPAReferenceStoreAdapter(); Properties props = new Properties(); diff --git a/activemq-jpa-store/src/test/java/org/apache/activemq/broker/store/QuickJPAStoreXARecoveryBrokerTest.java b/activemq-jpa-store/src/test/java/org/apache/activemq/broker/store/QuickJPAStoreXARecoveryBrokerTest.java index 944dbf5b37..64218f2ce9 100644 --- a/activemq-jpa-store/src/test/java/org/apache/activemq/broker/store/QuickJPAStoreXARecoveryBrokerTest.java +++ b/activemq-jpa-store/src/test/java/org/apache/activemq/broker/store/QuickJPAStoreXARecoveryBrokerTest.java @@ -18,13 +18,11 @@ package org.apache.activemq.broker.store; import java.util.Properties; - import junit.framework.Test; - import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.XARecoveryBrokerTest; +import org.apache.activemq.store.amq.AMQPersistenceAdapter; import org.apache.activemq.store.jpa.JPAReferenceStoreAdapter; -import org.apache.activemq.store.quick.QuickPersistenceAdapter; /** * Used to verify that recovery works correctly against @@ -44,7 +42,7 @@ public class QuickJPAStoreXARecoveryBrokerTest extends XARecoveryBrokerTest { protected BrokerService createBroker() throws Exception { BrokerService service = new BrokerService(); service.setDeleteAllMessagesOnStartup(true); - QuickPersistenceAdapter pa = new QuickPersistenceAdapter(); + AMQPersistenceAdapter pa = new AMQPersistenceAdapter(); JPAReferenceStoreAdapter rfa = new JPAReferenceStoreAdapter(); Properties props = new Properties(); @@ -61,7 +59,7 @@ public class QuickJPAStoreXARecoveryBrokerTest extends XARecoveryBrokerTest { protected BrokerService createRestartedBroker() throws Exception { BrokerService service = new BrokerService(); - QuickPersistenceAdapter pa = new QuickPersistenceAdapter(); + AMQPersistenceAdapter pa = new AMQPersistenceAdapter(); JPAReferenceStoreAdapter rfa = new JPAReferenceStoreAdapter(); Properties props = new Properties(); diff --git a/activemq-jpa-store/src/test/resources/org/apache/activemq/broker/store/quickjpabroker.xml b/activemq-jpa-store/src/test/resources/org/apache/activemq/broker/store/quickjpabroker.xml index d4b03000e5..78448b966c 100644 --- a/activemq-jpa-store/src/test/resources/org/apache/activemq/broker/store/quickjpabroker.xml +++ b/activemq-jpa-store/src/test/resources/org/apache/activemq/broker/store/quickjpabroker.xml @@ -29,7 +29,7 @@ - +