1 18 package org.apache.activemq.perf; 19 20 import java.io.File ; 21 import org.apache.activeio.journal.active.JournalImpl; 22 import org.apache.activemq.broker.BrokerService; 23 import org.apache.activemq.store.journal.JournalPersistenceAdapter; 24 import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter; 25 28 public class JournalKahaDurableTopicTest extends SimpleDurableTopicTest { 29 30 31 32 protected void configureBroker(BrokerService answer) throws Exception { 33 34 File dataFileDir = new File ("target/test-amq-data/perfTest"); 35 File journalDir = new File (dataFileDir, "journal").getCanonicalFile(); 36 JournalImpl journal = new JournalImpl(journalDir, 3, 1024*1024*20); 37 38 KahaPersistenceAdapter kahaAdaptor = new KahaPersistenceAdapter(); 39 JournalPersistenceAdapter journalAdaptor = new JournalPersistenceAdapter(journal, kahaAdaptor, answer.getTaskRunnerFactory()); 40 journalAdaptor.setMaxCheckpointWorkers(1); 41 42 answer.setPersistenceAdapter(journalAdaptor); 43 answer.addConnector(bindAddress); 44 answer.setDeleteAllMessagesOnStartup(true); 45 46 } 47 48 49 50 51 52 } 53 | Popular Tags |