Package org.apache.activemq.broker

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


     
      uimaAsEngine.stop();
      super.cleanBroker(broker2);

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

  }

  /**
   * Tests recovery from a broker restart when running multiple instances of
View Full Code Here


      int errorCount=0;
      for (int i = 0; i < 4; i++) {
        //  Stop broker before second CAS is sent to the service
        if ( i == 1 ) {
          broker2.stop();
          broker2.waitUntilStopped();

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

      uimaClient1.stop();
      uimaClient2.stop();
      super.cleanBroker(broker2);

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

  }
  /**
   * Tests ability of an aggregate to recover from a Broker restart. The broker managing
   * delegate's input queue is stopped after 1st CAS is fully processed. As part of error
View Full Code Here

      for (int i = 0; i < 10; i++) {
        //  Stop broker before second CAS is sent to the service
        if ( i == 1 ) {
          System.out.println("Stopping Secondary Broker Running on Port:"+broker2.getConnectorByName(DEFAULT_BROKER_URL_KEY_2).getUri().toString());
          broker2.stop();
          broker2.waitUntilStopped();

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

      uimaClient1.stop();
      System.out.println("Stopping Broker - wait ...");
      super.cleanBroker(broker2);

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

  }
  /**
   * Tests sending CPC after CAS timeout. The service is a Primitive taking
   * 6 seconds to process a CAS. The client waits for 5 secs to force
View Full Code Here

            fail(e.getMessage());
          } finally {
            if (bs != null) {
              try {
                bs.stop();
                bs.waitUntilStopped();
              
              } catch (Exception e) {
                e.printStackTrace();
              }
            }
View Full Code Here

    bs = setupSecondaryBroker(false);
    System.setProperty("SecondaryBrokerURL",bs.getConnectorByName(DEFAULT_BROKER_URL_KEY_2).getUri().toString());
    bs.stop();
   
    // wait for the broker to stop
    bs.waitUntilStopped();
    // Deploy aggregate on a secondary broker which was shutdown above. The aggregate should
    // detect missing broker and silently wait for the broker to come up
    deployService(eeUimaEngine, relativePath + "/Deploy_AggregateAnnotatorOnSecondaryBroker.xml");
    try {
      // spin a thread to restart a broker after 5 seconds
View Full Code Here

            fail(e.getMessage());
          } finally {
            if (bs != null) {
              try {
                bs.stop();
                bs.waitUntilStopped();

              } catch (Exception e) {
                e.printStackTrace();
              }
            }
View Full Code Here

    runTest(appCtx, eeUimaEngine, broker2.getConnectorByName(DEFAULT_BROKER_URL_KEY_2).getUri().toString(),
            "TopLevelTaeQueue", 1, PROCESS_LATCH);   
    super.cleanBroker(broker2);

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

  }
 
 
  /**
 
View Full Code Here

                }
            }
        } finally {
            if (broker != null) {
                broker.stop();
                broker.waitUntilStopped();
                broker = null;
            }
        }
    }
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.