Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Quartz Trigger new thread?

Does a quartz scheduler create a new thread for each of the triggers or only a single thread which takes care of all the threads ?

like image 211
user989003 Avatar asked Nov 05 '22 13:11

user989003


1 Answers

Quartz uses a configurable thread pool to execute the scheduled tasks. So threads should be recycled between the job executions. How many threads there are in parallel can be configured as is described here: http://www.quartz-scheduler.org/documentation/quartz-2.x/configuration/ConfigThreadPool

As you can give implementations to the ThreadPool interface yourself, you can, however, deviate and generate a "ThreadPool" that does no pooling at all. (The Interface to implement is described here: http://www.docjar.com/docs/api/org/quartz/spi/ThreadPool.html)

like image 113
Jonathan Avatar answered Nov 15 '22 06:11

Jonathan