Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Is it necessary flush data of buffer for booking seats? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Reply Bookmark "Is it necessary flush data of buffer for booking seats?" Watch "Is it necessary flush data of buffer for booking seats?" New topic
Author

Is it necessary flush data of buffer for booking seats?

Francisco Carlos
Greenhorn

Joined: Aug 30, 2002
Posts: 6
I am building a FBNTester for test my application
by simulating several clients accessing DataServer server.
The mechanism of lock and unlock seems are right, but I note that suncertify.db.modify() dont flush
buffer immediatly.
In my test, i have a client that read the available seats number.. and i had a surprise when
i observe that the available seats number read by that client wasn�t incorret??? I think that each a of that clients (A, B, C, etc) read the record of db.db and store in a buffer.
For example:
client A read 120 seats of flight X
client A booking 2 seats
client B read 120 seats of fligh X
client A booking 2 seats
The JVM stores 118 left seats.
The right would be 116 lefts seats.
The clients A, B, etc call the bookSeats() method
of DataAccessFacade.
I implemented a DataAccessFacade class that a method bookSeats. That method call the methods modify(), lock() and unlock().
Some sugestion???
Francisco Carlos
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is it necessary flush data of buffer for booking seats?
 
Similar Threads
Confused- Urgent!!!
Bookseats flow!
FBNS - Lock and Unlock .. confused
no need to lock! ??
find problems in my design/locking mech