Hello,
Quick question... What is the best way to set a job's execution context before using a launcher to launch a job?
Before I go and extend JobLauncher, I'd like to know if it is possible to set the execution context for a job before launching it through a JobLauncher. I am using SimpleJobLauncher right now to run jobs, but I need to conditionally park a value in execution context before I run it.
Code:// create execution JobExecution jobExecution = jobRepository.createJobExecution(job.getName(), jobParameters); // set context values... // update execution this.jobRepository.update(jobExecution); // run job fuzzy - run job given an execution?!
Thanks,
Alejandro


Reply With Quote