Package org.apache.activemq.broker

Examples of org.apache.activemq.broker.StubConnection.stop()


        assertNotNull(m1.getDataStructure());
        assertEquals(((ConsumerInfo)m1.getDataStructure()).getConsumerId(), consumerInfo2.getConsumerId());

        // Close the second connection.
        connection2.send(closeConnectionInfo(connectionInfo2));
        connection2.stop();

        // We should get an advisory of the consumer closing
        m1 = receiveMessage(connection1);
        assertNotNull(m1);
        assertNotNull(m1.getDataStructure());
View Full Code Here


        assertNotNull(m1.getDataStructure());
        assertEquals(((ConsumerInfo)m1.getDataStructure()).getConsumerId(), consumerInfo2.getConsumerId());

        // Close the second connection.
        connection2.send(closeConnectionInfo(connectionInfo2));
        connection2.stop();

        // We should get an advisory of the consumer closing
        m1 = receiveMessage(connection1);
        assertNotNull(m1);
        assertNotNull(m1.getDataStructure());
View Full Code Here

        assertNotNull(m1.getDataStructure());
        assertEquals(((ProducerInfo)m1.getDataStructure()).getProducerId(), producerInfo2.getProducerId());

        // Close the second connection.
        connection2.send(closeConnectionInfo(connectionInfo2));
        connection2.stop();

        // We should get an advisory of the producer closing
        m1 = receiveMessage(connection1);
        assertNotNull(m1);
        assertNotNull(m1.getDataStructure());
View Full Code Here

        assertNotNull(m1.getDataStructure());
        assertEquals(((ProducerInfo)m1.getDataStructure()).getProducerId(), producerInfo2.getProducerId());

        // Close the second connection.
        connection2.send(closeConnectionInfo(connectionInfo2));
        connection2.stop();

        // We should get an advisory of the producer closing
        m1 = receiveMessage(connection1);
        assertNotNull(m1);
        assertNotNull(m1.getDataStructure());
View Full Code Here

        assertNotNull(m);
        assertNoMessagesLeft(connection);
       
        // Make sure the broker is shutdown when the connection is stopped.
        assertNotNull(BrokerRegistry.getInstance().lookup("localhost"));       
        connection.stop();
        assertNull(BrokerRegistry.getInstance().lookup("localhost"));       
    }

    protected void setUp() throws Exception {
        // Don't call super since it manually starts up a broker.
View Full Code Here

    }
   
    protected void tearDown() throws Exception {
        for (Iterator iter = connections.iterator(); iter.hasNext();) {
            StubConnection connection = (StubConnection) iter.next();
            connection.stop();
            iter.remove();
        }
       
        BrokerRegistry.getInstance().unbind("remotehost");
        remoteConnector.stop();
View Full Code Here

    protected abstract String getBindLocation();

    protected void tearDown() throws Exception {
        for (Iterator iter = connections.iterator(); iter.hasNext();) {
            StubConnection connection = (StubConnection) iter.next();
            connection.stop();
            iter.remove();
        }
        connector.stop();
        super.tearDown();
    }
View Full Code Here

    }
   
    protected void tearDown() throws Exception {
        for (Iterator iter = connections.iterator(); iter.hasNext();) {
            StubConnection connection = (StubConnection) iter.next();
            connection.stop();
            iter.remove();
        }
        remoteBroker.stop();
        super.tearDown();
    }
View Full Code Here

        // Close the consumer on the remote broker
        connection2.send(consumerInfo3.createRemoveCommand());

        connection1.stop();
        connection2.stop();
        connection3.stop();
    }

    protected BrokerService createBroker() throws Exception {
        localBroker = new BrokerService();
        localBroker.setBrokerName("localhost");
View Full Code Here

    @Override
    protected void tearDown() throws Exception {
        for (Iterator<StubConnection> iter = connections.iterator(); iter.hasNext();) {
            StubConnection connection = iter.next();
            connection.stop();
            iter.remove();
        }

        BrokerRegistry.getInstance().unbind("remotehost");
        remoteConnector.stop();
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.