Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Serializable isolation in EJB  RSS feed

 
haris hameed
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a session bean with a method having the following transaction attribute
<isolation-level>TRANSACTION_SERIALIZABLE</isolation-level>
And iam doing the following .
Step 1 :
iam reading a set of rows for a search criterea from the Table and make the flow(thread) to wait by executing a for big loop and again iam reading a set of rows for the same previous search criterea .
Step 2 .
During the waiting period iam executing another query which inserts a record that satisfies the above search criteria .
Since the transaction is TRANSACTION_SERIALIZABLE it should not allow the step2 to insert the record .
But for me in the step 2 the record is getting inserted.
Can any one please point out my mistake here.
Iam using Weblogic Server ,TXDatasource and Oracle database.
Thanks in advance
Haris
 
Rufus BugleWeed
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're ability to insert a tuple into a given
table is not limited by transaction_serilizable.
You have not been involved in a phantom or a
dirty read. The data store is not repeatable
read, because you changed it! This is allowed.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!