[MGNLSCH-55] Make sure jobs are created using injection rather than empty constructor Created: 13/May/15 Updated: 22/May/15 Resolved: 13/May/15 |
|
| Status: | Closed |
| Project: | Scheduler |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.2 |
| Type: | Task | Priority: | Critical |
| Reporter: | Magnolia International | Assignee: | Magnolia International |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Template: |
|
||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||
| Task DoR: |
Empty
|
||||||||||||
| Date of First Response: | |||||||||||||
| Description |
|
By default, Quartz uses its org.quartz.simpl.SimpleJobFactory to create org.quartz.Job instances. This in turn uses java.lang.Class#newInstance, which means we're still using the default deprecated constructors of info.magnolia.module.scheduler.CommandJob which were deprecated with We need to implement our own factory, which uses our ComponentProvider (i.e Guice) |
| Comments |
| Comment by Magnolia International [ 13/May/15 ] |
|
Done on fix/locale-provider-and-inject branch. |
| Comment by Espen Jervidalo [ 13/May/15 ] |
|
MagnoliaQuartzJobFactory - How about highlighting that it's using DI/componentProvider instead |
| Comment by Magnolia International [ 15/May/15 ] |
|
Agreed - and moved to a subpackage to indicate it's a Quartz implementation: info.magnolia.module.scheduler.quartz.ComponentProviderJobFactory |