You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SchedulerAccessor 'globalJobListeners' and 'globalTriggerListeners' not working with 2.0.x and 2.1.x [SPR-11362] #15988
Actually, this specific case is even worse: The addListener(JobListener) method has been introduced as of Quartz 2.2. On 2.0 and 2.1, only the variant with additional Matcher arguments exists... So we'll have to reflectively detect that, specifically for Quartz 2.x, and pass in an empty List there to enforce the global matcher. There is nothing wrong with always using that method on Quartz 2.x, it seems, so at least we don't have to differentiate between Quartz 2.0, 2.1 and 2.2 there.
Indeed :-) Seems we have to detect the addJobListener(JobListener, List) variant and pass in an empty List there... So not just use a different method name in quartz2 mode, but also use a different signature.
After diving deeper into the Quartz 2.1.x line, it turns out that those addXListener variants without a matcher argument were actually introduced in Quartz 2.1.4. We'll rely on that in Spring Framework 4.1 then, since Quartz 2.1.4 will be 2.5 years old already when we go 4.1 GA.
Activity
spring-projects-issues commentedon Jan 28, 2014
Juergen Hoeller commented
Such Quartz API issues are a key factor why we will upgrade to Quartz 2.1+ as of Spring Framework 4.1...
That said, for 4.0.1 and 3.2.7, we should try our best to be compatible with Quartz 2.0.x as well still.
Juergen
spring-projects-issues commentedon Jan 28, 2014
Stéphane Nicoll commented
Actually the method was introduced with Quartz 2.2. This use case is failing with both 2.0 and 2.1. Investigating what we can do there.
spring-projects-issues commentedon Jan 28, 2014
Juergen Hoeller commented
Actually, this specific case is even worse: The addListener(JobListener) method has been introduced as of Quartz 2.2. On 2.0 and 2.1, only the variant with additional Matcher arguments exists... So we'll have to reflectively detect that, specifically for Quartz 2.x, and pass in an empty List there to enforce the global matcher. There is nothing wrong with always using that method on Quartz 2.x, it seems, so at least we don't have to differentiate between Quartz 2.0, 2.1 and 2.2 there.
spring-projects-issues commentedon Jan 28, 2014
Juergen Hoeller commented
Indeed :-) Seems we have to detect the addJobListener(JobListener, List) variant and pass in an empty List there... So not just use a different method name in quartz2 mode, but also use a different signature.
spring-projects-issues commentedon Jan 28, 2014
Stéphane Nicoll commented
Already done, locally :) And quartz manipulates the list behind my back so it better has to be mutable!
spring-projects-issues commentedon Jan 28, 2014
Stéphane Nicoll commented
The global trigger listeners were also affected by this issue (same root).
Pull request available: #452
spring-projects-issues commentedon Jan 28, 2014
Juergen Hoeller commented
Applied with some minor polishing, for release in 4.0.1 as well as 3.2.7.
Juergen
spring-projects-issues commentedon Mar 27, 2014
Juergen Hoeller commented
After diving deeper into the Quartz 2.1.x line, it turns out that those addXListener variants without a matcher argument were actually introduced in Quartz 2.1.4. We'll rely on that in Spring Framework 4.1 then, since Quartz 2.1.4 will be 2.5 years old already when we go 4.1 GA.
Juergen