Skip to content
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

Incorrect transaction manager configuration in BatchConfigurer #4191

Closed
fmbenhassine opened this issue Sep 13, 2022 · 0 comments
Closed

Incorrect transaction manager configuration in BatchConfigurer #4191

fmbenhassine opened this issue Sep 13, 2022 · 0 comments

Comments

@fmbenhassine
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant