Package org.apache.activemq.broker

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


                }
            }
        } finally {
            if (broker != null) {
                broker.stop();
                broker.waitUntilStopped();
                broker = null;
            }
        }
    }
View Full Code Here


    public void testCustomLocker() throws Exception {
        BrokerService broker = BrokerFactory.createBroker("xbean:org/apache/activemq/store/kahadb/shared.xml");
        broker.waitUntilStarted();
        broker.stop();
        broker.waitUntilStopped();
    }
}
View Full Code Here

            return;
        }
        try {
            LOG.info("Stopping broker " + pid);
            broker.stop();
            broker.waitUntilStopped();
        } catch (Exception e) {
            LOG.error("Exception on stopping broker", e);
        }
    }
View Full Code Here

        consumers = getAttribute(mbsc, "Queue", "Destination=" + QUEUE_NAME, "ConsumerCount");
        LOG.info("Consumers for " + QUEUE_NAME + " on " + BROKER_NAME + " : " + consumers);
        assertEquals(0L, ((Long)consumers).longValue());      
       
        networkedBroker.stop();
        networkedBroker.waitUntilStopped();
        broker.stop();
        broker.waitUntilStopped();
    }

    protected ConnectionFactory createConnectionFactory(final BrokerService broker) throws Exception {
View Full Code Here

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

            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"));
        assertEquals(1, countMbeans(networkedBroker, "Connector"));
View Full Code Here

       
        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

       
        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

                return result;
            }     
        }));
       
        networkedBroker.stop();
        networkedBroker.waitUntilStopped();
        broker.stop();
        broker.waitUntilStopped();
    }

    protected ConnectionFactory createConnectionFactory(final BrokerService broker) throws Exception {
View Full Code Here

            networkedBroker = createNetworkedBroker();
            networkedBroker.start();
            assertEquals(1, countMbeans(networkedBroker, "NetworkBridge", 2000));
            assertEquals(1, countMbeans(broker, "Connection"));
            networkedBroker.stop();
            networkedBroker.waitUntilStopped();
            assertEquals(0, countMbeans(networkedBroker, "stopped"));
        }
       
        assertEquals(0, countMbeans(networkedBroker, "NetworkBridge"));
        assertEquals(0, countMbeans(networkedBroker, "Connector"));
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.