public void setJndiName(String jndiName) throws Exception { String oldName = this.jndiName; this.jndiName = jndiName; if (super.getState() == STARTED) { unbind(oldName); try { rebind(); } catch (NamingException ne) { log.error("Failed to rebind Scheduler", ne); throw new SchedulerConfigException( "Failed to rebind Scheduler - ", ne); } } }
@Override public void stopService() throws Exception { log.info("Stop QuartzService(" + jndiName + ")..."); try { Scheduler scheduler = schedulerFactory.getScheduler(); scheduler.shutdown(); } catch (Exception e) { log.error("Failed to shutdown Scheduler", e); throw new SchedulerConfigException( "Failed to shutdown Scheduler - ", e); } unbind(jndiName); log.info("QuartzService(" + jndiName + ") stopped."); }
@Override public void startService() throws Exception { log.info("Start QuartzService(" + jndiName + ")..."); try { rebind(); } catch (NamingException ne) { log.error("Failed to rebind Scheduler", ne); throw new SchedulerConfigException("Failed to rebind Scheduler - ", ne); } try { Scheduler scheduler = schedulerFactory.getScheduler(); if (startScheduler) { scheduler.start(); } else { log.info("Skipping starting the scheduler (will not run jobs)."); } } catch (Exception e) { log.error("Failed to start Scheduler", e); throw new SchedulerConfigException("Failed to start Scheduler - ", e); } log.info("QuartzService(" + jndiName + ") started."); }
@Override public void stopService() throws Exception { log.info("Stop QuartzService(" + jndiName + ")..."); try { Scheduler scheduler = schedulerFactory.getScheduler(); scheduler.shutdown(); } catch (Exception e) { log.error("Failed to shutdown Scheduler", e); throw new SchedulerConfigException( "Failed to shutdown Scheduler - ", e); } unbind(jndiName); log.info("QuartzService(" + jndiName + ") stopped."); }
@Override public void startService() throws Exception { log.info("Start QuartzService(" + jndiName + ")..."); try { rebind(); } catch (NamingException ne) { log.error("Failed to rebind Scheduler", ne); throw new SchedulerConfigException("Failed to rebind Scheduler - ", ne); } try { Scheduler scheduler = schedulerFactory.getScheduler(); if (startScheduler) { scheduler.start(); } else { log.info("Skipping starting the scheduler (will not run jobs)."); } } catch (Exception e) { log.error("Failed to start Scheduler", e); throw new SchedulerConfigException("Failed to start Scheduler - ", e); } log.info("QuartzService(" + jndiName + ") started."); }
public void setJndiName(String jndiName) throws Exception { String oldName = this.jndiName; this.jndiName = jndiName; if (super.getState() == STARTED) { unbind(oldName); try { rebind(); } catch (NamingException ne) { log.error("Failed to rebind Scheduler", ne); throw new SchedulerConfigException( "Failed to rebind Scheduler - ", ne); } } }
@Override public void stopService() throws Exception { log.info("Stop QuartzService(" + jndiName + ")..."); try { Scheduler scheduler = schedulerFactory.getScheduler(); scheduler.shutdown(); } catch (Exception e) { log.error("Failed to shutdown Scheduler", e); throw new SchedulerConfigException( "Failed to shutdown Scheduler - ", e); } unbind(jndiName); log.info("QuartzService(" + jndiName + ") stopped."); }
@Override public void startService() throws Exception { log.info("Start QuartzService(" + jndiName + ")..."); try { rebind(); } catch (NamingException ne) { log.error("Failed to rebind Scheduler", ne); throw new SchedulerConfigException("Failed to rebind Scheduler - ", ne); } try { Scheduler scheduler = schedulerFactory.getScheduler(); if (startScheduler) { scheduler.start(); } else { log.info("Skipping starting the scheduler (will not run jobs)."); } } catch (Exception e) { log.error("Failed to start Scheduler", e); throw new SchedulerConfigException("Failed to start Scheduler - ", e); } log.info("QuartzService(" + jndiName + ") started."); }
public void setJndiName(String jndiName) throws Exception { String oldName = this.jndiName; this.jndiName = jndiName; if (super.getState() == STARTED) { unbind(oldName); try { rebind(); } catch (NamingException ne) { log.error("Failed to rebind Scheduler", ne); throw new SchedulerConfigException( "Failed to rebind Scheduler - ", ne); } } }