Examples of BrokerService


Examples of org.apache.activemq.broker.BrokerService

    private BrokerService broker;
    private static final String DESTINATION = "activemq.topic";

    @BeforeClass
    private void setup() throws Exception {
        broker = new BrokerService();
        broker.setDataDirectory("target/activemq");
        broker.addConnector(BROKER_URL);
        broker.setBrokerName("localhost");
        broker.setSchedulerSupport(true);
        broker.start();
View Full Code Here

Examples of org.apache.activemq.broker.BrokerService

                            "-" + Arg.WF_ENGINE_URL.getOptionName(),
                            "http://localhost:11000/oozie/",
                            "-" + Arg.LOG_DIR.getOptionName(), "target/log",
                            "-" + Arg.USER_SUBFLOW_ID.getOptionName(), "userflow@wf-id" + "test",
                            "-" + Arg.USER_WORKFLOW_ENGINE.getOptionName(), "oozie", };
        broker = new BrokerService();
        broker.addConnector(BROKER_URL);
        broker.setDataDirectory("target/activemq");
        broker.setBrokerName("localhost");
        broker.start();
    }
View Full Code Here

Examples of org.apache.activemq.broker.BrokerService

        invoke(nodeManager, "init", Configuration.class, yarnConf);
        startService(nodeManager, "start");
    }

    private void startBroker() throws Exception {
        broker = new BrokerService();
        broker.setUseJmx(false);
        broker.setDataDirectory("target/data");
        broker.addConnector("vm://localhost");
        broker.addConnector("tcp://0.0.0.0:61616");
        broker.start();
View Full Code Here

Examples of org.apache.activemq.broker.BrokerService

    private volatile AssertionError error;

    @BeforeClass
    public void setup() throws Exception {
        broker = new BrokerService();
        broker.addConnector(BROKER_URL);
        broker.setDataDirectory("target/activemq");
        broker.setBrokerName("localhost");
        broker.start();
    }
View Full Code Here

Examples of org.apache.activemq.broker.BrokerService

                            "-" + ARG.topicName.getArgName(), (TOPIC_NAME),
                            "-" + ARG.status.getArgName(), ("SUCCEEDED"),
                            "-" + ARG.brokerTTL.getArgName(), "10",
                            "-" + ARG.cluster.getArgName(), "corp", };

        broker = new BrokerService();
        broker.addConnector(BROKER_URL);
        broker.setDataDirectory("target/activemq");
        broker.start();
    }
View Full Code Here

Examples of org.apache.activemq.broker.BrokerService

                            "-" + ARG.logFile.getArgName(), ("/logFile"),
                            "-" + ARG.topicName.getArgName(), (TOPIC_NAME),
                            "-" + ARG.status.getArgName(), ("SUCCEEDED"),
                            "-" + ARG.brokerTTL.getArgName(), "10",
                            "-" + ARG.cluster.getArgName(), "corp", };
        broker = new BrokerService();
        broker.addConnector(BROKER_URL);
        broker.setDataDirectory("target/activemq");
        broker.setBrokerName("localhost");
        broker.setSchedulerSupport(true);
        broker.start();
View Full Code Here

Examples of org.apache.activemq.broker.BrokerService

   
    protected void setUp() throws Exception {
        exceptionToThrow = null;
        exceptionShouldRollback = false;
       
        broker = new BrokerService();
        broker.setPersistent(false);
        broker.addConnector("tcp://localhost:61616");
        broker.start();
       
        txManager = (TransactionManager) new GeronimoPlatformTransactionManager();
View Full Code Here

Examples of org.apache.activemq.broker.BrokerService

            host = "localhost";
        }
        VMTransportServer server = SERVERS.get(host);
        // validate the broker is still active
        if (!validateBroker(host) || server == null) {
            BrokerService broker = null;
            // Synchronize on the registry so that multiple concurrent threads
            // doing this do not think that the broker has not been created and
            // cause multiple
            // brokers to be started.
            synchronized (BrokerRegistry.getInstance().getRegistryMutext()) {
                broker = BrokerRegistry.getInstance().lookup(host);
                if (broker == null) {
                    if (!create) {
                        throw new IOException("Broker named '" + host + "' does not exist.");
                    }
                    try {
                        if (brokerFactoryHandler != null) {
                            broker = brokerFactoryHandler.createBroker(brokerURI);
                        } else {
                            broker = BrokerFactory.createBroker(brokerURI);
                        }
                        broker.start();
                    } catch (URISyntaxException e) {
                        throw IOExceptionSupport.create(e);
                    }
                    BROKERS.put(host, broker);
                }

                server = SERVERS.get(host);
                if (server == null) {
                    server = (VMTransportServer)bind(location, true);
                    TransportConnector connector = new TransportConnector(broker.getBroker(), server);
                    connector.setUri(location);
                    connector.setTaskRunnerFactory(broker.getTaskRunnerFactory());
                    connector.start();
                    CONNECTORS.put(host, connector);
                }

            }
View Full Code Here

Examples of org.apache.activemq.broker.BrokerService

        SERVERS.remove(host);
        TransportConnector connector = CONNECTORS.remove(host);
        if (connector != null) {
            LOG.debug("Shutting down VM connectors for broker: " + host);
            ServiceSupport.dispose(connector);
            BrokerService broker = BROKERS.remove(host);
            if (broker != null) {
                ServiceSupport.dispose(broker);
            }
        }
    }
View Full Code Here

Examples of org.apache.activemq.broker.BrokerService

        SERVERS.remove(host);
        TransportConnector connector = CONNECTORS.remove(host);
        if (connector != null) {
            LOG.debug("Shutting down VM connectors for broker: " + host);
            ServiceSupport.dispose(connector);
            BrokerService broker = BROKERS.remove(host);
            if (broker != null) {
                ServiceSupport.dispose(broker);
            }
        }
    }
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.