Skip to content

Spring batch doesn't support multiple job repositories (or 1 repository with shifting data source) in the same JVM [BATCH-2476] #1126

Closed
@spring-projects-issues

Description

@spring-projects-issues

Gustavo Lopes opened BATCH-2476 and commented

The static StepSynchronizationManager.manager keeps state in such a way that it becomes impossible to run at the same time two steps belonging to different jobs but where:

a) the jobs have the same id,
b) the steps have the same name and
c) the steps have the same id.

This situation may arise if more than one repository is in use (or there is one repository, but it uses different data sources at the same time).

See the linked StackOverflow thread for more details. The problem can be reproduced with https://gist.github.com/cataphract/6b0619a2e28ec3b36739


Affects: 3.0.6

Reference URL: http://stackoverflow.com/a/35544379/127724

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions