File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Bookseats flow! 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 "Bookseats flow!" Watch "Bookseats flow!" New topic
Author

Bookseats flow!

Vikas Sood
Ranch Hand

Joined: Sep 03, 2002
Posts: 109
Hi friends '
My bookSeats method has the flight number and no of seats to be booked as parameter.
First of all i use find of Data class to find a record for this flight number.From the record i get hold of record number for the record.
With this record number as a parameter i call lock(int recNum),then getRecord(int recNum)for retriving the record,after that a check for available seats is run from which no. of seats to be booked is subtracted,then unlock(int recNum) is called.
Is this flow appropriate.
VikasSood
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Sounds great to me. you are basically Lock-Read-Modify-Unlock.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Bookseats flow!