Package org.apache.activemq.broker

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


                                .getChildLogger("service")
                                .info("Starting ActiveMQ BrokerService");
                            bs.start();
                        }

                        bs.waitUntilStarted();

                        //Force a checkpoint to initialize pools
                        Logger
                            .getInstance(LogCategory.OPENEJB_STARTUP, ActiveMQ5Factory.class)
                            .getChildLogger("service")
View Full Code Here


    public void startBroker(URI configURI) throws Exception {
        System.out.println("Loading message broker from: " + configURI);
        BrokerService broker = BrokerFactory.createBroker(configURI);
        brokers.add(broker);
        broker.start();
        if (!broker.waitUntilStarted()) {
            throw new Exception(broker.getStartException());
        }
    }

    /**
 
View Full Code Here

        });

        for (int i=0; i<4; i++) {
            BrokerService currentMaster =  (i%2 == 0 ? brokerA : brokerA1);
            LOG.info("iteration: " + i + ", using: " + currentMaster.getBrokerObjectName().getKeyProperty("BrokerName"));
            currentMaster.waitUntilStarted();

            doTestNetworkSendReceive(brokerB, currentMaster);

            LOG.info("Stopping " + currentMaster.getBrokerObjectName().getKeyProperty("BrokerName"));
            currentMaster.stop();
View Full Code Here

    public void testCloseSendConnection() throws Exception {
        String brokerName = "closeSend";
        BrokerService broker = BrokerFactory.createBroker(new URI("broker:(tcp://localhost:0)/" + brokerName));
        broker.start();
        broker.waitUntilStarted();
        ActiveMQXAConnectionFactory cf = new ActiveMQXAConnectionFactory(broker.getTransportConnectors().get(0).getConnectUri());
        XAConnection connection = (XAConnection)cf.createConnection();
        connection.start();
        XASession session = connection.createXASession();
        XAResource resource = session.getXAResource();
View Full Code Here

                                .getChildLogger("service")
                                .info("Starting ActiveMQ BrokerService");
                            bs.start();
                        }

                        bs.waitUntilStarted();

                        //Force a checkpoint to initialize pools
                        org.apache
                            .openejb
                            .util
View Full Code Here

          //  restart the broker
          System.setProperty("activemq.broker.jmx.domain","org.apache.activemq.test");
          broker2 = setupSecondaryBroker(true);
         
          broker2.start();
          broker2.waitUntilStarted();

        }
        CAS cas = uimaAsEngine.getCAS();
        cas.setDocumentText("Some Text");
        System.out.println("UIMA AS Client Sending CAS#" + (i + 1) + " Request to a Service");
View Full Code Here

      broker2.waitUntilStopped();

      System.out.println("Restarting Broker - wait ...");
      //  restart the broker
      broker3 = setupSecondaryBroker(true);
      broker3.waitUntilStarted();

    } catch ( Exception e ) {
     
    } finally {
      for(int i=0; i < 4; i++ ) {
View Full Code Here

          broker2.stop();
          broker2.waitUntilStopped();

        } else if ( i == 20 ) {
          broker2 = setupSecondaryBroker(true);
          broker2.waitUntilStarted();

        }
        CAS cas = uimaAsEngine.getCAS();
        cas.setDocumentText("Some Text");
        System.out.println("UIMA AS Client Sending CAS#" + (i + 1) + " Request to a Service");
View Full Code Here

          broker2.waitUntilStopped();

          //  restart broker before 3rd CAS is sent
          //  restart the broker
          broker2 = setupSecondaryBroker(true);
          broker2.waitUntilStarted();

        }
        CAS cas = uimaClient1.getCAS();
        cas.setDocumentText("Some Text");
        System.out.println("UIMA AS Client#1 Sending CAS#" + (i + 1) + " Request to a Service");
View Full Code Here

          broker2.waitUntilStopped();

          //  restart broker before 3rd CAS is sent
          //  restart the broker
          broker2 = setupSecondaryBroker(true);
          broker2.waitUntilStarted();

        }
        CAS cas = uimaClient1.getCAS();
        cas.setDocumentText("Some Text");
        System.out.println("UIMA AS Client Sending CAS#" + (i + 1) + " Request to a Service");
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.