History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QUARTZ-13
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: James House
Reporter: James House
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Quartz Scheduler

Don't "acquire" next trigger until thread pool has thread available.

Created: 02/Jun/04 12:30 PM   Updated: 24/Jul/06 11:19 AM
Component/s: Core, Job Stores
Affects Version/s: 1.5
Fix Version/s: 1.6

Issue Links:
Container
This issue contains:
QUARTZ-12 Acquire more trigger at a time Major Open
 
Related
 
This issue is related to:
QUARTZ-18 Support Multiple Thread Pools Major Open
QUARTZ-249 Priority scheduling Minor Closed
QUARTZ-12 Acquire more trigger at a time Major Open


 All   Comments   Change History      Sort Order:
Jasper Rosenberg - [05/Jul/06 07:35 AM ]
Finally had a chance to look at the wait for available thread changes. And had one thought.

If "qsRsrcs.getThreadPool().runInThread(shell);" in QuartzSchedulerThread returns false, should we be releasing the acquired trigger?

Something like:

if (qsRsrcs.getThreadPool().runInThread(shell) == false) {
                            try {
                                qsRsrcs.getJobStore().releaseAcquiredTrigger(ctxt,
                                        trigger);
                            } catch (SchedulerException se) {
                                qs.notifySchedulerListenersError(
                                        "An error occured while releasing trigger '"
                                                + trigger.getFullName() + "'", se);
                                // db connection must have failed... keep retrying
                                // until it's up...
                                releaseTriggerRetryLoop(trigger);
                            }
                        }

James House - [05/Jul/06 10:33 AM ]
I suppose that's the safest thing to - I guess I was still in the mindset that the thread pool is not shared, and this is therefore a "never happens" case.

But it would of course be best to play safe, and since it only adds that small block of code, and you've already provided it, why not?

James House - [24/Jul/06 11:19 AM ]

Actually, the trigger can't just be released, as it was already marked fired... so it is marked complete and into the error state instead.