The jar that you end up shipping contains both client and server code. Then depending on what mode the jar is run in it will look for the database file. So in the case of client and server on two physically seperate machines the client is run in client mode and does not look for the file, the server is run in server mode and looks for the file. In the case of standalone mode the client is on the same physical machine as the database file and it finds it.
posted 14 years ago
Machine A contains the database. Machine A contains the client. Machine B contains the server.
When run in server mode, not local mode by the client, the server has to make a network connection to Machine A. Right?
When run in client mode, locally where the client makes NO network connection to the server, the client connects to the database on the same machine it is on. Right?
It just seemed strange that the client has to make a network connection to the server, but then the server makes a connection to the machine the client is on because the database is on that same machine. Right?
Originally posted by Robert Aragon: I guess everyone who has turned in their assignment and passed, has done so so that it works on ONE machine. server, client, and database are all on the same machine, right? Whew.
It should work on one machine and of course during my development that is how I tested it. However, it must also work when client and server are on different machines and it is very important that you test that that works, because if it doesn't work, you will probably fail the assignment.
SCJP 1.4, SCJD
"I know this defies the law of gravity... but I never studied law." -B. Bunny Defiant tiny ad: