Package org.apache.activemq.broker

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


            synchronized (this) {
              this.wait(5000); // wait for 5 secs
            }
            // Create a new broker on port 8119
            bs = setupSecondaryBroker(false);
            bs.waitUntilStarted();
            System.setProperty("SecondaryBrokerURL",bs.getConnectorByName(DEFAULT_BROKER_URL_KEY_2).getUri().toString());
            // Start the uima AS client. It connects to the top level service and sends
            // 10 messages
            runTest(null, eeUimaEngine, bs.getConnectorByName(DEFAULT_BROKER_URL_KEY_2).getUri().toString(), "TopLevelTaeQueue", 10,
                    PROCESS_LATCH);
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

            synchronized (this) {
              this.wait(5000); // wait for 5 secs
            }
            // Create a new broker on port 8119
            bs = setupSecondaryBroker(false);
            bs.waitUntilStarted();
            System.setProperty("SecondaryBrokerURL",bs.getConnectorByName(DEFAULT_BROKER_URL_KEY_2).getUri().toString());
            // Start the uima AS client. It connects to the top level service and sends
            // 10 messages
            runTest(null, eeUimaEngine, bs.getConnectorByName(DEFAULT_BROKER_URL_KEY_2).getUri().toString(), "TopLevelTaeQueue", 10,
                    PROCESS_LATCH);
View Full Code Here

            BrokerService broker = createBroker(brokerId);
            broker.setPersistent(false);
            broker.addConnector("tcp://localhost:0").setName("tcp");
            addPartitionBrokerPlugin(broker);
            broker.start();
            broker.waitUntilStarted();
            partitioning.brokers.put(brokerId, getConnectURL(brokerId));
        }
    }

    protected void addPartitionBrokerPlugin(BrokerService broker) {
View Full Code Here

        BrokerService brokerService = new BrokerService();
        brokerService.setPersistent(false);
        brokerService.setUseJmx(false);
        brokerService.addConnector("tcp://localhost:0");
        brokerService.start();
        brokerService.waitUntilStarted();

        try {
            final int numConnections = 2;

            final ActiveMQConnectionFactory amq = new ActiveMQConnectionFactory(brokerService.getTransportConnectors().get(0).getPublishableConnectString());
View Full Code Here

                        LOG.debug("waiting for broker named: " + brokerName + " to start");
                        timeout = Math.max(0, expiry - System.currentTimeMillis());
                        // Wait for however long we have left for broker to be started, if
                        // it doesn't get started we need to clear broker so it doesn't get
                        // returned.  A null return should throw an exception.
                        if (!broker.waitUntilStarted(timeout)) {
                            broker = null;
                            break;
                        }
                    }
                }
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.