예제 #1
0
  public void stop() throws MuleException {
    if (!stopped.get()) {
      logger.debug("Stopping Service");
      stopping.set(true);
      fireServiceNotification(ServiceNotification.SERVICE_STOPPING);

      // Unregister Listeners for the service
      unregisterListeners();

      // Resume if paused. (This is required so that stop() doesn't hand and so
      // message aren't lost in SedaQueue when service is stopped.
      if (isPaused()) {
        resume();
      }

      doStop();

      // Stop component.  We do this here in case there are any queues that need to be consumed
      // first.
      component.stop();

      stopped.set(true);
      fireServiceNotification(ServiceNotification.SERVICE_STOPPED);
      logger.info("Mule Service " + name + " has been stopped successfully");
    }
  }
예제 #2
0
  public void stop() throws MuleException {
    // TODO this wasn't being called stopListeners();
    // Unregister Listeners for the service
    unregisterListeners();

    // Stop component.  We do this here in case there are any queues that need to be consumed first.
    component.stop();
    lifecycleManager.fireLifecycle(Stoppable.PHASE_NAME);
  }
예제 #3
0
  public void stop() throws MuleException {
    if (!stopped.get()) {
      logger.debug("Stopping Service");
      stopping.set(true);
      fireServiceNotification(ServiceNotification.SERVICE_STOPPING);

      // Unregister Listeners for the service
      unregisterListeners();

      component.stop();

      doStop();
      stopped.set(true);
      fireServiceNotification(ServiceNotification.SERVICE_STOPPED);
      logger.info("Mule Service " + name + " has been stopped successfully");
    }
  }