JobRunShell instances are responsible for providing the 'safe' environment for Job s to run in, and for performing all of the work of executing the Job, catching ANY thrown exceptions, updating the Trigger with the Job's completion code, etc.
A JobRunShell instance is created by a JobRunShellFactory on behalf of the QuartzSchedulerThread which then runs the shell in a thread from the configured ThreadPool when the scheduler determines that a Job has been triggered.
JobRunShell用来为 Job提供安全的运行环境的,执行 Job中所有的作业,捕获运行中的异常,在任务执行完毕的时候更新 Trigger状态,等等。
JobRunShell实例是用 JobRunShellFactory为 QuartzSchedulerThread创建的,在调度器决定一个 Job被触发的时候,它从线程池中取出一个线程来执行任务。