Browse Source

Pull request #702: DEC-14434 添加依賴,改变日志实现,解决not found问题,修改报错的JavaDoc

Merge in CORE/base-third from ~NIKO/base-third:release/10.0 to final/10.0

* commit '84ce62fe9757a61a01d2d898f7145e61a112d82e':
  DEC-14434 修改pom
  DEC-14434 添加依賴,改变日志实现,解决not found问题,修改报错的JavaDoc
  DEC-14434 pref:添加quartz将触发器状态置为ERROR时的日志输出
final/10.0
Kara 4 years ago
parent
commit
b09cb4f392
  1. 5
      fine-quartz/pom.xml
  2. 2
      fine-quartz/src/main/java/com/fr/third/v2/org/quartz/core/QuartzSchedulerThread.java
  3. 5
      fine-quartz/src/main/java/com/fr/third/v2/org/quartz/impl/jdbcjobstore/JobStoreSupport.java

5
fine-quartz/pom.xml

@ -104,5 +104,10 @@
<scope>system</scope> <scope>system</scope>
<systemPath>${basedir}/lib/quartz-stubs-2.1.7.jar</systemPath> <systemPath>${basedir}/lib/quartz-stubs-2.1.7.jar</systemPath>
</dependency> </dependency>
<dependency>
<groupId>com.fr.third</groupId>
<artifactId>fine-jboss-logging</artifactId>
<version>${revision}</version>
</dependency>
</dependencies> </dependencies>
</project> </project>

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) {
com.fr.third.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!");
com.fr.third.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);
} }

5
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) {
com.fr.third.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);
@ -3745,7 +3746,7 @@ public abstract class JobStoreSupport implements JobStore, Constants {
* the a transaction template. If no return value is required, execute * the a transaction template. If no return value is required, execute
* should just return null. * should just return null.
* *
* @see JobStoreSupport#executeInNonManagedTXLock(String, TransactionCallback) * @see JobStoreSupport#executeInNonManagedTXLock(String, TransactionCallback, TransactionValidator)
* @see JobStoreSupport#executeInLock(String, TransactionCallback) * @see JobStoreSupport#executeInLock(String, TransactionCallback)
* @see JobStoreSupport#executeWithoutLock(TransactionCallback) * @see JobStoreSupport#executeWithoutLock(TransactionCallback)
*/ */
@ -3761,7 +3762,7 @@ public abstract class JobStoreSupport implements JobStore, Constants {
* Implement this interface to provide the code to execute within * Implement this interface to provide the code to execute within
* the a transaction template that has no return value. * the a transaction template that has no return value.
* *
* @see JobStoreSupport#executeInNonManagedTXLock(String, TransactionCallback) * @see JobStoreSupport#executeInNonManagedTXLock(String, TransactionCallback, TransactionValidator)
*/ */
protected abstract class VoidTransactionCallback implements TransactionCallback<Void> { protected abstract class VoidTransactionCallback implements TransactionCallback<Void> {
public final Void execute(Connection conn) throws JobPersistenceException { public final Void execute(Connection conn) throws JobPersistenceException {

Loading…
Cancel
Save