[ https://issues.apache.org/jira/browse/DELTASPIKE-1449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michel Zedler updated DELTASPIKE-1449: -------------------------------------- Description: This exemplary job class {code:java} 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 { ... } {code} using deltaspike 1.9.0 results in: {noformat} table: QRTZ_JOB_DETAILS row 1: JOB_NAME = MyJob JOB_CLASS_NAME = my.package.MyJob IS_NONCONCURRENT = 1 (true){noformat} using deltaspike 1.9.1 or later + a previously empty table results in: {noformat} table: QRTZ_JOB_DETAILS row 1: JOB_NAME = my.package.MyJob JOB_CLASS_NAME = org.apache.deltaspike.scheduler.impl.JobAdapter IS_NONCONCURRENT = 0 (false){noformat} + a non-empty table results in: {noformat} 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){noformat} 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? was: This exemplary job class {code:java} 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 { ... } {code} using deltaspike 1.9.0 results in: {noformat} table: QRTZ_JOB_DETAILS row 1: JOB_NAME = MyJob JOB_CLASS_NAME = my.package.MyJob IS_NONCONCURRENT = 1 (true){noformat} using deltaspike 1.9.1 or later + a previously empty table results in: {noformat} table: QRTZ_JOB_DETAILS row 1: JOB_NAME = my.package.MyJob JOB_CLASS_NAME = org.apache.deltaspike.scheduler.impl.JobAdapter IS_NONCONCURRENT = 0 (false){noformat} + a non-empty table results in: {noformat} 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){noformat} I tracked this behaviour down to changes by DELTASPIKE-1369 that were released with 1.9.1 likely 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 jobs, triggers and concurrent executions. I could not find any release notes, migration guides or open bugs 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? > Broken quartz annotations and duplicate job details > --------------------------------------------------- > > Key: DELTASPIKE-1449 > URL: https://issues.apache.org/jira/browse/DELTASPIKE-1449 > Project: DeltaSpike > Issue Type: Bug > Security Level: public(Regular issues) > Components: Scheduler > Affects Versions: 1.9.1 > Reporter: Michel Zedler > Priority: Major > > This exemplary job class > {code:java} > 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 { > ... > } {code} > using deltaspike 1.9.0 results in: > {noformat} > table: QRTZ_JOB_DETAILS > row 1: > JOB_NAME = MyJob > JOB_CLASS_NAME = my.package.MyJob > IS_NONCONCURRENT = 1 (true){noformat} > using deltaspike 1.9.1 or later > + a previously empty table results in: > {noformat} > table: QRTZ_JOB_DETAILS > row 1: > JOB_NAME = my.package.MyJob > JOB_CLASS_NAME = org.apache.deltaspike.scheduler.impl.JobAdapter > IS_NONCONCURRENT = 0 (false){noformat} > + a non-empty table results in: > {noformat} > 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){noformat} > > 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? > -- This message was sent by Atlassian Jira (v8.20.1#820001)