Skip to content

Calling JobExplorer outside of a transaction logs warnings about the isolation Level not being applied #4230

Closed
@kzander91

Description

@kzander91

Not sure if this is a bug or just a documentation issue.

Bug description
As of Batch 5, calling any JobExplorer method without an active transaction produces the following warning:

2022-11-11T23:33:19.650Z  WARN o.s.jdbc.support.JdbcTransactionManager  : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED

The cause seems to be the changes made with #4195. As of these changes, JobExplorer is transactional with PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED, causing the warning being logged if called outside of a transaction.

Environment
Spring Batch 5.0.0-RC2

Steps to reproduce

  1. Call any JobExplorer method without an active transaction.

Expected behavior
The call works without issuing warnings.

Minimal Complete Reproducible example
demo1.zip

  1. Unzip
  2. Run mvn spring-boot:run

The app calls JobExplorer#getJobInstanceCount() from a CommandLineRunner, which issues the warning mentioned above.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions