Package org.apache.activemq.store.kahadaptor

Examples of org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter


    private void startBroker() throws Exception {
        broker = BrokerFactory.createBroker("broker:(vm://localhost)");
        broker.setKeepDurableSubsActive(false);
        broker.setPersistent(true);
        KahaPersistenceAdapter persistenceAdapter = new KahaPersistenceAdapter();
        persistenceAdapter.setDirectory(new File("activemq-data/" + getName()));
        broker.setPersistenceAdapter(persistenceAdapter);
        broker.setUseJmx(true);
        broker.setBrokerName(getName());
        broker.start();
View Full Code Here


* @version $Revision: 1.3 $
*/
public class KahaQueueTest extends SimpleQueueTest {

    protected void configureBroker(BrokerService answer,String uri) throws Exception {
        KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter();
        answer.setPersistenceAdapter(adaptor);
        answer.addConnector(uri);
        answer.setDeleteAllMessagesOnStartup(true);
    }
View Full Code Here

            File kahaData = new File("activemq-data/" + getName() + "-kaha");
            if (deleteAllMessages)
                delete(kahaData);

            broker.setPersistent(true);
            KahaPersistenceAdapter kaha = new KahaPersistenceAdapter();
            kaha.setDirectory(kahaData);
            broker.setPersistenceAdapter(kaha);
            break;

        case KAHADB:
            File kahadbData = new File("activemq-data/" + getName() + "-kahadb");
View Full Code Here

            File kahaData = new File("activemq-data/" + getName() + "-kaha");
            if (deleteAllMessages)
                delete(kahaData);

            broker.setPersistent(true);
            KahaPersistenceAdapter kaha = new KahaPersistenceAdapter();
            kaha.setDirectory(kahaData);
            broker.setPersistenceAdapter(kaha);
            break;

        case KAHADB:
            File kahadbData = new File("activemq-data/" + getName() + "-kahadb");
View Full Code Here

        File dataFileDir = new File("target/test-amq-data/perfTest");
        File journalDir = new File(dataFileDir, "journal").getCanonicalFile();
        JournalImpl journal = new JournalImpl(journalDir, 3, 1024 * 1024 * 20);

        KahaPersistenceAdapter kahaAdaptor = new KahaPersistenceAdapter();
        JournalPersistenceAdapter journalAdaptor = new JournalPersistenceAdapter(journal, kahaAdaptor, answer.getTaskRunnerFactory());
        journalAdaptor.setMaxCheckpointWorkers(1);

        answer.setPersistenceAdapter(journalAdaptor);
        answer.addConnector(uri);
View Full Code Here

*/
public class KahaDurableSubscriptionTest extends DurableSubscriptionTestSupport {

    protected PersistenceAdapter createPersistenceAdapter() throws IOException {
        File dataDir = new File("target/test-data/durableKaha");
        KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter();
        adaptor.setDirectory(dataDir);
        return adaptor;
    }
View Full Code Here

    private void startBroker() throws Exception {
        broker = BrokerFactory.createBroker("broker:(vm://localhost)");
        broker.setKeepDurableSubsActive(false);
        broker.setPersistent(true);
        KahaPersistenceAdapter persistenceAdapter = new KahaPersistenceAdapter();
        persistenceAdapter.setDirectory(new File("activemq-data/" + getName()));
        broker.setPersistenceAdapter(persistenceAdapter);
        broker.setUseJmx(true);
        broker.setBrokerName(getName());
        broker.start();
View Full Code Here

     * result=factory.getBroker(); result.start(); return result; }
     */

    @Override
    protected void configureBroker(BrokerService answer,String uri) throws Exception {
        KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter();
        answer.setPersistenceAdapter(adaptor);
        answer.setDeleteAllMessagesOnStartup(true);
        answer.addConnector(uri);
      
    }
View Full Code Here

    protected static final Log log = LogFactory.getLog(KahaCursorDurableTest.class);

   

    protected void configureBroker(BrokerService answer) throws Exception{
        KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File("activemq-data/durableTest"));
        answer.setPersistenceAdapter(adaptor);
        answer.addConnector(bindAddress);
        //answer.setDeleteAllMessagesOnStartup(true);
    }
View Full Code Here

    }
   
    protected BrokerService createRestartedBroker() throws Exception {
        BrokerService broker = new BrokerService();
      
        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 Full Code Here

TOP

Related Classes of org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.