Package org.apache.activemq.store

Examples of org.apache.activemq.store.DefaultPersistenceAdapterFactory


            // Do not allow the broker to use a shutown hook, the kernel will stop it
            brokerService.setUseShutdownHook(isUseShutdownHook());

            // Setup the persistence adapter to use the right datasource and directory
            DefaultPersistenceAdapterFactory persistenceFactory = (DefaultPersistenceAdapterFactory) brokerService.getPersistenceFactory();
            persistenceFactory.setDataDirectoryFile(serverInfo.resolveServer(dataDirectory));
            persistenceFactory.setDataSource((DataSource) dataSource.$getResource());

            brokerService.start();
        }
        finally {
            Thread.currentThread().setContextClassLoader(old);
View Full Code Here


            // Do not allow the broker to use a shutown hook, the kernel will stop it
            brokerService.setUseShutdownHook(isUseShutdownHook());

            // Setup the persistence adapter to use the right datasource and directory
            DefaultPersistenceAdapterFactory persistenceFactory = (DefaultPersistenceAdapterFactory) brokerService.getPersistenceFactory();
            persistenceFactory.setDataDirectoryFile(serverInfo.resolve(dataDirectory));
            persistenceFactory.setDataSource((DataSource) dataSource.$getResource());

            brokerService.start();
        }
        finally {
            Thread.currentThread().setContextClassLoader(old);
View Full Code Here

            // Do not allow the broker to use a shutown hook, the kernel will stop it
            brokerService.setUseShutdownHook(isUseShutdownHook());

            // Setup the persistence adapter to use the right datasource and directory
            DefaultPersistenceAdapterFactory persistenceFactory = (DefaultPersistenceAdapterFactory) brokerService.getPersistenceFactory();
            persistenceFactory.setDataDirectoryFile(serverInfo.resolveServer(dataDirectory));
            persistenceFactory.setDataSource((DataSource) dataSource.$getResource());

            brokerService.start();
        }
        finally {
            Thread.currentThread().setContextClassLoader(old);
View Full Code Here

*/
public class JDBCDurableSubscriptionTest extends DurableSubscriptionTestSupport {

    protected PersistenceAdapter createPersistenceAdapter() throws IOException {
        File dataDir = new File("target/test-data/durableJDBC");
        DefaultPersistenceAdapterFactory factory = new DefaultPersistenceAdapterFactory();
        factory.setDataDirectoryFile(dataDir);
        factory.setUseJournal(false);
        return factory.createPersistenceAdapter();
    }
View Full Code Here

*/
public class JournalDurableSubscriptionTest extends DurableSubscriptionTestSupport {

    protected PersistenceAdapter createPersistenceAdapter() throws IOException {
        File dataDir = new File("target/test-data/durableJournal");
        DefaultPersistenceAdapterFactory factory = new DefaultPersistenceAdapterFactory();
        factory.setDataDirectoryFile(dataDir);
        factory.setUseJournal(true);
        factory.setJournalLogFileSize(1024*64);
        return factory.createPersistenceAdapter();
    }
View Full Code Here

public class QuickJournalRecoveryBrokerTest extends RecoveryBrokerTest {

    protected BrokerService createBroker() throws Exception {
        BrokerService service = new BrokerService();
        service.setDeleteAllMessagesOnStartup(true);
        DefaultPersistenceAdapterFactory factory = (DefaultPersistenceAdapterFactory) service.getPersistenceFactory();
        factory.setUseQuickJournal(true);
        return service;
    }
View Full Code Here

        return service;
    }
   
    protected BrokerService createRestartedBroker() throws Exception {
        BrokerService service = new BrokerService();
        DefaultPersistenceAdapterFactory factory = (DefaultPersistenceAdapterFactory) service.getPersistenceFactory();
        factory.setUseQuickJournal(true);
        return service;
    }
View Full Code Here

    }

    protected BrokerService createBroker() throws Exception {
        BrokerService service = new BrokerService();
        service.setDeleteAllMessagesOnStartup(true);
        DefaultPersistenceAdapterFactory factory = (DefaultPersistenceAdapterFactory) service.getPersistenceFactory();
        factory.setUseQuickJournal(true);
        return service;
    }
View Full Code Here

        return service;
    }
   
    protected BrokerService createRestartedBroker() throws Exception {
        BrokerService service = new BrokerService();
        DefaultPersistenceAdapterFactory factory = (DefaultPersistenceAdapterFactory) service.getPersistenceFactory();
        factory.setUseQuickJournal(true);
        return service;
    }
View Full Code Here

            return new MemoryPersistenceAdapter();
        }
    }

    protected DefaultPersistenceAdapterFactory createPersistenceFactory() {
        DefaultPersistenceAdapterFactory factory = new DefaultPersistenceAdapterFactory();
        factory.setDataDirectoryFile(getDataDirectory());
        factory.setTaskRunnerFactory(getPersistenceTaskRunnerFactory());
        return factory;
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.store.DefaultPersistenceAdapterFactory

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.