Transaction.setIsolation() #5091
Replies: 1 comment 6 replies
-
Actually from what I can tell, in JTA environments you generally cannot set isolation level per Connection as this is something managed at the DataSource level. I'm not very keen on exposing this if we cannot support it consistently. One option is to simply set the isolation on the underlying Connection regardless of local or JTA transactions and let the user deal with the ramifications (inconsistent). Another option would be to restrict this to just local transaction use cases. Another consideration is how to handle this for databases which do not support certain isolations. I guess the elephant in the room is what kind of guarantees we we envision here |
Beta Was this translation helpful? Give feedback.
-
@Sanne has pointed out that it's currently quite inconvenient to change the transaction isolation level, even though JDBC has an API for that.
I think it should be relatively straightforward to add a
setIsolation()
method to theTransaction
interface.WDYT?
Beta Was this translation helpful? Give feedback.
All reactions