Note that there are some explanatory texts on larger screens.

plurals
  1. POQuartz Scheduler not stopping after shutdown
    primarykey
    data
    text
    <p>I'm using the currently latest quartz 1.8.3 on jboss 4.0.5. The quartz jobs are persistent and saved into a local database. When I call the shutdown or standby method on the executing quartz scheduler object jobs still continue to execute by the scheduler, only that the jobs state is empty and the execution fails.</p> <p>I would expect (at least according to quartz API documentation) that when I shutdown or make the scheduler standby, that jobs previously scheduled into the database will not be executed.</p> <p>If calling shutdown or standby on the scheduler is not the method to achieve that, what is?</p> <p><em>The jobs are not just finishing the execution but planned jobs continue to be triggered.</em></p> <p>Here is additional info as asked:</p> <pre><code>public class QuartzNotificationsSchedulerBean implements NotificationsScheduler, ServletContextAware { ... public String scheduleNotification(Notification notification) { // Schedule the job with the trigger try { // Define job instance String groupName = this.createNotificationGroupName(notification); String triggerName = this.createNoficationTriggerName(notification); String jobName = this.createNoficationJobName(notification); JobDetail job = new JobDetail(jobName, groupName , ScheduledNotificationJob.class); JobDataMap jobDataMap = new JobDataMap(); jobDataMap.putAll(notification.getContext()); job.setJobDataMap(jobDataMap); Calendar notificationTime = notification.getTime(); Trigger trigger = new SimpleTrigger(triggerName, groupName , notificationTime.getTime()); scheduler.scheduleJob(job, trigger); return trigger.getName(); } catch (SchedulerException e) { throw new NotificationScheduleException(e, notification); } return null; } public void setServletContext(ServletContext servletContext) { this.sf = (SchedulerFactory) servletContext.getAttribute(QuartzInitializerListener.QUARTZ_FACTORY_KEY); try { scheduler = sf.getScheduler(); if(scheduler.isStarted() == false) { scheduler.start(); } } catch (SchedulerException e) { logger.error("Failed to load Quartz scheduler ", e); } } } </code></pre> <p>The following is a copy of the quartz configuration properties:</p> <pre><code>#============================================================================ # Configure Main Scheduler Properties #============================================================================ org.quartz.scheduler.instanceName = scheduler org.quartz.scheduler.instanceId = AUTO org.quartz.scheduler.wrapJobExecutionInUserTransaction = true #============================================================================ # Configure ThreadPool #============================================================================ org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool org.quartz.threadPool.threadCount = 45 org.quartz.threadPool.threadPriority = 5 #============================================================================ # Configure JobStore #============================================================================ org.quartz.jobStore.misfireThreshold = 60000 org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate #org.quartz.jobStore.useProperties = false org.quartz.jobStore.dataSource = FOR_QUARTZ org.quartz.jobStore.isClustered = true org.quartz.jobStore.clusterCheckinInterval = 20000 #============================================================================ # Configure Datasources #============================================================================ org.quartz.dataSource.FOR_QUARTZ.jndiURL = java:jdbc/live-quartz </code></pre> <p>Here is a snippet from the web.xml where the quartz is initialized:</p> <pre><code> &lt;!-- START NOTIFICATION SERVICE --&gt; &lt;context-param&gt; &lt;param-name&gt;config-file&lt;/param-name&gt; &lt;param-value&gt;wm_quartz.properties&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;param-name&gt;shutdown-on-unload&lt;/param-name&gt; &lt;param-value&gt;true&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;param-name&gt;start-scheduler-on-load&lt;/param-name&gt; &lt;param-value&gt;true&lt;/param-value&gt; &lt;/context-param&gt; &lt;listener&gt; &lt;listener-class&gt;org.quartz.ee.servlet.QuartzInitializerListener&lt;/listener-class&gt; &lt;/listener&gt; </code></pre> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload