Package org.codehaus.activemq

Examples of org.codehaus.activemq.ActiveMQConnectionFactory


        cacheAdapter.setCacheSize(MESSAGE_COUNT);
       
        broker = new BrokerContainerImpl("localhost");
        broker.setPersistenceAdapter(cacheAdapter);
        broker.start();
        connectionFactory = new ActiveMQConnectionFactory(broker, "vm://localhost");
        connectionFactory.setTurboBoost(true);
        connectionFactory.setCachingEnabled(false);
        connectionFactory.setCopyMessageOnSend(true);
        dest = new ActiveMQQueue("TEST");
    }
View Full Code Here


        destination = createDestination(getClass().getName());
    }

    public ActiveMQConnectionFactory getConnectionFactory() throws Exception {
        String url = "reliable:" + ActiveMQConnection.DEFAULT_URL;
        return new ActiveMQConnectionFactory(url);
    }
View Full Code Here

    private Connection connection;
    private Latch latch = new Latch();

    public void testTransaction() throws Exception {

        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");

        factory.setUseEmbeddedBroker(true);
        connection = factory.createConnection();
        queue = new ActiveMQQueue(getClass().getName() + "." + getName());

        producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        consumerSession = connection.createSession(true, 0);
View Full Code Here

    protected Connection createSendConnection() throws JMSException {
        return sendFactory.createConnection();
    }

    protected ActiveMQConnectionFactory createConnectionFactory(String config, String brokerName, String connectUrl) throws JMSException {
        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(connectUrl);
        factory.setBrokerName(brokerName);
        factory.setUseEmbeddedBroker(true);
        factory.setBrokerContainerFactory(new SpringBrokerContainerFactory(new ClassPathResource(config)));
        return factory;
    }
View Full Code Here

        // configuration of container and all protocolls
        BrokerContainerImpl container = createBroker();

        // start a client
        ActiveMQConnectionFactory factory = new
                ActiveMQConnectionFactory("tcp://localhost:9100");
        factory.start();
        factory.createConnection();

        // stop activemq broker
        container.stop();

        // start activemq broker again
        container = createBroker();

        // start a client again
        factory = new
                ActiveMQConnectionFactory("tcp://localhost:9100");
        factory.start();
        factory.createConnection();

        // stop activemq broker
        container.stop();

    }
View Full Code Here

        }
    }

   
    protected ActiveMQConnectionFactory createReceiverConnectionFactory() throws JMSException {
        ActiveMQConnectionFactory fac =  new ActiveMQConnectionFactory(receiverBroker, "tcp://localhost:62002");
        fac.setUseEmbeddedBroker(false);
        return fac;
    }
View Full Code Here

        fac.setUseEmbeddedBroker(false);
        return fac;
    }

    protected ActiveMQConnectionFactory createSenderConnectionFactory() throws JMSException {
        ActiveMQConnectionFactory fac = new ActiveMQConnectionFactory(senderBroker, "tcp://localhost:62001");
        fac.setUseEmbeddedBroker(false);
        return fac;
    }
View Full Code Here

    protected Cluster _cluster0;
    protected Cluster _cluster1;

    protected void setUp() throws Exception {
        testResponsePassed = false;
        _connectionFactory = new ActiveMQConnectionFactory("multicast://224.1.2.3:5123");
        _clusterFactory = new DefaultClusterFactory(_connectionFactory);
        _cluster0 = _clusterFactory.createCluster("ORG.CODEHAUS.WADI.TEST.CLUSTER");
        _cluster1 = _clusterFactory.createCluster("ORG.CODEHAUS.WADI.TEST.CLUSTER");
        _cluster0.start();
        _log.info("started node0: " + _cluster0.getLocalNode().getDestination());
View Full Code Here

public class ActiveMQClusterFactory extends DefaultClusterFactory {
    public static String DEFAULT_CLUSTER_URL = "peer://org.codehaus.activecluster.development";

    public ActiveMQClusterFactory() {
        super(new ActiveMQConnectionFactory(DEFAULT_CLUSTER_URL));
    }
View Full Code Here

    public ActiveMQClusterFactory() {
        super(new ActiveMQConnectionFactory(DEFAULT_CLUSTER_URL));
    }

    public ActiveMQClusterFactory(String brokerURL) {
        super(new ActiveMQConnectionFactory(brokerURL));
    }
View Full Code Here

TOP

Related Classes of org.codehaus.activemq.ActiveMQConnectionFactory

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.