Package org.codehaus.activemq.spring

Examples of org.codehaus.activemq.spring.SpringBrokerContainerFactory


    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


    public void test1() throws Exception {
        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("zeroconf:_activemq.broker.development.");

        // use an embedded broker configured via Spring
        connectionFactory.setUseEmbeddedBroker(true);
        connectionFactory.setBrokerContainerFactory(new SpringBrokerContainerFactory(new ClassPathResource("org/codehaus/activemq/usecases/receiver-zeroconf.xml")));

        Connection connection = connectionFactory.createConnection();
        connection.setClientID("Producer1");
        connection.start();
View Full Code Here

        BrokerContainerFactory factory = XmlConfigHelper.createBrokerContainerFactory(resource);
        return createBroker(factory);
    }

    protected BrokerContainer createBroker(Resource resource) throws JMSException {
        SpringBrokerContainerFactory factory = new SpringBrokerContainerFactory();
        factory.setResource(resource);
        return createBroker(factory);

    }
View Full Code Here

        BrokerContainerFactory factory = XmlConfigHelper.createBrokerContainerFactory(resource);
        return createBroker(factory);
    }

    protected BrokerContainer createBroker(Resource resource) throws JMSException {
        SpringBrokerContainerFactory factory = new SpringBrokerContainerFactory();
        factory.setResource(resource);
        return createBroker(factory);

    }
View Full Code Here

    }


    protected BrokerContainer createBroker(Resource resource) throws JMSException {
        String brokerName = getName();
        SpringBrokerContainerFactory factory = new SpringBrokerContainerFactory();
        factory.setResource(resource);
        BrokerContainer container = factory.createBrokerContainer(brokerName);

        assertTrue("Should have a broker container!", container != null);

        Broker broker = container.getBroker();
        assertTrue("Should have a broker!", broker != null);
View Full Code Here

    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

    public void test1() throws Exception {
        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("zeroconf:_activemq.broker.development.");

        // use an embedded broker configured via Spring
        connectionFactory.setUseEmbeddedBroker(true);
        connectionFactory.setBrokerContainerFactory(new SpringBrokerContainerFactory(new ClassPathResource("org/codehaus/activemq/usecases/receiver-zeroconf.xml")));

        Connection connection = connectionFactory.createConnection();
        connection.setClientID("Producer1");
        connection.start();
View Full Code Here

        BrokerContainerFactory factory = XmlConfigHelper.createBrokerContainerFactory(resource);
        return createBroker(factory);
    }

    protected BrokerContainer createBroker(Resource resource) throws JMSException {
        SpringBrokerContainerFactory factory = new SpringBrokerContainerFactory();
        factory.setResource(resource);
        return createBroker(factory);

    }
View Full Code Here

TOP

Related Classes of org.codehaus.activemq.spring.SpringBrokerContainerFactory

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.