Skip to content

Incorrect transaction manager configuration in BatchConfigurer #4191

Closed
@fmbenhassine

Description

@fmbenhassine

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions