Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.9.1
-
None
-
Security Level: public (Regular issues)
-
None
Description
This exemplary job class
package my.package import org.apache.deltaspike.scheduler.api.Scheduled; import org.quartz.DisallowConcurrentExecution; import org.quartz.Job; @Scheduled(cronExpression = "...", overrideOnStartup = true) @DisallowConcurrentExecution public class MyJob implements Job { ... }
using deltaspike 1.9.0 results in:
table: QRTZ_JOB_DETAILS row 1: JOB_NAME = MyJob JOB_CLASS_NAME = my.package.MyJob IS_NONCONCURRENT = 1 (true)
using deltaspike 1.9.1 or later
+ a previously empty table results in:
table: QRTZ_JOB_DETAILS row 1: JOB_NAME = my.package.MyJob JOB_CLASS_NAME = org.apache.deltaspike.scheduler.impl.JobAdapter IS_NONCONCURRENT = 0 (false)
+ a non-empty table results in:
table: QRTZ_JOB_DETAILS row 1: (inserted by a deployment using 1.9.0 or earlier) JOB_NAME = MyJob JOB_CLASS_NAME = my.package.MyJob IS_NONCONCURRENT = 1 (true) row 2: JOB_NAME = my.package.MyJob JOB_CLASS_NAME = org.apache.deltaspike.scheduler.impl.JobAdapter IS_NONCONCURRENT = 0 (false)
I tracked this behaviour down to changes by DELTASPIKE-1369 that were released with 1.9.1
causing:
(1) annotations org.quartz.DisallowConcurrentExecution and org.quartz.PersistJobDataAfterExecution to be effectively ignored because Quartz checks for their presence in class org.apache.deltaspike.scheduler.impl.JobAdapter.
(2) consecutive deployments to produce duplicate job details.
I could not find any release notes, migration guides or open bugs or fixes concerning this topic.
Expected behaviour:
- deltaspike/quartz should update existing JobDetails instead of inserting duplicates
(JOB_CLASS_NAME of existing job details can be matched to new JOB_NAME - both are the fully qualified class name) - functionality of quartz annotations should be restored
I can provide more context if useful.
Are there any known workarounds?
Attachments
Issue Links
- relates to
-
DELTASPIKE-1369 [Scheduler] Enable/Disable based on custom condition
- Closed