Renamed the kahaPersistentAdaptor to kahaPersistenceAdapter to be consistent with other persistence adapters. Makes configuration slightly more intuitive. :)

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@426461 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adrian T. Co 2006-07-28 09:54:32 +00:00
parent c36ea1aa9b
commit 6e755a5cc5
12 changed files with 199 additions and 199 deletions

View File

@ -44,8 +44,8 @@ import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap;
*
* @version $Revision: 1.4 $
*/
public class KahaPersistentAdaptor implements PersistenceAdapter{
private static final Log log=LogFactory.getLog(KahaPersistentAdaptor.class);
public class KahaPersistenceAdapter implements PersistenceAdapter{
private static final Log log=LogFactory.getLog(KahaPersistenceAdapter.class);
static final String PREPARED_TRANSACTIONS_NAME="PreparedTransactions";
KahaTransactionStore transactionStore;
ConcurrentHashMap topics=new ConcurrentHashMap();
@ -55,7 +55,7 @@ public class KahaPersistentAdaptor implements PersistenceAdapter{
private OpenWireFormat wireFormat=new OpenWireFormat();
Store store;
public KahaPersistentAdaptor(File dir) throws IOException{
public KahaPersistenceAdapter(File dir) throws IOException{
if(!dir.exists()){
dir.mkdirs();
}

View File

@ -43,9 +43,9 @@ import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap;
public class KahaTransactionStore implements TransactionStore{
private Map transactions=new ConcurrentHashMap();
private Map prepared;
private KahaPersistentAdaptor adaptor;
private KahaPersistenceAdapter adaptor;
KahaTransactionStore(KahaPersistentAdaptor adaptor,Map preparedMap){
KahaTransactionStore(KahaPersistenceAdapter adaptor,Map preparedMap){
this.adaptor=adaptor;
this.prepared=preparedMap;
}

View File

@ -22,7 +22,7 @@ import java.net.URISyntaxException;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.JmsTopicTransactionTest;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.store.kahadaptor.KahaPersistentAdaptor;
import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
import org.apache.activemq.test.JmsResourceProvider;
/**
* Test failover for Queues
@ -39,7 +39,7 @@ public class TransactedTopicMasterSlaveTest extends JmsTopicTransactionTest{
// this will create the main (or master broker)
broker=createBroker();
broker.start();
KahaPersistentAdaptor adaptor=new KahaPersistentAdaptor(new File("activemq-data/slave"));
KahaPersistenceAdapter adaptor=new KahaPersistenceAdapter(new File("activemq-data/slave"));
slave = new BrokerService();
slave.setBrokerName("slave");
slave.setPersistenceAdapter(adaptor);
@ -66,7 +66,7 @@ public class TransactedTopicMasterSlaveTest extends JmsTopicTransactionTest{
protected BrokerService createBroker() throws Exception,URISyntaxException{
BrokerService broker=new BrokerService();
broker.setBrokerName("master");
KahaPersistentAdaptor adaptor=new KahaPersistentAdaptor(new File("activemq-data/master"));
KahaPersistenceAdapter adaptor=new KahaPersistenceAdapter(new File("activemq-data/master"));
broker.setPersistenceAdapter(adaptor);
broker.addConnector("tcp://localhost:62001");
broker.setDeleteAllMessagesOnStartup(true);

View File

@ -22,7 +22,7 @@ import junit.framework.Test;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.RecoveryBrokerTest;
import org.apache.activemq.store.kahadaptor.KahaPersistentAdaptor;
import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
import org.apache.activemq.xbean.BrokerFactoryBean;
import org.springframework.core.io.ClassPathResource;
@ -41,7 +41,7 @@ public class KahaRecoveryBrokerTest extends RecoveryBrokerTest {
protected BrokerService createRestartedBroker() throws Exception {
BrokerService broker = new BrokerService();
KahaPersistentAdaptor adaptor = new KahaPersistentAdaptor(new File( System.getProperty("basedir", ".")+"/target/activemq-data/kaha-store.db"));
KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File( System.getProperty("basedir", ".")+"/target/activemq-data/kaha-store.db"));
broker.setPersistenceAdapter(adaptor);
broker.addConnector("tcp://localhost:0");
return broker;

View File

@ -22,7 +22,7 @@ import junit.framework.Test;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.XARecoveryBrokerTest;
import org.apache.activemq.store.kahadaptor.KahaPersistentAdaptor;
import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
import org.apache.activemq.xbean.BrokerFactoryBean;
import org.springframework.core.io.ClassPathResource;
@ -50,7 +50,7 @@ public class KahaXARecoveryBrokerTest extends XARecoveryBrokerTest {
protected BrokerService createRestartedBroker() throws Exception {
BrokerService broker = new BrokerService();
KahaPersistentAdaptor adaptor = new KahaPersistentAdaptor(new File( System.getProperty("basedir", ".")+"/target/activemq-data/kaha-store.db"));
KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File( System.getProperty("basedir", ".")+"/target/activemq-data/kaha-store.db"));
broker.setPersistenceAdapter(adaptor);
broker.addConnector("tcp://localhost:0");
return broker;

View File

@ -19,7 +19,7 @@ package org.apache.activemq.perf;
import java.io.File;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.store.kahadaptor.KahaPersistentAdaptor;
import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
/**
* @version $Revision: 1.3 $
*/
@ -37,7 +37,7 @@ public class KahaDurableTopicTest extends SimpleDurableTopicTest {
*/
protected void configureBroker(BrokerService answer) throws Exception{
KahaPersistentAdaptor adaptor = new KahaPersistentAdaptor(new File("activemq-data/perfTest"));
KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File("activemq-data/perfTest"));
answer.setPersistenceAdapter(adaptor);
answer.addConnector(bindAddress);
answer.setDeleteAllMessagesOnStartup(true);

View File

@ -22,7 +22,7 @@ import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Session;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.store.kahadaptor.KahaPersistentAdaptor;
import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
/**
* @version $Revision: 1.3 $
*/
@ -30,7 +30,7 @@ public class KahaQueueTest extends SimpleQueueTest{
protected void configureBroker(BrokerService answer) throws Exception{
KahaPersistentAdaptor adaptor = new KahaPersistentAdaptor(new File("activemq-data/perfTest"));
KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File("activemq-data/perfTest"));
answer.setPersistenceAdapter(adaptor);
answer.addConnector(bindAddress);
answer.setDeleteAllMessagesOnStartup(true);

View File

@ -24,7 +24,7 @@
</transportConnectors>
<persistenceAdapter>
<kahaPersistentAdaptor dir = "${basedir}/target/activemq-data/master"/>
<kahaPersistenceAdapter dir = "${basedir}/target/activemq-data/master"/>
</persistenceAdapter>
</broker>

View File

@ -26,7 +26,7 @@
<persistenceAdapter>
<kahaPersistentAdaptor dir = "${basedir}/target/activemq-data/slave"/>
<kahaPersistenceAdapter dir = "${basedir}/target/activemq-data/slave"/>
</persistenceAdapter>
</broker>

View File

@ -24,7 +24,7 @@
</transportConnectors>
<persistenceAdapter>
<kahaPersistentAdaptor dir = "${basedir}/target/activemq-data/kaha-broker.db"/>
<kahaPersistenceAdapter dir = "${basedir}/target/activemq-data/kaha-broker.db"/>
</persistenceAdapter>
</broker>

View File

@ -23,7 +23,7 @@
<transportConnector uri="tcp://localhost:61616"/>
</transportConnectors>
<persistenceAdapter>
<kahaPersistentAdaptor dir = "activemq-data"/>
<kahaPersistenceAdapter dir = "activemq-data"/>
</persistenceAdapter>
</broker>

View File

@ -3,7 +3,7 @@
<broker useJmx="false" brokerName="kahaBroker" start="false" persistent="true" useShutdownHook="false" deleteAllMessagesOnStartup="true" advisorySupport="false">
<persistenceAdapter>
<kahaPersistentAdaptor dir="target/kaha-data"/>
<kahaPersistenceAdapter dir="target/kaha-data"/>
</persistenceAdapter>
<transportConnectors>