Commit 72754c27 authored by Stephane Nicoll's avatar Stephane Nicoll

Allow to override BasicBatchConfigurer

Issue #4533 was supposed to make BasicBatchConfigurer public again but
unfortunately only the class visibility was changed. This commit makes
sure it can be overridden.

Closes gh-4888
parent 9f413230
...@@ -66,7 +66,7 @@ public class BasicBatchConfigurer implements BatchConfigurer { ...@@ -66,7 +66,7 @@ public class BasicBatchConfigurer implements BatchConfigurer {
* @param properties the batch properties * @param properties the batch properties
* @param dataSource the underlying data source * @param dataSource the underlying data source
*/ */
BasicBatchConfigurer(BatchProperties properties, DataSource dataSource) { protected BasicBatchConfigurer(BatchProperties properties, DataSource dataSource) {
this(properties, dataSource, null); this(properties, dataSource, null);
} }
...@@ -76,7 +76,7 @@ public class BasicBatchConfigurer implements BatchConfigurer { ...@@ -76,7 +76,7 @@ public class BasicBatchConfigurer implements BatchConfigurer {
* @param dataSource the underlying data source * @param dataSource the underlying data source
* @param entityManagerFactory the entity manager factory (or {@code null}) * @param entityManagerFactory the entity manager factory (or {@code null})
*/ */
BasicBatchConfigurer(BatchProperties properties, DataSource dataSource, protected BasicBatchConfigurer(BatchProperties properties, DataSource dataSource,
EntityManagerFactory entityManagerFactory) { EntityManagerFactory entityManagerFactory) {
this.properties = properties; this.properties = properties;
this.entityManagerFactory = entityManagerFactory; this.entityManagerFactory = entityManagerFactory;
...@@ -116,7 +116,7 @@ public class BasicBatchConfigurer implements BatchConfigurer { ...@@ -116,7 +116,7 @@ public class BasicBatchConfigurer implements BatchConfigurer {
} }
} }
private JobExplorer createJobExplorer() throws Exception { protected JobExplorer createJobExplorer() throws Exception {
JobExplorerFactoryBean jobExplorerFactoryBean = new JobExplorerFactoryBean(); JobExplorerFactoryBean jobExplorerFactoryBean = new JobExplorerFactoryBean();
jobExplorerFactoryBean.setDataSource(this.dataSource); jobExplorerFactoryBean.setDataSource(this.dataSource);
String tablePrefix = this.properties.getTablePrefix(); String tablePrefix = this.properties.getTablePrefix();
...@@ -127,7 +127,7 @@ public class BasicBatchConfigurer implements BatchConfigurer { ...@@ -127,7 +127,7 @@ public class BasicBatchConfigurer implements BatchConfigurer {
return jobExplorerFactoryBean.getObject(); return jobExplorerFactoryBean.getObject();
} }
private JobLauncher createJobLauncher() throws Exception { protected JobLauncher createJobLauncher() throws Exception {
SimpleJobLauncher jobLauncher = new SimpleJobLauncher(); SimpleJobLauncher jobLauncher = new SimpleJobLauncher();
jobLauncher.setJobRepository(getJobRepository()); jobLauncher.setJobRepository(getJobRepository());
jobLauncher.afterPropertiesSet(); jobLauncher.afterPropertiesSet();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment