Oct 12th, 2012, 03:32 PM
update job execution content during start or restart?
Does anyone know if it is possible to add to the Job ExecutionContent values when launching a job other than using the JobExuctionListener?
I am launching jobs in a Spring MVC framework where I have some information in a session scoped bean which I need to read and pass along to the job. These values are mutable and need to flow into the job when starting or when it is restarted.
I can not use the beforeJob listener callback as it is running on another thread where session scope bean is not accessible.
It appears the only way I can do this is to create a custom JobLauncher which will have access to the information and add it to the execution context before calling a TaskExcuter to run the newly created JobExecution.