jQuery in Action, 3rd edition
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Locking more than one records.. 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 "Locking more than one records.." Watch "Locking more than one records.." New topic

Locking more than one records..

Pallav Grigo

Joined: Mar 29, 2002
Posts: 29
Hi..I've read some posts on how the Connection object for each client implements the Unreferenced interface...so that it unlocks "all" the locksthat it currently holds...Here's my problem...in my design..the client can only book one flight at a time..although he/she can enter the number of seats..so they get only one lock at a time..so can i just keep the current lock in an int variable and then unlock that in case the client crashes?
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Pallav, if you can guarantee that it will ever forever only have one lock at any time, then you should be fine.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
I think the key issue here is that "Your user interface should be designed with the expectation of future functionality enhancements".
This may mean that a future enhancement could be select a route and book all available seats. This would mean that more than one row would be locked until the seat booking request had been executed.
I agree. Here's the link: http://aspose.com/file-tools
subject: Locking more than one records..
It's not a secret anymore!