Originally posted by Robert Ooster:
Why can't I just make the read, update and delete operations synchronized? Wy this scheme with locking cookies? Is there any good material on the net that explains this and the various other locking stuff?
R
I think you
can make them synchronized, however all this will do is ensure that only a single
thread is running in the methods..
You still need to handle lock/unlock (with cookies depending on your assignment). The fact that only 1 thread is running in read/update/delete doesn't change the fact that the records must be lock/unlock.
The cookie is a mean to make sure that only the
owner of the record can update/delete.
In order to allow concurrent read/update/delete I did not use synchronized methods...
Hope this helps
Alex
[ April 03, 2008: Message edited by: Alex Belisle Turcot ]