Examples of waitUntilStarted()


Examples of com.graphaware.runtime.GraphAwareRuntime.waitUntilStarted()

        GenericApplicationContext parent = new GenericApplicationContext();
        parent.getBeanFactory().registerSingleton("database", database);

        GraphAwareRuntime runtime = RuntimeRegistry.getRuntime(database);
        if (runtime != null) {
            runtime.waitUntilStarted();
            parent.getBeanFactory().registerSingleton("databaseWriter", runtime.getDatabaseWriter());
        }

        parent.refresh();
View Full Code Here

Examples of jade.tools.ToolNotifier.waitUntilStarted()

          if (targetName.equals(myContainer.getAMS())) {
            // If we are debugging the AMS, let's wait for the ToolNotifier
            // to be ready to avoid deadlock problems. Note also that in
            // this case this code is executed by the ams-debug-helper thread and not
            // by the AMS thread
            tn.waitUntilStarted();
          }
          // Wait a bit to let the ToolNotifier pass in ACTIVE_STATE
          try {Thread.sleep(1000);} catch (Exception e) {};
          helper.registerMessageListener(tn);
          helper.registerAgentListener(tn);
View Full Code Here

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

            BrokerService brokerService = brokerServices.get(sBrokerName).getBrokerService();
            if (brokerService.isStarted()) {
                return;
            }
            brokerService.start(true);
            brokerService.waitUntilStarted();
            if (!brokerService.isStarted()) {
                throw new PortletException(getLocalizedString(actionRequest,
                        "jmsmanager.broker.failStartBrokerNoReason", sBrokerName));
            }
            addInfoMessage(actionRequest, getLocalizedString(actionRequest, "jmsmanager.broker.successStartBroker",
View Full Code Here

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

        BrokerService broker = createBroker(new URI("broker:(tcp://localhost:61616)/BrokerA?persistent=true&useJmx=false"));
        broker.setBrokerId("BrokerA");
        NetworkConnector aTOb = bridgeBrokers(brokers.get("BrokerA").broker, brokers.get("BrokerB").broker, false, 2, true, true);
        aTOb.addStaticallyIncludedDestination(queue);
        broker.start();
        broker.waitUntilStarted();
        waitForBridgeFormation();
    }

}
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()

    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()

        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()

                    @Override
                    public void run() {
                        try {
                            //Start before returning - this is known to be safe.
                            bs.start();
                            bs.waitUntilStarted();

                            //Force a checkpoint to initialize pools
                            bs.getPersistenceAdapter().checkpoint(true);
                        } catch (Throwable t) {
                            throwable = t;
View Full Code Here

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()

        TransportConnector tcp = broker.addConnector("tcp://localhost:0?transport.closeAsync=false");
        String group = "GR-" +  System.currentTimeMillis();
        URI discoveryUri = new URI("multicast://default?group=" + group);
        tcp.setDiscoveryUri(discoveryUri);
        broker.start();
        broker.waitUntilStarted();
       
        Vector<String> existingNames = new Vector<String>();
        Thread[] threads = getThreads();
        for (Thread t : threads) {
            existingNames.add(t.getName());
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.