Commits

bayard  committed ec3ada4

Applying patch from QUARTZ-465 so that triggerFinalized is notified in the right places

git-svn-id: http://svn.opensymphony.com/svn/quartz/branches/quartz_1-6@70769f7d36a-ea1c-0410-88ea-9fd03e4c9665

  • Participants
  • Parent commits 62c54b1
  • Branches quartz_1-6

Comments (0)

Files changed (4)

File src/java/org/quartz/core/SchedulerSignalerImpl.java

         this.sched = sched;
     }
 
+    /*
+     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     * 
+     * Interface.
+     * 
+     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     */
+
     public void notifyTriggerListenersMisfired(Trigger trigger) {
         try {
             sched.notifyTriggerListenersMisfired(trigger);
         }
     }
 
-    /*
-     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-     * 
-     * Interface.
-     * 
-     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-     */
+    public void notifySchedulerListenersFinalized(Trigger trigger) {
+        sched.notifySchedulerListenersFinalized(trigger);
+    }
 
     public void signalSchedulingChange() {
         sched.notifySchedulerThread();

File src/java/org/quartz/impl/jdbcjobstore/JobStoreSupport.java

             }
 
             doUpdateOfMisfiredTrigger(conn, null, trig, false, STATE_WAITING, recovering);
+
+            signaler.notifySchedulerListenersFinalized(trig);
         }
 
         return new RecoverMisfiredJobsResult(
 
             doUpdateOfMisfiredTrigger(conn, ctxt, trig, forceState, newStateIfNotComplete, false);
             
+            signaler.notifySchedulerListenersFinalized(trig);
+
             return true;
 
         } catch (Exception e) {

File src/java/org/quartz/simpl/RAMJobStore.java

 
         if (tw.trigger.getNextFireTime() == null) {
             tw.state = TriggerWrapper.STATE_COMPLETE;
+            signaler.notifySchedulerListenersFinalized(tw.trigger);
             synchronized (triggerLock) {
                 timeTriggers.remove(tw);
             }

File src/java/org/quartz/spi/SchedulerSignaler.java

 
     void notifyTriggerListenersMisfired(Trigger trigger);
 
+    void notifySchedulerListenersFinalized(Trigger trigger);
+
     void signalSchedulingChange();
 
 }