[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:
dependency
depends upon MGNLSCH-46 Update dependencies to Magnolia 5.4 Closed
is depended upon by MGNLSCH-56 Inject a Provider<SimpleTranslator> i... Closed
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 MGNLSCH-43.

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

Generated at Mon Feb 12 10:45:27 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.