Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic


Schandha Ravi
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I have a very generic question on Isolation, though not completely confined to EJBs. We know there are two Isolation levels REPEATABLE READ and READ COMMITTED.

I know the differences between these two isolation levels and we can set this isolation levels at both application level and as well as at database level.

Question 1
What would actually happen if there are two different applications one with READ COMMITED and another with REPEATABLE READ, acting on same database table? In such cases, how is it ensured that application using REPEATABLE READ, will always get the same data?

Application 1 (REPEATABLE READ)
- > Read data from Customer table for the first time, got the SSN as "xxx-xx-xxxx"
Application 2(READ COMMITED)
- > Modified the above record, changing SSN as "yyy-yy-yyyy" and commited.
Application 1 (REPEATABLE READ)
- > At this point, how can application 1 get back the record with SSN "XXX-XX-XXXX", because it is already commited by application 2.Ideally it should see "YYY-YY-YYYY" and if so, is it not violating REPEATABLE READ.

Question 2
If the application set the transaction isolation as "REPEATABLE READ" and the database set the transaction as "READ COMMITED" which one would take precedence.
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!