wood burning stoves 2.0*
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: I need to lock the "read" function?