Package org.activemq.store

Examples of org.activemq.store.PersistenceAdapter


     */
    protected PersistenceAdapter createPersistenceAdapter() throws JMSException {
        File directory = new File(getStoreDirectory());

        // lets use reflection to avoid runtime dependency on persistence libraries
        PersistenceAdapter answer = null;
        String property = System.getProperty(PERSISTENCE_ADAPTER_FACTORY);
        if (property != null) {
            answer = tryCreatePersistenceAdapter(property, directory, false);
        }
        if (answer == null) {
View Full Code Here


    protected PersistenceAdapter tryCreatePersistenceAdapter(String className, File directory, boolean ignoreErrors) throws JMSException {
        Class adapterClass = loadClass(className, ignoreErrors);
        if (adapterClass != null) {
            try {
                PersistenceAdapterFactory factory = (PersistenceAdapterFactory) adapterClass.newInstance();
                PersistenceAdapter answer = factory.createPersistenceAdapter(directory, memoryManager);
                log.info("Persistence adapter created using: " + className);
                return answer;
            }
            catch (IOException cause) {
                throw createInstantiateAdapterException(className, (Exception) cause);
View Full Code Here

     */
    protected PersistenceAdapter createPersistenceAdapter() throws JMSException {
        File directory = new File(getStoreDirectory());

        // lets use reflection to avoid runtime dependency on persistence libraries
        PersistenceAdapter answer = null;
        String property = System.getProperty(PERSISTENCE_ADAPTER_FACTORY);
        if (property != null) {
            answer = tryCreatePersistenceAdapter(property, directory, false);
        }
        if (answer == null) {
View Full Code Here

    protected PersistenceAdapter tryCreatePersistenceAdapter(String className, File directory, boolean ignoreErrors) throws JMSException {
        Class adapterClass = loadClass(className, ignoreErrors);
        if (adapterClass != null) {
            try {
                PersistenceAdapterFactory factory = (PersistenceAdapterFactory) adapterClass.newInstance();
                PersistenceAdapter answer = factory.createPersistenceAdapter(directory, memoryManager);
                log.info("Persistence adapter created using: " + className);
                return answer;
            }
            catch (IOException cause) {
                throw createInstantiateAdapterException(className, (Exception) cause);
View Full Code Here

    }
   
    protected void setUp() throws Exception {
       
        JournalTestHelper helper = new JournalTestHelper();
        PersistenceAdapter adapter = helper.createPersistenceAdapter(JournalPersistenceAdapter.DEFAULT_JOURNAL_TYPE);       
        SimpleCachePersistenceAdapter cacheAdapter = new SimpleCachePersistenceAdapter(adapter);
        cacheAdapter.setCacheSize(MESSAGE_COUNT);
       
        broker = new BrokerContainerImpl("localhost");
        broker.setPersistenceAdapter(cacheAdapter);
View Full Code Here

     */
    protected PersistenceAdapter createPersistenceAdapter() throws JMSException {
        File directory = new File(getStoreDirectory());

        // lets use reflection to avoid runtime dependency on persistence libraries
        PersistenceAdapter answer = null;
        String property = System.getProperty(PERSISTENCE_ADAPTER_FACTORY);
        if (property != null) {
            answer = tryCreatePersistenceAdapter(property, directory, false);
        }
        if (answer == null) {
View Full Code Here

    protected PersistenceAdapter tryCreatePersistenceAdapter(String className, File directory, boolean ignoreErrors) throws JMSException {
        Class adapterClass = loadClass(className, ignoreErrors);
        if (adapterClass != null) {
            try {
                PersistenceAdapterFactory factory = (PersistenceAdapterFactory) adapterClass.newInstance();
                PersistenceAdapter answer = factory.createPersistenceAdapter(directory, memoryManager);
                log.info("Persistence adapter created using: " + className);
                return answer;
            }
            catch (IOException cause) {
                throw createInstantiateAdapterException(className, (Exception) cause);
View Full Code Here

TOP

Related Classes of org.activemq.store.PersistenceAdapter

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.