Package org.apache.activemq.broker

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


            broker.setUseJmx(false);
            broker.setDataDirectory(dataDir);
            broker.addConnector("vm://localhost");
            broker.addConnector("tcp://0.0.0.0:" + mqport);
            broker.setSchedulerSupport(true);
            broker.start();
        }

        EmbeddedServer server = new EmbeddedServer(appPort, appPath);
        server.start();
    }
View Full Code Here


                BrokerService broker = new BrokerService();
                synchronized (this) {                                    
                    broker.setPersistenceAdapter(new MemoryPersistenceAdapter());                   
                    broker.setTmpDataDirectory(new File("./target"));
                    broker.addConnector(brokerUrl);
                    broker.start();
                    Thread.sleep(200);
                    notifyAll();
                }
                synchronized (this) {
                    while (!shutdownBroker) {
View Full Code Here

      try {
      BrokerService broker = new BrokerService();
      broker.setPersistent(false);
      broker.setUseJmx(false);
      broker.addConnector("tcp://localhost:61619");
      broker.start();

      // ActiveMQModuleActivator.startBroker();
      scaDomain = SCADomain.newInstance("helloworldjmsservice.composite");

      try {
View Full Code Here

                        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);
                }
View Full Code Here

    public void testRequestReply() throws Exception {
        BrokerService broker = new BrokerService();
        broker.addConnector("tcp://localhost:61616");
        broker.setPersistent(false);
        broker.setTimeBeforePurgeTempDestinations(1000);
        broker.start();

        DefaultCamelContext context = new DefaultCamelContext();
        JmsComponent jmsComponent = new JmsComponent();

        /**
 
View Full Code Here

         * is invalid now
         */
        Thread.sleep(5000);

        System.in.read();
        broker.start(true);

        /**
         * Before the fix to this issue this call will throw a spring UncategorizedJmsException
         * which contains an InvalidJmsDestination
         */
 
View Full Code Here

            Map<String, BrokerServiceWrapper> brokerServices = getBrokerServices();
            BrokerService brokerService = brokerServices.get(sBrokerName).getBrokerService();
            if (brokerService.isStarted()) {
                return;
            }
            brokerService.start(true);
            brokerService.waitUntilStarted();
            if (!brokerService.isStarted()) {
                throw new PortletException(getLocalizedString(actionRequest,
                        "jmsmanager.broker.failStartBrokerNoReason", sBrokerName));
            }
View Full Code Here

        destroyBroker("BrokerA");
        BrokerService broker = createBroker(new URI("broker:(tcp://localhost:61616)/BrokerA?persistent=true&useJmx=false"));
        broker.setBrokerId("BrokerA");
        NetworkConnector aTOb = bridgeBrokers(brokers.get("BrokerA").broker, brokers.get("BrokerB").broker, false, 2, true, true);
        aTOb.addStaticallyIncludedDestination(queue);
        broker.start();
        broker.waitUntilStarted();
        waitForBridgeFormation();
    }

}
View Full Code Here

        }
       
        BrokerService restartedBroker = createAndConfigureBroker(new URI("broker:(tcp://localhost:61616,stomp://localhost:61613)/BrokerA"));
        bridgeAndConfigureBrokers("BrokerA", "BrokerB");
        bridgeAndConfigureBrokers("BrokerA", "BrokerC");
        restartedBroker.start();
        waitForBridgeFormation();
       
        Thread.sleep(3000);

        assertEquals("Destination", 0, brokers.get("BrokerA").broker.getAdminView().getTemporaryQueues().length);
View Full Code Here

    protected void startAllBrokers() throws Exception {
        Collection<BrokerItem> brokerList = brokers.values();
        for (Iterator<BrokerItem> i = brokerList.iterator(); i.hasNext();) {
            BrokerService broker = i.next().broker;
            broker.start();
        }

        Thread.sleep(maxSetupTime);
    }
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.