allow any implementation of PersistenceAdapterFactory to be used

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@391096 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-04-03 18:00:07 +00:00
parent 609681a0cb
commit cda091cb5e
2 changed files with 10 additions and 4 deletions

View File

@ -20,6 +20,7 @@ import junit.framework.Test;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.RecoveryBrokerTest;
import org.apache.activemq.store.DefaultPersistenceAdapterFactory;
/**
* Used to verify that recovery works correctly against
@ -31,13 +32,15 @@ public class QuickJournalRecoveryBrokerTest extends RecoveryBrokerTest {
protected BrokerService createBroker() throws Exception {
BrokerService service = new BrokerService();
service.setDeleteAllMessagesOnStartup(true);
service.getPersistenceFactory().setUseQuickJournal(true);
DefaultPersistenceAdapterFactory factory = (DefaultPersistenceAdapterFactory) service.getPersistenceFactory();
factory.setUseQuickJournal(true);
return service;
}
protected BrokerService createRestartedBroker() throws Exception {
BrokerService service = new BrokerService();
service.getPersistenceFactory().setUseQuickJournal(true);
DefaultPersistenceAdapterFactory factory = (DefaultPersistenceAdapterFactory) service.getPersistenceFactory();
factory.setUseQuickJournal(true);
return service;
}

View File

@ -20,6 +20,7 @@ import junit.framework.Test;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.XARecoveryBrokerTest;
import org.apache.activemq.store.DefaultPersistenceAdapterFactory;
/**
* Used to verify that recovery works correctly against
@ -39,13 +40,15 @@ public class QuickJournalXARecoveryBrokerTest extends XARecoveryBrokerTest {
protected BrokerService createBroker() throws Exception {
BrokerService service = new BrokerService();
service.setDeleteAllMessagesOnStartup(true);
service.getPersistenceFactory().setUseQuickJournal(true);
DefaultPersistenceAdapterFactory factory = (DefaultPersistenceAdapterFactory) service.getPersistenceFactory();
factory.setUseQuickJournal(true);
return service;
}
protected BrokerService createRestartedBroker() throws Exception {
BrokerService service = new BrokerService();
service.getPersistenceFactory().setUseQuickJournal(true);
DefaultPersistenceAdapterFactory factory = (DefaultPersistenceAdapterFactory) service.getPersistenceFactory();
factory.setUseQuickJournal(true);
return service;
}