Hi Paul: I just read your recent post about -- "modifying a record" and "booking a seat" are operations defined at different abstract level. I think I have a better understanding of this project now. Lock/unlock are not about business logic. Business logic wouldn't accept -1 for seat, just like "AAA" for airport, or "BBB" for day. Business logic can be implemented through modify() methods, i.e. use a if statement. Then what lock/unlock are all about? Without them, users will race for write. Now with lock/unlock, users race for read. Instruction gives a example: lock -> read -> modify -> write -> unlock. Without lock/unlock, then this pic will be : lock -> modify (write) -> unlock. Here lock is provided by synchronized methods. There were many problem with each model. For the instruction model: (1) It is unknow how long it will take for the process, user could lock the record, then something come up, then forget all together, and this record is left to be locked. (2) An user try to book a flight when the record was locked already. Then what should you tell the user, "Another user is booking this flight, you can read it only, when can you book it? don't know, you have to try from time to time"? For this project, I think these things are required as basic: (1) criteriaFind(), lock(), unlock() methods ; (2) server class ; (3) client class (local and remote) with GUI ; (4) more business logic: booking flight, more search methods. (5) communication between server/client ; The bottom line is that user want to get all kinds of flight information and possiblly book flight through this system. Please comment. Thanks, Don
hi there, well i dont need to say anything my question is straight. yes i need to know more about this lock/unlock method and if possible do send me a link to the javaworld article on lock and unlock. if you have it with you
posted 18 years ago
Did you write all those books, just curious. Don
Evacuate the building! Here, take this tiny ad with you:
Devious Experiments for a Truly Passive Greenhouse!