Package org.quartz

Examples of org.quartz.Scheduler.shutdown()


                            }
                        });

                        //Shutdown, but give running jobs a chance to complete.
                        //User scheduled jobs should really implement InterruptableJob
                        s.shutdown(true);
                    } catch (Throwable e) {
                        QuartzResourceAdapter.this.ex.set(e);
                        shutdownWait.countDown();
                    }
                }
View Full Code Here


                        @Override
                        public void run() {
                            try {
                                //Force a shutdown without waiting for jobs to complete.
                                s.shutdown(false);
                                org.apache.openejb.util.Logger.getInstance(LogCategory.OPENEJB, "org.apache.openejb.util.resources").warning("Forced Quartz stop - Jobs may be incomplete");
                            } catch (Throwable e) {
                                QuartzResourceAdapter.this.ex.set(e);
                            }
                        }
View Full Code Here

           
            out.println("Sleeping for 7 seconds");
            Thread.sleep(7000);

            out.println("<br>Shutting down the scheduler");
            scheduler.shutdown();
           
            out.println("<br><br>Check \"server.log\" for output - 8 outputs from simple trigger, 3 from cron trigger");
            out.println("</body>");
            out.println("</html>");
        } catch (SchedulerException | InterruptedException ex) {
View Full Code Here

    sched.start();
  }

  public static void shutdown() throws SchedulerException {
    Scheduler sched = StdSchedulerFactory.getDefaultScheduler();
    sched.shutdown();
  }

  public static void standby() throws SchedulerException {
    Scheduler sched = StdSchedulerFactory.getDefaultScheduler();
    sched.standby();
View Full Code Here

           
            out.println("Sleeping for 7 seconds");
            Thread.sleep(7000);

            out.println("<br>Shutting down the scheduler");
            scheduler.shutdown();
           
            out.println("<br><br>Check \"server.log\" for output - 8 outputs from simple trigger, 3 from cron trigger");
            out.println("</body>");
            out.println("</html>");
        } catch (SchedulerException | InterruptedException ex) {
View Full Code Here

    sched.start();
  }

  public static void shutdown() throws SchedulerException {
    Scheduler sched = StdSchedulerFactory.getDefaultScheduler();
    sched.shutdown();
  }

  public static void standby() throws SchedulerException {
    Scheduler sched = StdSchedulerFactory.getDefaultScheduler();
    sched.standby();
View Full Code Here

    public static void shutdown() {
        final Scheduler scheduler = SystemInstance.get().getComponent(Scheduler.class);
        if (scheduler != null) {
            try {
                scheduler.shutdown();
            } catch (SchedulerException e) {
                throw new OpenEJBRuntimeException("Unable to shutdown scheduler", e);
            }
        }
    }
View Full Code Here

/* 251 */     this.log.info("Stop QuartzService(" + this.jndiName + ")...");
/*     */     try
/*     */     {
/* 254 */       Scheduler scheduler = this.schedulerFactory.getScheduler();
/*     */
/* 256 */       scheduler.shutdown();
/*     */     } catch (Exception e) {
/* 258 */       this.log.error(captureStackTrace(e));
/*     */
/* 260 */       throw new SchedulerConfigException("Failed to shutdown Scheduler - ");
/*     */     }
View Full Code Here

            return;
       
        try {
            Scheduler sched = StdSchedulerFactory.getDefaultScheduler();

            if (sched != null) sched.shutdown();
        } catch (Exception e) {
            log("Quartz Scheduler failed to shutdown cleanly: " + e.toString());
            e.printStackTrace();
        }
View Full Code Here

    @Override
    public void stopScheduler(final String name) {
        final Scheduler scheduler = this.schedulers.remove(name);
        try {
            scheduler.shutdown();
        } catch (final SchedulerException e) {
            logger.error(e.getMessage(), e);
        }
    }
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.