Hi, Mark
Thank you.
I think it is hard for me to deal with the dead during the lock, anyway, I will handle other dead situation.
try {
lock(rec);
booking.processBooking();
unlock(rec);
}
catch (Exception e) {
JOptionPane.showMessageDialog(null,"Sorry, your booking process is unsuccessful.\n"+
"The reason is: "+e.getMessage(),"Booking Error",JOptionPane.ERROR_MESSAGE);
}
finally {
lock.unlock(rec);
return booking.isSuccess();
}
I have another FlightBooking class to handle the booking and the LockManager for lock which uses the recordnumber and the RemoteDataAccess as argument.
How do you think?
ying Ren