Your current technique is certainly in violation of the EJB spec. Load the file into a ResourceBundle, there is plenty of documentation on how to do this.
Reply from Sun Microsystems: Don't worry about automated tests. We stopped using automated testing several years ago. Your assignment specs probably mentioned about software testing. The software testing only tests the following:
1) Your JAR file contents. They must conform to the specs (such as the folders you must have and so on).
2) Test if you illegally modify the interface given to you, and test if your implementation class implements that interface (once again, indirect implementation is allowed).
More than that, for this use there is a real reason not to use a synchronized collection. You need to have you own synchronized methods or blocks so that you can use wait and notifyAll. These blocks will access the collection. If the collection is also synchronized, you will have nested synch blocks, which are a bad idea since they encourage deadlocks and they interfere with performance.
Hashtable is somehow a "legacy" data structure in Java.
When you submit your assignment, each part (client and server) must be executable using a command of this exact form:
For update, first I check if the record is being locked by the specified cookie within the HashMap sync block. Then I perform the actual I/O update out of the sync block.
For delete, I do similarly as update, but include another HashMap sync block after delete to remove the locked record.
Which leads me to 2 options:
A) create an abstract class or interface and have 3 different "option window" types that extend/implement that. A factory object can crank out the right one, depending on the mode.
B) create only one window type for options and use the mode flag to determine which fields are shown.
A sounds cleaner, but I think it may be overkill.
B sounds like less code and probably less repetitive code, but it may be messy.
What do you guys think? Any feedback is appreciated.
Do you really need the file location either?
Your choice of RMI or serialized objects will not affect your grade, but no other approach is acceptable. In either case, the program must allow the user to specify the location of the database, and it must also accept an indication that a local database is to be used, in which case, the networking must be bypassed entirely.