Package org.activemq.broker.impl

Examples of org.activemq.broker.impl.BrokerContainerImpl


     * @throws JMSException
     */
    public BrokerConnector getEmbeddedBrokerConnector() throws JMSException {
        try {
            if (brokerConnector == null) {
                BrokerContainer container = new BrokerContainerImpl(brokerName, serviceName);
                NetworkConnector networkConnector = null;
                if (doDiscovery) {
                    networkConnector = new DiscoveryNetworkConnector(container);
                    MulticastDiscoveryAgent agent = new MulticastDiscoveryAgent(serviceName);
                    container.setDiscoveryAgent(agent);
                }
                if (peerURIs != null && peerURIs.length() > 0) {
                    URIHelper peers = new URIHelper(peerURIs);
                    networkConnector = createNetworkConnector(container);
                    while (peers.hasNext()) {
                        String peerURL  = peers.getNext();
                        networkConnector.addNetworkChannel(peerURL);
                    }
                }
                container.addNetworkConnector(networkConnector);
                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


   
    public static final String URL = ActiveMQConnection.DEFAULT_BROKER_URL;
    protected BrokerContainer container;

    protected void setUp() throws Exception {
        container = new BrokerContainerImpl(URL);
        container.start();
        super.setUp();
    }
View Full Code Here

        container.stop();
    }

    protected void setUp() throws Exception {
        container = new BrokerContainerImpl(URL);
        BrokerConnector brokerConnector = new BrokerConnectorImpl(container, URL, new DefaultWireFormat());
        container.start();

        super.setUp();
    }
View Full Code Here

        JournalTestHelper helper = new JournalTestHelper();
        PersistenceAdapter adapter = helper.createPersistenceAdapter(JournalPersistenceAdapter.DEFAULT_JOURNAL_TYPE);       
        SimpleCachePersistenceAdapter cacheAdapter = new SimpleCachePersistenceAdapter(adapter);
        cacheAdapter.setCacheSize(MESSAGE_COUNT);
       
        broker = new BrokerContainerImpl("localhost");
        broker.setPersistenceAdapter(cacheAdapter);
        broker.start();
        connectionFactory = new ActiveMQConnectionFactory(broker, "vm://localhost");
        connectionFactory.setTurboBoost(true);
        connectionFactory.setCachingEnabled(false);
View Full Code Here

    protected BrokerContainerImpl container;

    protected void setUp() throws Exception {
        // lets create a broker with multicast discovery
        container = new BrokerContainerImpl("cheese");
        container.addConnector("tcp://localhost:0");
        container.setDiscoveryAgent(new MulticastDiscoveryAgent(new URI("multicast://228.8.9.10:2677")));
        container.start();

        super.setUp();
View Full Code Here

        // TODO temporarily disable until I figure out why this fails
    }

    protected void setUp() throws Exception {
        // lets create a broker with multicast discovery
        container = new BrokerContainerImpl("cheese");
        container.addConnector("tcp://localhost:0");
        container.setDiscoveryAgent(new MulticastDiscoveryAgent(new URI("multicast://228.8.9.10:2677")));
        container.start();

        log.info("The broker is now completely started - now creating the sender and receiver");
View Full Code Here

   
    protected void setUp() throws Exception{
        String URL = "reliable://" + ActiveMQConnection.DEFAULT_BROKER_URL;
      

        remoteBroker = new BrokerContainerImpl("remoteBroker");
        remoteBroker.addConnector(ActiveMQConnection.DEFAULT_BROKER_URL);
        remoteBroker.start();
       
        ActiveMQConnectionFactory fac = new ActiveMQConnectionFactory("remote://" + URL + "?brokerName=receiver");
        consumerConnection = fac.createConnection();
View Full Code Here

TOP

Related Classes of org.activemq.broker.impl.BrokerContainerImpl

Copyright © 2018 www.massapicom. 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.