I am rather confused by the Spring Package naming conventions using spring -batch 2.1.8.RELEASE.
Main problem:
2 different tasks, but with the same step inside (which will receive different properties), which name is not unique. If I try to do one of the tasks, for example job1. Then it gets the value "file2" for prop2, even if it is defined for job2. (only an example of abstraction with less detailed information about degrees, students, etc.). It is not possible to determine any pattern or reason for this process.
<batch:job id="job1" parent="parentJob"> <batch:step id="copyFile"> <batch:tasklet> <bean class="xxx.xyz.classXXX" scope="step"> <property name="prop1" value="file1" /> </bean> </batch:tasklet> </batch:step> </batch>
Each task is defined in its own file.
<batch:job id="job2" parent="parentJob"> <batch:step id="copyFile"> <batch:tasklet> <bean class="xxx.xyz.classXXX" scope="step"> <property name="prop2" value="file2" /> </bean> </batch:tasklet> </batch:step> </batch>
We got about 80 jobs - each of them has copyFile as a first step. But there are also steps in the middle of each work that should be called the same. Is there any way to avoid these injection-confusion / failure? Besides names such as "copyFile1", "copyFile2", etc.
(names and properties are nothing but smoke and mirrors!)
Do you need more information? I hope my explanations are not so bad. Thank you in advance!
Cheers max.
source share