Keep in mind that networking must be entirely bypassed in the non-networked mode.
not use the network server code at all
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.
Originally posted by Ken Kirin:
ON A SERVER MACHINE
[list]Runs a database server application by setting the server database file for servicing its remote clients at c:\db2x1.db Runs a local client application and selects the local database file at c:\db2x1.db Now both applications are sharing the database file, before getting a lock object in the local client application it can check whether the local database file and server database file is actually the same by looking into the property file.
Originally posted by Ken Kirin
Runs a database server application by setting the server database file for servicing its remote clients at c:\db2x1.db Runs a local client application and selects the local database file at c:\db2x1.db
From the instructions
You may assume that at any moment, at most one program is accessing the database file
Based on my (reasonably motivated but arbitrary) interpretation of the instructions, the instructions do not preclude standalone app and remote app running simultaneously.
Originally posted by Jeff Bosch:
Hi, Steve -
Why do you place your entire post within code tags? That's usually meant only for code snippets.
Originally posted by Steve Schooler:
No other way to specify pre-formatting. Some forums allow [pre] ... [/pre], but JavaRanch doesn't seem to. Code box soemwhat misleading, but seems preferable to UNcontrolled formatting. Tightly controlled indentation often needed for clarity.
Originally posted by Andrew Monkhouse:
Under any other circumstance, the client and server will be running in different JVMs. Which means that you will have two programs accessing the database file (contradicting the instructions).
From Sun assignment instructions:
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.