Package org.activemq.broker

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


        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


                URIHelper helper = new URIHelper(brokerConnectorURI);
                brokerConnector = new BrokerConnectorImpl(container, helper.getNext(), wireFormat);
                while (helper.hasNext()) {
                    new BrokerConnectorImpl(container, helper.getNext(), wireFormat);
                }
                container.start();
            }
            return brokerConnector;
        }
        catch (Exception e) {
            e.printStackTrace();
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

        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

        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

                URIHelper helper = new URIHelper(brokerConnectorURI);
                brokerConnector = new BrokerConnectorImpl(container, helper.getNext(), wireFormat);
                while (helper.hasNext()) {
                    new BrokerConnectorImpl(container, helper.getNext(), wireFormat);
                }
                container.start();
            }
            return brokerConnector;
        }
        catch (Exception e) {
            e.printStackTrace();
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

            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

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.