...
// This would reside in your BatchConfigurer implementation
@Override
public JobExplorer getJobExplorer() {
JobExplorerFactoryBean factoryBean = new JobExplorerFactoryBean();
factoryBean.setDataSource(this.dataSource);
return factoryBean;
}}
...
I think it should be:
...
// This would reside in your BatchConfigurer implementation
@Override
public JobExplorer getJobExplorer() throws Exception {
JobExplorerFactoryBean factoryBean = new JobExplorerFactoryBean();
factoryBean.setDataSource(this.dataSource);
return factoryBean.getObject();
}
...
Same for the next snippet in the same section. Do you agree?
The MapJobRegistry does not have properties "dataSource" and "tablePrefix". I guess this is a copy/paste from the snippet of the previous section "JobExplorer".
In the same section 1.6.2, the following Java snippet has an extra "new":
...
// This is already provided via the @EnableBatchProcessing but can be customized via
// overriding the getter in the SimpleBatchConfiguration
@Override
@Bean
public JobRegistry jobRegistry() throws Exception {
return new new MapJobRegistry();
}
...
In the same section 1.6.2, this time for AutomaticJobRegistrar, the following Java snippet is incomplete:
----
@Bean
public AutomaticJobRegistrar registrar() {
AutomaticJobRegistrar registrar = new AutomaticJobRegistrar();
----
In order to make it consistent with the XML example, I think it should be updated as follows:
----
@Bean
public AutomaticJobRegistrar registrar() {
AutomaticJobRegistrar registrar = new AutomaticJobRegistrar();
registrar.setJobLoader(jobLoader());
registrar.setApplicationContextFactories(applicationContextFactories());
registrar.afterPropertiesSet();
return registrar;
}
----
Is this correct?
Affects: 4.0.0
Referenced from: pull request #563, and commits 020d051
The text was updated successfully, but these errors were encountered:
Mahmoud Ben Hassine opened BATCH-2669 and commented
Some examples in the "Configuring and Running a Job" section of the documentation are incorrect or do not compile:
Section 1.6.1
The following snippet does not compile:
I think it should be:
Same for the next snippet in the same section. Do you agree?
Section 1.6.2
Is the following XML snippet to register a MapJobRegistry correct?
The MapJobRegistry does not have properties "dataSource" and "tablePrefix". I guess this is a copy/paste from the snippet of the previous section "JobExplorer".
In the same section 1.6.2, the following Java snippet has an extra "new":
In the same section 1.6.2, this time for AutomaticJobRegistrar, the following Java snippet is incomplete:
In order to make it consistent with the XML example, I think it should be updated as follows:
Is this correct?
Affects: 4.0.0
Referenced from: pull request #563, and commits 020d051
The text was updated successfully, but these errors were encountered: