Sundial
Sundial copied to clipboard
Create an object and then give it to Sundial to run.
We would like to be able to create an object and then give it to Sundial to run. Currently we can only give it the class name and such but we are using Guice and need to use the Guice object. It would be great to have
MyObject mo = new MyObject("yes");//I can set the object up here... SundialJobScheduler.addJob(name, mo, m, false);
And of course MyObject would extend Job...
What about using a custom JobFactory that could inject objects into the job or returning a job instance as described in quartz tutorial? (See: Job “Instances”) This is not possible in Sundial right now but with https://github.com/timmolter/Sundial/pull/24
Note to self. Create a second JobFactory
like SimpleJobFactory
.
@lind You you have a sample JobFactory that takes new'd up objects that you could share?