aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes update-locking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "update-locking" Watch "update-locking" New topic
Author

update-locking

Goran Borozan
Greenhorn

Joined: May 26, 2004
Posts: 14
Hi !
In my GUI i hava a pop-up dialog that allow the user to book room.
My question is: Is it better to try to lock when the pop-up window creates(risk that the user forget the window and tge record is locked) or lock when the user is finished with writing the owner name(risk for overwriting)?



Thanks
/Goran


SCJP, SCJD, SCA (in progress)
Serkan Yazici
Ranch Hand

Joined: Apr 24, 2004
Posts: 33
Hi Goran,

I think it would be better the minimise the amount of time after locking a record. In my project, I didn't display a dialog for booking (handled on the main gui) but if I did; I would do the booking after the dialog but also check for record inconsistency (making sure the record key is not changed).


-- SCJP 1.4 (98%), SCJD (98%), SCWCD (96%), OCA Dev (97% avg.), SCBCD (97%), SCJP 1.5 BETA (90%)<br />-- OCP Dev (maybe), MCDBA (probably) SCEA (eventually)<br />-- Haven't tried Firefox yet? Free, open, secure, fast, tabified, and slick!<br />-- <a href="http://www.mozilla.org/products/firefox/" target="_blank" rel="nofollow">http://www.mozilla.org/products/firefox/</a>
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: update-locking