Skip to content

Allow override factory properties in user-defined configurer subclass #588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,28 @@ protected JobLauncher createJobLauncher() throws Exception {
return jobLauncher;
}

protected JobRepository createJobRepository() throws Exception {
protected JobRepositoryFactoryBean createJobRepositoryFactory() {
JobRepositoryFactoryBean factory = new JobRepositoryFactoryBean();
factory.setDataSource(dataSource);
factory.setTransactionManager(transactionManager);
return factory;
}

protected JobExplorerFactoryBean createJobExplorerFactory() {
JobExplorerFactoryBean factory = new JobExplorerFactoryBean();
factory.setDataSource(dataSource);
return factory;
}

private JobRepository createJobRepository() throws Exception {
JobRepositoryFactoryBean factory = createJobRepositoryFactory();
factory.afterPropertiesSet();
return factory.getObject();
}

protected JobExplorer createJobExplorer() throws Exception {
JobExplorerFactoryBean jobExplorerFactoryBean = new JobExplorerFactoryBean();
jobExplorerFactoryBean.setDataSource(this.dataSource);
jobExplorerFactoryBean.afterPropertiesSet();
return jobExplorerFactoryBean.getObject();
private JobExplorer createJobExplorer() throws Exception {
JobExplorerFactoryBean factory = createJobExplorerFactory();
factory.afterPropertiesSet();
return factory.getObject();
}
}