Package org.apache.activemq.broker

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


        // Close the consumer on the remote broker
        connection2.send(consumerInfo3.createRemoveCommand());
       
        connection1.stop();
        connection2.stop();
    }
   
    protected BrokerService createBroker() throws Exception {
        localBroker = new BrokerService();
        localBroker.setBrokerName("localhost");
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

        assertNotNull(m1.getDataStructure());
        assertEquals(((ConnectionInfo)m1.getDataStructure()).getConnectionId(), connectionInfo2.getConnectionId());

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

        // We should get an advisory of the second connection 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.request(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.request(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.request(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.request(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

       
        // Close the consumer on the remote broker
        connection2.send(consumerInfo3.createRemoveCommand());
       
        connection1.stop();
        connection2.stop();
    }
   
    protected BrokerService createBroker() throws Exception {
        localBroker = new BrokerService();
        localBroker.setBrokerName("localhost");
View Full Code Here

       
        // Close the consumer on the remote broker
        connection2.send(consumerInfo3.createRemoveCommand());
       
        connection1.stop();
        connection2.stop();
    }
   
    protected BrokerService createBroker() throws Exception {
        localBroker = new BrokerService();
        localBroker.setBrokerName("localhost");
View Full Code Here

        assertNotNull(m1.getDataStructure());
        assertEquals(((ConnectionInfo)m1.getDataStructure()).getConnectionId(), connectionInfo2.getConnectionId());

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

        // We should get an advisory of the second connection closing
        m1 = receiveMessage(connection1);
        assertNotNull(m1);
        assertNotNull(m1.getDataStructure());
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.