Package org.codehaus.activemq

Examples of org.codehaus.activemq.ActiveMQConnectionFactory


        remoteBroker = new BrokerContainerImpl("remoteBroker");
        remoteBroker.addConnector(ActiveMQConnection.DEFAULT_URL);
        remoteBroker.start();
       
        ActiveMQConnectionFactory fac = new ActiveMQConnectionFactory("remote://" + URL + "?brokerName=receiver");
        consumerConnection = fac.createConnection();
        consumerConnection.setClientID(new IdGenerator().generateId());
        consumerConnection.start();
       
        fac = new ActiveMQConnectionFactory("remote://" + URL + "?brokerName=sender");
        producerConnection = fac.createConnection();
        producerConnection.start();
       
       
       
    }
View Full Code Here


* @version $Revision: 1.1 $
*/
public class ActiveIOTopicSendReceiveTest extends JmsTopicSendReceiveTest {

    protected ActiveMQConnectionFactory createConnectionFactory() {
        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory();
        factory.setBrokerURL("activeio:socket://localhost:61626");
        factory.setUseEmbeddedBroker(true);
        return factory;

    }
View Full Code Here

        transport.getAsynchChannel().dispose();
    }


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

   
    /**
     * @see junit.framework.TestCase#setUp()
     */
    protected void setUp() throws Exception {
        factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
        this.target = new ActiveMQQueue(getClass().getName());
    }
View Full Code Here

  /**
   * @see org.codehaus.activemq.test.JmsResourceProvider#createConnectionFactory()
   */
  public ConnectionFactory createConnectionFactory() throws JMSException {
    return new ActiveMQConnectionFactory(serverUri);
  }
View Full Code Here

     *
     * @return Instance of ActiveMQConnectionFactory object.
     */
    protected ActiveMQConnectionFactory createFactory() {

        ActiveMQConnectionFactory answer = new ActiveMQConnectionFactory(getURL());

        if (embeddedBroker) {
            answer.setUseEmbeddedBroker(true);
        }

        return answer;
    }
View Full Code Here

        assertTrue("No topic created!", topic != null);
    }

    public void testTryToReproduceNullPointerBug() throws Exception {
        String url = bindAddress;
        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(url);
        QueueConnection queueConnection = factory.createQueueConnection();
        this.connection = queueConnection;
        QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
        QueueSender sender = session.createSender(null); //Unidentified
        Queue receiverQueue = session.createTemporaryQueue();
        QueueReceiver receiver = session.createReceiver(receiverQueue);
View Full Code Here

    private SynchronizedBoolean started;
   
   
    protected void setUp() throws Exception{
        started = new SynchronizedBoolean(false);
        ActiveMQConnectionFactory fac = new ActiveMQConnectionFactory("vm://localhost");
        connection = fac.createConnection();
        session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
        destination = session.createTopic(destinationName);
        connection.start();
    }
View Full Code Here

        }
        assertTrue("Unexpected count: " + count, count.get() == NUMBER);
    }

    protected QueueConnection createConnection() throws Exception {
        ActiveMQConnectionFactory factory = createConnectionFactory();
        return factory.createQueueConnection();
    }
View Full Code Here

        ActiveMQConnectionFactory factory = createConnectionFactory();
        return factory.createQueueConnection();
    }

    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
        return new ActiveMQConnectionFactory(bindAddress);
    }
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.