This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Just wondering what the general consensus is regarding file-level locking in the assignment. Without it, it is entirely possible to have a server running, with 2+ clients working happily with record-locking maintaining consistency in the servers JVM, but what happens, say, if I start up another client (in local-mode this time), and the file I pick happens to be the database file that the server is currently using. If the record-locking is maintained in the servers JVM, then the additional local client won't know anything about the servers locks, and might well update the database, causing corruption in the file.
That's a valid point and, as you have probably figured out, the instructions don't cover that. For my submission, I made note of that in the user documentation... that if a connection to a particular database is in local mode, that no other connections should be made to that database (local or remote). Hopefully my solution is sufficient.
I was under the impression that we needed 2 copies of the db.db file. One that resides on the client side and the other residing one the server side. This way there would be no conflict. Please correct me if I am wrong in thinking that. Chiji
SCJP, SCJD, SCWCD<br />"Meekness is not weakness, but power under control"