Thanks, just to clarify the point of locking. We're already guaranteed that each operation on the Data object is atomic (due to the methods being <code>synchronized</code>. Obtaining a lock means a client can read a record, process for a few seconds, and then write a new result back without fear that the data has changed, potentially causing race conditions.
You seem to be suggesting that we add methods to make the operations of booking a seat atomic. i.e. The client does not call getRecord() and modify(), it calls a new method bookSeat() which does all this for it invisibly. However, I'm worried by this part of the instructions given to us in the project download:
<h3>Writing Data Client</h3>
To connect with your server,
you should create a client program. This implementation should include a class that implements
the same public methods as the suncertify.db.Data class, although it will need different constructors to allow it to support the network configuration.
I'm not sure whether creating such atomic operations is a valid solution to the project?
Any thoughts? Thanks, Dave
[This message has been edited by Dave Boden (edited February 15, 2001).]