Closed
Description
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
- throw an Exception or
- issue a warning in the log
This would greatly help to prevent potential logical programming errors...
Affects: 2.5 final
Issue Links:
- Doc: @Transactional.isolation does not guarantee the specified isolation level [SPR-16463] #21008 Doc:
@Transactional
.isolation does not guarantee the specified isolation level