Examples of waitUntilStopped()


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

        producer.send(message);
        Message msg = consumer.receive(2000);
        assertNotNull(msg);

        bs1.stop();
        bs1.waitUntilStopped();

        bs2 = createBroker("bs2", secondTcpUri);
        bs2.start();

        // add the transport uri for broker number 2
View Full Code Here

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

        TimeUnit.SECONDS.sleep(4);

        LOG.info("stopping brokerService 1");
        bs1.stop();
        bs1.waitUntilStopped();

        producer.send(message);
        msg = consumer.receive(4000);
        assertNotNull(msg);
    }
View Full Code Here

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

        broker.start();
        broker.waitUntilStarted();
        Thread.sleep(2000);
        //System.in.read();
        broker.stop();
        broker.waitUntilStopped();
    }
   
}
View Full Code Here

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

        assertTrue("Threads are leaking: " + ThreadExplorer.show("active sleep") + ", threadCount=" +threadCountAfterStart + " threadCountAfterSleep=" + threadCountAfterSleep,
                threadCountAfterSleep < threadCountAfterStart + 8);

        connection.close();
        broker.stop();
        broker.waitUntilStopped();

        // testNoDanglingThreadsAfterStop with tcp transport

        broker = new BrokerService();
        broker.setSchedulerSupport(true);
View Full Code Here

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

        cf = new ActiveMQConnectionFactory("tcp://localhost:61616?wireFormat.maxInactivityDuration=1000&wireFormat.maxInactivityDurationInitalDelay=1000");
        connection = cf.createConnection("system", "manager");
        connection.start();
        connection.close();
        broker.stop();
        broker.waitUntilStopped();

        // must only be called when all brokers and connections are done!
        DefaultThreadPools.shutdown();

        // let it settle
View Full Code Here

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

       
        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());
        master.stop();
View Full Code Here

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

    producer.send(message);
                Message msg = consumer.receive(2000);
                assertNotNull(msg);
   
    bs1.stop();
                bs1.waitUntilStopped();

    BrokerService bs2 = new BrokerService();
    bs2.setUseJmx(false);
    bs2.addConnector(secondTcpUri);
    bs2.start();
View Full Code Here

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

            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

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

        assertEquals("TTT_", jpa.getStatements().getTablePrefix());
        assertEquals("AMQ_MSGS2", jpa.getStatements().getMessageTableName());
        assertEquals("AMQ_LOCK2", jpa.getStatements().getLockTableName());

        broker.stop();
        broker.waitUntilStopped();
    }

}
View Full Code Here

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

        LevelDBStore store = new LevelDBStore();
        store.setDirectory(new File("target/activemq-data/haleveldb"));
        bs.setPersistenceAdapter(store);
        bs.deleteAllMessages();
        bs.start();
        bs.waitUntilStopped();
    }
}
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.