I am upgrading from Spring 3.2.x to Spring 4.1.x and am using Quartz 2.2.1. We dynamically create jobs and have been persisting them using the solution described in this stackoverlow answer.
The solution in that answer depends on a constant defined by JobDetailAwareTrigger.JOB_DETAIL_KEY, however that interface has been removed from the code base as a result of the work done for Spring JIRA 11262, and now my code does not compile.
I investigated the github commit that removed the interface and found that internal Spring code now directly references "jobDetail" literals when needed rather than a constant. Should I follow suit and create my own jobDetail constant that is defined within my application, and then reference that everywhere where I had previously referenced JobDetailAwareTrigger.JOB_DETAIL_KEY? If I do that, am I now making my application vulnerable to an unlikely future Spring change to the definition of "jobDetail"?
Aucun commentaire:
Enregistrer un commentaire