Sep 5th, 2011, 12:16 PM
batch:step and initialization
I am having problems with lazy init and spring batch jobs.
So, I am developing an application that has 3 jobs.
Each job uses different databases.
My jobs should be lazy.
I can either run just 1 job or 5 jobs at the same time.
So, If I am not using a job, I do not want to configure the job's database.
I set the attribute, defult-lazy-init=true.
Even though, when I load the applicaitonContext, Spring is loading the jobs that I did not configure.
When I am not using a job, I do not register the job in the quartz scheduler. So it is not being referenced by anything, and so far should no be created. But it is being.
I debugged the stepParser code. and saw that the method AbstractBeanDefinition.applyDefaults is not being called after the creation of bean definition object for the step configurations.
Is it a normal behavior?
Last edited by rafaelweingartner; Sep 5th, 2011 at 02:20 PM.