I am using Quartz Scheduler with my spring 3.0 based application. I am successfully able to create new schedulers and they are working fine.
I have seen thus reference.
But.. I am not able to retrieve servletContext in my quartz job file. can anyone help me for How to retrieve servletContext reference in executeInternal() method ??
I had a similar need. I sorted it out in a similar fashion to the solution presented here.
In my servlet context listener I am setting the servlet context using the job data map object which then is set for a job:
Then inside my job I am doing this:
EDIT:
Also since you mention that you are using Spring I found this link, where in the last post a guy mentions to implement ServletContextAware. Personally, I would go with the JobDataMap, since that is its role.