Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2006

    Unanswered: Isolation Level in Java


    My system is using Java 1.4 and connect to DB2 UDB v8.1.1.89 by JDBC driver type 4.

    I have set isolation level = REPEATABLE_READ in Java and execute "SELECT XX FOR UPDATE", I found there is deadlock when two concurrent transaction read/update same record. While 2nd transaction is waiting for the record, system through exception once 1st transaction committed the transaction! It is expected 2nd transaction can resume to get the record instead of deadlock. Then, I do not set isolation level and execute "SELECT XX FOR UPDATE WITH RS", the concurrent transactions can be processed without deadlock.

    Do anyone know that any problem with isolation level in Java? Is REPEATABLE_READ really equivalent to "WITH RS"?


  2. #2
    Join Date
    Jun 2003
    Toronto, Canada
    Provided Answers: 1
    Isolation levels are not in Java, they are in the database manager. And no, "repeatable read" is not really equivalent to "read stability", which is what RS stands for.

  3. #3
    Join Date
    Jun 2006
    What I mean of setting isolation level in Java is:
    conn.setTransactionIsolation(Connection.TRANSACTIO N_READ_COMMITTED);
    If "repeatable read" is not really equivalent to "read stability", so may I know what "repeatable read" actually mean? Any isolation level of the database manager equivalent to "read stabliliy"?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts