B&S 2.2.1 Gui Display After a Booking

You may assume that at any moment, at most one program is accessing the database file; therefore your locking system only needs to be concerned with multiple concurrent clients of your server.

Network Server and Client

If I run the server and then run several clients and then book a contractor in one of them, when I do a search/search all in another client, the client has been updated with the booking when the search is displayed.

My data object singleton is created by my ServicesImpl class when Server mode is run so I have no problems with Network Clients.

Standalone

If I have another JVM running with the Standalone client, this display is not updated on a search/search all but only refreshed with the booking information if I restart the Standalone client.

Although my Data object is a singleton, the Standalone client will create one as this is running in a separate JVM.

I am using a cache to store the contractor records for less disk usage, which means that the Standalone has a seperate cache to the Network client when the data singleton is instantiated.

If I run the server and then run several clients and then book a contractor in one of them, when I do a search/search all in another client, the client has been updated with the booking when the search is displayed.

I did the same thing.

If I have another JVM running with the Standalone client, this display is not updated on a search/search all but only refreshed with the booking information if I restart the Standalone client.

The specification isn't really clear if we can run the application more than 1 time in standalone mode on the same machine. So, I assumed that only one instance of the application would run in standalone mode or in client mode, not both at the same time. So, you don't have to worry, for instance, if 2 instances of the application are running in standalone mode on the same machine. You may assume that, a client either runs the application in standalone mode or client mode. Just put it in your choices.txt and you'll be fine!