Exemplo n.º 1
0
 @After
 public void after() throws Exception {
   if (taskSchedulerHelper != null) {
     taskSchedulerHelper.stop();
     taskSchedulerHelper = null;
   }
 }
Exemplo n.º 2
0
 protected Scheduler createScheduler(String name, int threadPoolSize) throws SchedulerException {
   try {
     this.taskSchedulerHelper = new TaskSchedulerHelper(database.getInstance());
     this.taskSchedulerHelper.init(threadPoolSize, new SimpleJobFactory());
     this.taskSchedulerHelper.start();
     return ((QuartzSchedulerSPI) taskSchedulerHelper.getScheduler()).getScheduler();
   } catch (Exception e) {
     throw Throwables.propagate(e);
   }
 }