I have a question regarding the DefaultJobExecutor and its thread pool.
When having many Jobs which execution takes a long time maybe my core pool size , my queue size and also my maxPoolSize is full so RejectedExecutionHandlerof the ThreadPoolExecutor is called.
RejectedExecutionHandler is configured with simple AbortPolicy in DefaultJobExecutor which throws a RejectedExecutionException.
So in simple words if the jobExecutor can’t aquire job because ThreadPool is busy a exception is thrown.
My question is what it means for the job and the JobExecutor. Is the retry count of the job decremented because a exception was thrown or does it not influence the retry count because job is not in execution phase but still in aquisition?
Does the JobExecutor unlock the job and try aquisition again later?
Hopefully you understand my question because it is a bit complex.
Jobs that are rejected by the execution thread pool remain locked and are handed back to the acquisition thread. The acqusition thread re-submits them for execution after the next acquisition cycle. For the relevant code, see: