Package org.codehaus.activemq

Examples of org.codehaus.activemq.ActiveMQConnectionFactory


        }
    }

   
    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

/**
* @version $Revision: 1.1 $
*/
public class HttpJmsSendAndReceiveTest extends JmsTopicSendReceiveWithTwoConnectionsTest {
    protected ActiveMQConnectionFactory createConnectionFactory() {
        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("http://localhost:8161");
        connectionFactory.setUseEmbeddedBroker(true);
        return connectionFactory;
    }
View Full Code Here

        addResource(session);
        return session;
    }

    protected ActiveMQConnectionFactory createFactory() {
        ActiveMQConnectionFactory answer = new ActiveMQConnectionFactory(getUrl());
        if (embeddedBroker) {
            answer.setUseEmbeddedBroker(true);
        }
        return answer;
    }
View Full Code Here

public class InitialContextTest extends TestCase {
    public void testInitialContext() throws Exception {
        InitialContext context = new InitialContext();
        assertTrue("Created context", context != null);

        ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory) context.lookup("ConnectionFactory");

        assertTrue("Should have created a ConnectionFactory", connectionFactory != null);

        System.out.println("Created with brokerURL: " + connectionFactory.getBrokerURL());

    }
View Full Code Here

        properties.put("brokerURL", expected);

        InitialContext context = new InitialContext(properties);
        assertTrue("Created context", context != null);

        ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory) context.lookup("ConnectionFactory");

        assertTrue("Should have created a ConnectionFactory", connectionFactory != null);

        assertEquals("the brokerURL should match", expected, connectionFactory.getBrokerURL());
    }
View Full Code Here

        socket.close();
    }


    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory();
        factory.setUseEmbeddedBroker(true);
        factory.setBrokerURL("tcp://localhost:62345");
        return factory;
    }
View Full Code Here

        super.setUp();
    }

    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
        return new ActiveMQConnectionFactory();
    }
View Full Code Here

* @version $Revision: 1.2 $
*/
public class MulticastQueueSendReceiveTest extends JmsTopicSendReceiveWithTwoConnectionsTest {

    protected ActiveMQConnectionFactory createConnectionFactory() {
        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory();
        factory.setBrokerURL("multicast://224.1.2.3:2123");
        return factory;

    }
View Full Code Here

    private String topicPrefix = "topic.";

    public Context getInitialContext(Hashtable environment) throws NamingException {
        // lets create a factory
        Map data = new ConcurrentHashMap();
        ActiveMQConnectionFactory factory = createConnectionFactory(environment);
        data.put("ConnectionFactory", factory);
        data.put("QueueConnectionFactory", factory);
        data.put("TopicConnectionFactory", factory);

        createQueues(data, environment);
        createTopics(data, environment);

        try {
            Broker broker = factory.getEmbeddedBroker();
            if (broker != null) {
                data.put("destinations", broker.getDestinationContext(environment));
            }
        }
        catch (JMSException e) {
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.