1 18 package org.apache.activemq.perf; 19 20 import java.io.File ; 21 22 import org.apache.activeio.journal.active.JournalImpl; 23 import org.apache.activemq.broker.BrokerService; 24 import org.apache.activemq.store.journal.JournalPersistenceAdapter; 25 import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter; 26 29 public class JournalKahaQueueTest extends SimpleQueueTest{ 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 | Popular Tags |