Closed
Description
As of v4, the BatchConfigurer
interface is defined as follows:
public interface BatchConfigurer {
JobRepository getJobRepository() throws Exception;
PlatformTransactionManager getTransactionManager() throws Exception;
JobLauncher getJobLauncher() throws Exception;
JobExplorer getJobExplorer() throws Exception;
}
The transaction manager is an implementation detail of the job repository. In fact, it is only used to create a transactional proxy around SimpleJobRepository
and is not used in the configuration of the JobLauncher
and the JobExplorer
. The transaction manager is defined here at an incorrect abstraction level.
The method BatchConfigurer#getTransactionManager
should be removed. The transaction manager should be configurable at the AbstractJobRepositoryFactoryBean
level.