Skip to content

Add warning and/or exception facility to propagating transactions that try to change the isolation level [SPR-4192] #8870

Closed
@spring-projects-issues

Description

@spring-projects-issues

Alef Arendsen opened SPR-4192 and commented

Consider the following

@Transactional(propagation=REQUIRED, isolation=Isolation.REPEATABLE_READ) public void doIt() {
otherService.doSomethingElse();
}

@Transactional(propagation=REQUIRED, isolation=Isolation.READ_COMMITTED) public void doSomethingElse() {}

This situation would essentially ignore the second isolation level. From the point of view of the second method, you're not getting the expected behavior.

It would be good if we had a facility that would allow us to configure if something like this comes up Spring would

  1. throw an Exception or
  2. issue a warning in the log

This would greatly help to prevent potential logical programming errors...


Affects: 2.5 final

Issue Links:

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions