This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes I need to lock the Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "I need to lock the "read" function?" Watch "I need to lock the "read" function?" New topic
Author

I need to lock the "read" function?

xiaoma wang
Ranch Hand

Joined: Mar 04, 2002
Posts: 74
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

Joined: Jan 30, 2002
Posts: 3451
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


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
 
Don't get me started about those stupid light bulbs.
 
subject: I need to lock the "read" function?