I'm using Quartz(1.6.6) , and it's a great system , but one things really bugs me - I want to be able to use non - default constructor for my jobs. (Yes , I've tried the JobFactory , but I don't like this solution. See below)
Meaning- Instead of :
JobDetail jobDetails = new JobDetail(jobUniqueName, JOBS_GROUP,
CrawlJob.class);
I would like to have something that is more similar to the java Executoers:
CrawlJob crawlJob = new CrawlJob(something, somethingelse);
JobDetail jobDetails = new JobDetail(jobUniqueName, JOBS_GROUP,
crawlJob);
I've already seen the documentation on the JobFactory , but this feels like a very bad solution . If I have several types of tasks on the same scheduler , the JobFactory will look like an endless case block , and that really doesn't feels right.
Any more ideas?