posted 23 years ago
All,
I have a little doubt about the design. There are two ways that you can implement the application the right way would be to complete the db have a session Facade Layer which also servers as the Remote server on the data base. this server will have 4 methods for booking a flight, searching a flight and getting all the airports. which is the way it should be the client does not need to make the direct calls on the data base server. Now for a typical reservation the client will get the remoteObject call the bookSeats(recNo,seats) method on it the server will do a getRecord(recNo) do a lock on the record and modify the rec and than do a unlock. In this case you don't need to keep the track of the client all the other clients have to wait before the current client releases the rec by doing a unlock.
Now the other approach which the assignments specifies is to hava all the public methods defined in suncertify.db.Data class in your client. that means if the client needs to make a reservation he has to first look the record than call the modify method and than the unlock method. So you are doing the complete transaction on the network which will decrease your performance and also you have to track the client ID when unlocking.
does this makes sense....
how have you guys/gals implemented it. plz respond asap as I have to follow a deadline and submit my exam this weekend.
Aslam