If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > JAVA > Isolation Level in Java

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-29-06, 23:44
miyuki miyuki is offline
Registered User
 
Join Date: Jun 2006
Posts: 21
Isolation Level in Java

Hi!

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"?

Thanks!
Reply With Quote
  #2 (permalink)  
Old 07-06-06, 21:31
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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.
Reply With Quote
  #3 (permalink)  
Old 07-31-06, 02:58
miyuki miyuki is offline
Registered User
 
Join Date: Jun 2006
Posts: 21
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"?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On