Examples of waitUntilStarted()


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

        policyMap.setDefaultEntry(defaultPolicy);
        broker.setDestinationPolicy(policyMap);
        broker.setDeleteAllMessagesOnStartup(deleteAllMessages);
        broker.addConnector("tcp://localhost:61616");
        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();
        return answer;
    }
   
    protected void configureBroker(BrokerService answer) throws Exception {
        PolicyEntry policy = new PolicyEntry();
View Full Code Here

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

                    e.printStackTrace();
                }
            }
        });
        slave.start();
        slave.waitUntilStarted();
       
        master.waitUntilStarted();
       
        LOG.info("killing slave..");
        slave.stop();
View Full Code Here

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

    public void testBridgeRegistration() throws Exception {
        BrokerService broker = new BrokerService();
        broker.setBrokerName(BROKER_NAME);
        broker.setUseJmx(true); // explicitly set this so no funny issues
        broker.start();
        broker.waitUntilStarted();

        // now create network connector over JMX
        ObjectName brokerObjectName = new ObjectName("org.apache.activemq:type=Broker,brokerName=" + BROKER_NAME);
        BrokerViewMBean proxy = (BrokerViewMBean) broker.getManagementContext().newProxyInstance(brokerObjectName,
                BrokerViewMBean.class, true);
View Full Code Here

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

            brokerContext.setConfigurationUrl(resource.getURL().toExternalForm());
            brokerContext.setApplicationContext(ctx);
            broker.setBrokerContext(brokerContext);

            broker.start();
            broker.waitUntilStarted();
            brokers.put(pid, broker);


        } catch (Exception e) {
            throw new ConfigurationException(null, "Cannot start the broker", e);
View Full Code Here

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

public class JDBCLockTablePrefixTest extends TestCase {

    public void testLockTable() throws Exception {
        BrokerService broker = BrokerFactory.createBroker("xbean:org/apache/activemq/store/jdbc/JDBCLockTablePrefix.xml");
        broker.waitUntilStarted();

        PersistenceAdapter pa = broker.getPersistenceAdapter();
        assertNotNull(pa);

        JDBCPersistenceAdapter jpa = (JDBCPersistenceAdapter) pa;
View Full Code Here

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

        PolicyMap pMap = new PolicyMap();
        pMap.setDefaultEntry(policy);
        broker.setDestinationPolicy(pMap);

        broker.start();
        broker.waitUntilStarted();

        return broker;
    }

    /**
 
View Full Code Here

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

        }

        this.localDataSource = localDataSource;

        broker.start();
        broker.waitUntilStarted();

        return broker;
    }

    /**
 
View Full Code Here

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

    public void testRollbackXaErrorCode() throws Exception {
        String brokerName = "rollbackErrorCode";
        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
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.