
Originally Posted by
adrianshum
1) For JobParameter (formerly JobIdentifier), is it correct that: if same job is launched (passing job of same type to launcher), it is considered as a re-run of previous job, if and only if Job Param passed contains same content?
2) if 1 is correct, what if I want to re-run a job, but with extra parameter passed to the job? (for example, username who launch the job, which a different user may re-run a previously failed job)
3) Is there any place that I can put shared information throughout the job execution? For example, I may want to retrieve the invoking user's information, so that every step/tasklet or item processor in my job can read it? Is Job Param a candidate for such purpose?
4) I want to make a service that user can send request to invoke jobs. What is the correct way if I want the same job able to be concurrently invoked? It seems that if I defined the job in app context, the Job created (and registered to JobRegistry) is a singleton bean. If I have stateful information (e.g. StepContext or other data) in the Job, multiple invocation (by making use of Async Task Executor in JobLauncher) of same job will cause abnormal behaviour.
Shall I create a separate app context for every incoming request, so that every app context (and JobLauncher) serves for only one job?
Thanks a lot for your help