java - How to acces other servlet's init-parameters or context's contex-parameters inside quartz jobs? -


i have defined quartz job xml jobs configuration in here example 2

http://www.mkyong.com/java/example-to-run-multiple-jobs-in-quartz/

i have other servlets wich have init-params , web app has context-params.

how access these parameters inside job implements job class?

i see several options here.

create holder object hold information want access in job.

public class configholder {     static public map importantdata; } 

you initialize data using servlet2 in init method.

schedule job jobdatamap this

jobdetail jd = new jobdetail("yourjob", scheduler.default_group, jobclass.class); jd.getjobdatamap().put("config", configobject);  

Comments