4 Replies Latest reply on Mar 26, 2009 5:50 AM by Manik Surtani

    Differences READ_COMMITTED vs REPEATABLE_READ

    Ignacio Alvarez Newbie

      Hi all,

      I'm testing JBoss Cache by using a JPA/Hibernate application. I'm configuring the cache with MVCC and changing the isolation from READ_COMMITTED to REPEATABLE_READ but don't see any differences. My test case is something like 2 transactions writing to the same entity bean which is stored in JBC:

      1.- T1 and T2 starts and reads the EB from the cache.
      2.- T1 modifies an attribute of the EB and commits. JBC and database reflects the new value.
      3.- T2 re-reads the EB, which still has the values before T2 started.
      4.- T2 modifies the same attribute of the EB and commits. JBC and database reflects the new value.

      Is this the correct behaviour with the two isolation levels?
      How the test case should be for the isolation to make a difference?

      Thanks in advance.