Examples of waitUntilStarted()


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

    protected void startAllBrokers() throws Exception {
        Collection<BrokerItem> brokerList = brokers.values();
        for (Iterator<BrokerItem> i = brokerList.iterator(); i.hasNext();) {
            BrokerService broker = i.next().broker;
            broker.start();
            broker.waitUntilStarted();
        }

        Thread.sleep(maxSetupTime);
    }
View Full Code Here

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

        // connection filter is bypassed when scheme is different
        final NetworkConnector networkConnector = brokerServce.addNetworkConnector("static:(tcp://"
                + transportConnector.getConnectUri().getHost() + ":" +  transportConnector.getConnectUri().getPort() + ")");

        brokerServce.start();
        brokerServce.waitUntilStarted();

        try {
            Wait.waitFor(new Wait.Condition() {
                @Override
                public boolean isSatisified() throws Exception {
View Full Code Here

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

        policyMap.setDefaultEntry(defaultPolicy);
        broker.setDestinationPolicy(policyMap);
        broker.setDeleteAllMessagesOnStartup(deleteAllMessages);
        broker.addConnector("tcp://localhost:0");
        broker.start();
        broker.waitUntilStarted();
        return broker;
    }


View Full Code Here

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

    public void testCloseSendConnection() throws Exception {
        String brokerName = "closeSend";
        BrokerService broker = BrokerFactory.createBroker(new URI("broker:(tcp://localhost:0)/" + brokerName));
        broker.start();
        broker.waitUntilStarted();
        ActiveMQXAConnectionFactory cf = new ActiveMQXAConnectionFactory(broker.getTransportConnectors().get(0).getConnectUri());
        XAConnection connection = (XAConnection)cf.createConnection();
        connection.start();
        XASession session = connection.createXASession();
        XAResource resource = session.getXAResource();
View Full Code Here

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

        new Thread("Starting broker node: "+b.getBrokerName()){
            @Override
            public void run() {
                try {
                    broker.start();
                    broker.waitUntilStarted();
                    masterQueue.put(broker);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
View Full Code Here

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

                                .getChildLogger("service")
                                .info("Starting ActiveMQ BrokerService");
                            bs.start();
                        }

                        bs.waitUntilStarted();

                        //Force a checkpoint to initialize pools
                        Logger
                            .getInstance(LogCategory.OPENEJB_STARTUP, ActiveMQ5Factory.class)
                            .getChildLogger("service")
View Full Code Here

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

    policyMap.setDefaultEntry(defaultEntry);

    broker.setDestinationPolicy(policyMap);
    broker.start();
    broker.waitUntilStarted();
    return broker;
  }

}
View Full Code Here

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

    protected BrokerService createBroker() throws Exception {
        BrokerService answer = new BrokerService();
        configureBroker(answer);
        answer.start();
        answer.waitUntilStarted();
        bindAddress = answer.getTransportConnectors().get(0).getConnectUri().toString();
        return answer;
    }

    protected void configureBroker(BrokerService answer) throws Exception {
View Full Code Here

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

        broker.setPersistent(false);
        broker.setUseJmx(false);
        broker.addConnector("tcp://localhost:0");
       
        broker.start();
        broker.waitUntilStarted();
        return broker;
  }

  protected void tearDown() throws Exception {
    broker.stop();
View Full Code Here

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

        broker.setPersistent(false);
        broker.setUseJmx(false);
        TransportConnector connector = broker.addConnector(connectorString);
        connector.setName(connectorName);
        broker.start();
        broker.waitUntilStarted();
        return broker;
    }

    public void stopBroker(BrokerService broker) throws Exception {
        if (broker != null) {
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.