Package org.codehaus.activemq.broker

Examples of org.codehaus.activemq.broker.BrokerContainer.start()


        agent.setType(getClass().getName() + ".");
        container.setDiscoveryAgent(agent);
        String url = "tcp://localhost:0";
        container.addConnector(url);
        container.addNetworkConnector(new DiscoveryNetworkConnector(container));
        container.start();
        //embedded brokers are resolved by url - so make url unique
        //this confused me tests for a while :-)
        return new ActiveMQConnectionFactory(container,"vm://"+brokerName);
    }
View Full Code Here


                factory.setResource(new FileSystemResource(file));
            }


            BrokerContainer container = factory.createBrokerContainer("DefaultBroker", BrokerContext.getInstance());
            container.start();

            // lets wait until we're killed.
            Object lock = new Object();
            synchronized (lock) {
                lock.wait();
View Full Code Here

        Broker broker = container.getBroker();
        assertTrue("Should have a broker!", broker != null);

        assertEquals("Broker name not set!", brokerName, broker.getBrokerName());

        container.start();
        container.stop();
        return container;
    }
}
View Full Code Here

            if (args.length > 1) {
                container.addNetworkConnector(args[1]);
            }

            container.start();

            // lets wait until we're killed.
            Object lock = new Object();
            synchronized (lock) {
                lock.wait();
View Full Code Here

                factory.setResource(new FileSystemResource(file));
            }

            IdGenerator idgen = new IdGenerator();
            BrokerContainer container = factory.createBrokerContainer(idgen.generateId(), BrokerContext.getInstance());
            container.start();

            // lets wait until we're killed.
            Object lock = new Object();
            synchronized (lock) {
                lock.wait();
View Full Code Here

        Broker broker = container.getBroker();
        assertTrue("Should have a broker!", broker != null);

        assertEquals("Broker name not set!", brokerName, broker.getBrokerName());

        container.start();
        container.stop();
        return container;
    }
}
View Full Code Here

        Broker broker = container.getBroker();
        assertTrue("Should have a broker!", broker != null);

        assertEquals("Broker name not set!", brokerName, broker.getBrokerName());

        container.start();
        container.stop();
        return container;

    }
}
View Full Code Here

            System.out.println("Loading Message Broker from file: " + file);
            factory.setResource(new FileSystemResource(file));

            BrokerContainer container = factory.createBrokerContainer("DefaultBroker");
            container.start();

            // lets wait until we're killed.
            Object lock = new Object();
            synchronized (lock) {
                lock.wait();
View Full Code Here

            if (args.length > 1) {
                container.addNetworkConnector(args[1]);
            }

            container.start();

            // lets wait until we're killed.
            Object lock = new Object();
            synchronized (lock) {
                lock.wait();
View Full Code Here

        MulticastDiscoveryAgent agent = new MulticastDiscoveryAgent(getClass().getName());
        container.setDiscoveryAgent(agent);
        String url = "tcp://localhost:0";
        container.addConnector(url);
        container.addNetworkConnector(new DiscoveryNetworkConnector(container));
        container.start();
        //embedded brokers are resolved by url - so make url unique
        //this confused me tests for a while :-)
        return new ActiveMQConnectionFactory(container,"vm://"+brokerName);
    }
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.