The documentation refers us to the ClassPathXmlApplicationContextJobFactory as a reference for creating custom job factories. I could not seem to find this class in the sample project however. I looked at the online JavaDocs API for it and it does not seem to be listed there either.
I would like to configure the steps required for a job dynamically based on user input. It seems the me the job factory is the proper way to do so. Is that correct? Is a reference factory available?4.1.3. JobFactory and Stateful Components in Steps
...
The strategy provided by Spring Batch to deal with this scenario is the JobFactory, and the samples provide an example of a specialized implementation that can load an ApplicationContext and close it properly when the job is finished. A relevant examples is ClassPathXmlApplicationContextJobFactory and its use in the adhoc-job-launcher-context.xml and the quartz-job-launcher-context.xml, which can be found in the Samples project.
Thanks.
Keith


Reply With Quote