Examples of VMPersistenceAdapter


Examples of org.activemq.store.vm.VMPersistenceAdapter

            try
                ContainerWapper container;
                synchronized (this) {
                    container = new ContainerWapper();
                    container.addConnector(brokerUrl);
                    container.setPersistenceAdapter(new VMPersistenceAdapter());
                    container.start();
                    Thread.sleep(200);
                    notifyAll();
                }
                synchronized (this) {
View Full Code Here

Examples of org.activemq.store.vm.VMPersistenceAdapter

           
    public void run() {
        try {               
            container = new BrokerContainerImpl();
            container.addConnector(brokerUrl1);
            container.setPersistenceAdapter(new VMPersistenceAdapter());
            container.start();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of org.activemq.store.vm.VMPersistenceAdapter

    public BrokerConnector getEmbeddedBrokerConnector() throws JMSException {
        try {
            if (brokerConnector == null) {
                BrokerContainer container = new BrokerContainerImpl(brokerName, serviceName);
                if( !persistent ) {
                    container.setPersistenceAdapter(new VMPersistenceAdapter());
                }
                NetworkConnector networkConnector = null;
                if (doDiscovery) {
                    networkConnector = new DiscoveryNetworkConnector(container);
                    MulticastDiscoveryAgent agent = new MulticastDiscoveryAgent(serviceName);
View Full Code Here

Examples of org.activemq.store.vm.VMPersistenceAdapter

            return answer;
        }
        else {
            log.warn("Default message store (journal+derby) could not be found in the classpath or property '" + PERSISTENCE_ADAPTER_FACTORY
                    + "' not specified so defaulting to use RAM based message persistence");
            return new VMPersistenceAdapter();
        }
    }
View Full Code Here

Examples of org.activemq.store.vm.VMPersistenceAdapter

            ActiveMQConnection.DEFAULT_PASSWORD,
            "peer://burgertime");
               
        connectionFactory
            .setBrokerContainerFactory(new BrokerContainerFactoryImpl(
                new VMPersistenceAdapter()));
        connectionFactory.setUseEmbeddedBroker(true);

        this.connection = connectionFactory.createTopicConnection();
        this.connection.setClientID(clientId);
        this.connection.start();
View Full Code Here

Examples of org.activemq.store.vm.VMPersistenceAdapter

            return answer;
        }
        else {
            log.warn("Default message store (journal+derby) could not be found in the classpath or property '" + PERSISTENCE_ADAPTER_FACTORY
                    + "' not specified so defaulting to use RAM based message persistence");
            return new VMPersistenceAdapter();
        }
    }
View Full Code Here

Examples of org.activemq.store.vm.VMPersistenceAdapter

    private static BrokerContainer[] startBrokers(String[] addresses) throws JMSException {
        BrokerContainer[] containers = new BrokerContainer[addresses.length];
        for (int i = 0; i < containers.length; i++) {
            containers[i] = new BrokerContainerImpl(Integer.toString(i));
            containers[i].setPersistenceAdapter(new VMPersistenceAdapter());
            containers[i].addConnector(addresses[i]);

            for (int j = 0; j < addresses.length; j++) {
                if (i == j) {
                    continue;
View Full Code Here

Examples of org.activemq.store.vm.VMPersistenceAdapter

        }

        public void run() {
            try {
                m_container = new BrokerContainerImpl(m_id);
                m_container.setPersistenceAdapter(new VMPersistenceAdapter());
                m_container.addConnector(m_myURL);

                for (int i = 0; i < m_linkedURLs.length; i++) {
                    if (!m_myURL.equals(m_linkedURLs[i])) {
                        m_container.addNetworkConnector("reliable:" + m_linkedURLs[i]);
View Full Code Here

Examples of org.activemq.store.vm.VMPersistenceAdapter

            ActiveMQConnection.DEFAULT_PASSWORD,
            "peer://burgertime");
               
        connectionFactory
            .setBrokerContainerFactory(new BrokerContainerFactoryImpl(
                new VMPersistenceAdapter()));
        connectionFactory.setUseEmbeddedBroker(true);

        this.connection = connectionFactory.createTopicConnection();
        this.connection.setClientID(clientId);
        this.connection.start();
View Full Code Here

Examples of org.activemq.store.vm.VMPersistenceAdapter

   
    public PersistenceAdapter createPersistenceAdapter(String journalType) throws Exception {
        File directory = new File("target/journal");
        if( vmPersistenceAdapter==null ) {
            delete(directory);
            vmPersistenceAdapter = new VMPersistenceAdapter();
        }
        JournalPersistenceAdapter adapter = new JournalPersistenceAdapter(directory, vmPersistenceAdapter);
        adapter.setJournalType(journalType);
        return adapter;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.