Closed
Description
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
- Call any
JobExplorer
method without an active transaction.
Expected behavior
The call works without issuing warnings.
Minimal Complete Reproducible example
demo1.zip
- Unzip
- Run
mvn spring-boot:run
The app calls JobExplorer#getJobInstanceCount()
from a CommandLineRunner
, which issues the warning mentioned above.