Isolation Levels
When applied to transactions, the term isolation
level
refers to how well one transaction is
isolated from another. Oracle’s default transaction isolation
level is read committed. You can get the
current isolation level for a connection by using the
Connection object’s
getTransactionIsolation( ) method. You can set the
transaction isolation level by calling the
Connection object’s
setTransactionIsolation( ) method and passing one
of the two valid constants:
TRANSACTION_READ_COMMITTED or
TRANSACTION_SERIALIZABLE. Oracle’s
read serializable isolation level will give
you a consistent view of data from multiple tables since the last
commit or rollback. Essentially, you see a snapshot of the tables as
they existed when the transaction started. This is as opposed to read
committed, which allows you to see changes during your transaction as
soon as other transactions commit.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access