xrabbit
xrabbit

Reputation: 735

Spring framework, @Transactional(isolation = Isolation.DEFAULT)

From the documentation: Isolation.DEFAULT

Use the default isolation level of the underlying datastore.

for other isolation levels we can read their limitations in wiki, but what about DEFAULT? How does it actually behave?

Upvotes: 5

Views: 2563

Answers (1)

JB Nizet
JB Nizet

Reputation: 692121

DEFAULT means: don't set any isolation level explicitely, and thus use the isolation level that the database uses by default.

So read the documentation of your database and driver, and see which one it uses by default. Most of the time, it's READ_COMMITTED. But some databases might have another default value.

Upvotes: 9

Related Questions