Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

I need to lock the "read" function?  RSS feed

 
xiaoma wang
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, everybody:
In the FBM assignment, it says " Note that the locking required is effectively a "write" lock only". In my understanding, we do not need to lock the concurrently "read" activities on the record even this record is being modified by another client. Is that correct?
Thanks!
Xiaoma Wang
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Xiaoma,
That's the way I understand it even though you may get an occasional "dirty read." You just have to remember to run the sequence lock, read, modify, unlock for a booking transaction.
Hope this helps
Michael Morris
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!