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.
Charles Miller
Greenhorn
Joined: Jun 28, 2002
Posts: 19
posted
0
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.
Eduard Jodas
Ranch Hand
Joined: May 14, 2002
Posts: 80
posted
0
I'm not completely sure but I think you can't open a random access file twice for update. Anyway, jdk1.4 allows you to lock a file.
Chiji Nwankwo
Ranch Hand
Joined: Jun 21, 2002
Posts: 56
posted
0
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"
Local mode and server mode will be using different db.db files. Or should I jsut say that the assessor will not run both at the same time. Don't worry about this situation. Mark