Joined: Fri Jan 20, 2006 4:17 pm Posts: 6 Location: João Pessoa - PB - Brazil
|
Hibernate version: 3.1
Mapping documents: <property name="connection.isolation">2</property>
Name and version of the database you are using: MS SQL Server 2000
Hi all,
I'am testing the isolation level read commited where permits unrepeatable reads but not dirty reads. In my test I create two threads A and B being executed as it follows:
A -> open session and transaction
A -> load a entity Product with id = 100
A -> I modify the properties of this entity but not commited the transaction
A -> I executed the command Thread.sleep(5000) to a thread A to stop 5 seconds.
B -> open session and transaction
B -> load the same entity with id=100 (it would not have to happen)
B -> read the properties of this entity.
B -> close the session
A -> (after 5 seconds) commit the transaction
A -> close the session
How the transaction of thread B load information that they are being modified for another transaction (thread A) and still had been commited if read commited prevents dirty reads?
I am thankful anticipatedly
clodoaldojr
Sorry for my english, I'm brazilian and i don't now very english.
_________________ Clodoaldo da Silva Gouveia Júnior
UFPB - Bachelor Degree
CEFET-PB - Technology Degree
Phoebus Technology - Trainee
|
|