Browse Source

Merge pull request #696 in CORE/base-third from bugfix/10.0 to feature/10.0

* commit 'bd3f49d62855afd3d2d83cc8f42b92cbe3b10917':
  DEC-14434 pref:添加quartz将触发器状态置为ERROR时的日志输出
research/11.0
superman 4 years ago
parent
commit
e6177da46b
  1. 2
      fine-quartz/src/main/java/com/fr/third/v2/org/quartz/core/QuartzSchedulerThread.java
  2. 1
      fine-quartz/src/main/java/com/fr/third/v2/org/quartz/impl/jdbcjobstore/JobStoreSupport.java

2
fine-quartz/src/main/java/com/fr/third/v2/org/quartz/core/QuartzSchedulerThread.java

@ -375,6 +375,7 @@ public class QuartzSchedulerThread extends Thread {
shell = qsRsrcs.getJobRunShellFactory().createJobRunShell(bndle); shell = qsRsrcs.getJobRunShellFactory().createJobRunShell(bndle);
shell.initialize(qs); shell.initialize(qs);
} catch (SchedulerException se) { } catch (SchedulerException se) {
org.jboss.logging.Logger.getLogger(getClass()).error("---------error occur in job run shell initialize, jobKey:"+triggers.get(i).getJobKey(), se);
qsRsrcs.getJobStore().triggeredJobComplete(triggers.get(i), bndle.getJobDetail(), CompletedExecutionInstruction.SET_ALL_JOB_TRIGGERS_ERROR); qsRsrcs.getJobStore().triggeredJobComplete(triggers.get(i), bndle.getJobDetail(), CompletedExecutionInstruction.SET_ALL_JOB_TRIGGERS_ERROR);
continue; continue;
} }
@ -385,6 +386,7 @@ public class QuartzSchedulerThread extends Thread {
// a thread pool being used concurrently - which the docs // a thread pool being used concurrently - which the docs
// say not to do... // say not to do...
getLog().error("ThreadPool.runInThread() return false!"); getLog().error("ThreadPool.runInThread() return false!");
org.jboss.logging.Logger.getLogger(getClass()).error("---------error occur in job shell run in thread, jobKey:"+triggers.get(i).getJobKey());
qsRsrcs.getJobStore().triggeredJobComplete(triggers.get(i), bndle.getJobDetail(), CompletedExecutionInstruction.SET_ALL_JOB_TRIGGERS_ERROR); qsRsrcs.getJobStore().triggeredJobComplete(triggers.get(i), bndle.getJobDetail(), CompletedExecutionInstruction.SET_ALL_JOB_TRIGGERS_ERROR);
} }

1
fine-quartz/src/main/java/com/fr/third/v2/org/quartz/impl/jdbcjobstore/JobStoreSupport.java

@ -1417,6 +1417,7 @@ public abstract class JobStoreSupport implements JobStore, Constants {
return getDelegate().selectJobDetail(conn, key, return getDelegate().selectJobDetail(conn, key,
getClassLoadHelper()); getClassLoadHelper());
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
org.jboss.logging.Logger.getLogger(getClass()).error("---------job class not found, jobKey: "+key, e);
throw new JobPersistenceException( throw new JobPersistenceException(
"Couldn't retrieve job because a required class was not found: " "Couldn't retrieve job because a required class was not found: "
+ e.getMessage(), e); + e.getMessage(), e);

Loading…
Cancel
Save