/**
  * Disconnect all Pusher instances when stopping the component
  *
  * @throws Exception
  */
 @Override
 protected void doStop() throws Exception {
   LOG.info("Stopping {}", getClass().getSimpleName());
   super.doStop();
   // Disconnect from any currently connected apps
   for (Pusher pusher : apps.values()) {
     try {
       pusher.disconnect();
     } catch (Exception e) {
       // no-op
     }
   }
 }
Пример #2
0
  @Override
  protected void doStop() throws Exception {
    super.doStop();

    if (scheduler != null) {
      AtomicInteger number =
          (AtomicInteger) scheduler.getContext().get(QuartzConstants.QUARTZ_CAMEL_JOBS_COUNT);
      if (number != null && number.get() > 0) {
        LOG.info(
            "Cannot shutdown scheduler: "
                + scheduler.getSchedulerName()
                + " as there are still "
                + number.get()
                + " jobs registered.");
      } else {
        LOG.info("Shutting down scheduler. (will wait for all jobs to complete first.)");
        scheduler.shutdown(true);
        scheduler = null;
      }
    }
  }
Пример #3
0
 @Override
 protected void doStop() throws Exception {
   timer.stop();
   timer = null;
   super.doStop();
 }
Пример #4
0
 @Override
 protected void doStop() throws Exception {
   ServiceHelper.stopService(cacheManagerFactory);
   super.doStop();
 }