Package org.apache.activemq.broker

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


            currentMaster.waitUntilStarted();

            doTestNetworkSendReceive(brokerB, currentMaster);

            LOG.info("Stopping " + currentMaster.getBrokerObjectName().getKeyProperty("BrokerName"));
            currentMaster.stop();
            currentMaster.waitUntilStopped();
        }

        done.set(true);
        LOG.info("all done");
View Full Code Here


                       
            LOG.info("Success");

        } finally {
            if (broker != null) {
                broker.stop();
            }
        }
    }

View Full Code Here

        return brokers.get(name);
    }
   
    protected void stopBroker(String name) throws Exception {
        BrokerService broker = brokers.remove(name);
        broker.stop();
        broker.waitUntilStopped();
    }

    protected BrokerService removeBroker(String name) {
        return brokers.remove(name);
View Full Code Here

        assertTransactionGoneFromConnection(brokerName, xaConnection.getClientID(), xaConnection.getConnectionInfo().getConnectionId(), tid);
        assertSessionGone(xaConnection, session);
        assertTransactionGoneFromFailoverState(xaConnection, tid);
       
        xaConnection.close();
        broker.stop();
       
    }

    public void testCloseSendConnection() throws Exception {
        String brokerName = "closeSend";
View Full Code Here

        assertXAConnection(connection);

        assertNotNull(connection);
        connection.close();

        broker.stop();
    }

    private void assertXAConnection(Connection connection) {
        assertTrue("Should be an XAConnection", connection instanceof XAConnection);
        assertTrue("Should be an XATopicConnection", connection instanceof XATopicConnection);
View Full Code Here

                    LOG.info("not validating connection to: " + UriToConnectTo);
                }
            }
        } finally {
            if (broker != null) {
                broker.stop();
                broker = null;
            }
        }
    }
View Full Code Here

            networkedBroker = createNetworkedBroker();
            networkedBroker.start();
            assertEquals(1, countMbeans(networkedBroker, "NetworkBridge", 2000));
            assertEquals(1, countMbeans(broker, "NetworkBridge", 2000));
            assertEquals(1, countMbeans(broker, "Connection"));
            networkedBroker.stop();
            networkedBroker.waitUntilStopped();
            assertEquals(0, countMbeans(networkedBroker, "stopped"));
            assertEquals(0, countMbeans(broker, "NetworkBridge"));
        }
       
View Full Code Here

        super.tearDown();
       
      slaveStarted.await(5, TimeUnit.SECONDS);
        BrokerService brokerService = slave.get();
        if( brokerService!=null ) {
          brokerService.stop();
        }
        master.stop();
    }

    protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
View Full Code Here

            broker = createBroker();
            broker.start();
            assertEquals(1, countMbeans(networkedBroker, "NetworkBridge", 5000));
            assertEquals("restart number: " + i, 1, countMbeans(broker, "Connection", 10000));
           
            broker.stop();
            broker.waitUntilStopped();
            assertEquals(0, countMbeans(broker, "stopped"));
        }
       
        //assertEquals(0, countMbeans(networkedBroker, "NetworkBridge"));
View Full Code Here

        slave.waitUntilStarted();
       
        master.waitUntilStarted();
       
        LOG.info("killing slave..");
        slave.stop();
        slave.waitUntilStopped();

        LOG.info("checking master still alive");
        assertTrue("master is still alive", master.isStarted());
        assertFalse("plugin was not yet stopped", pluginStopped.get());
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.