Locking
Your server must be capable of handling multiple concurrent requests, and as part of this capability, must provide locking functionality as specified in the interface provided above. 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. Any attempt to lock a resource that is already locked should cause the current thread to give up the CPU, consuming no CPU cycles until the desired resource becomes available.
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Sean Keane wrote:
Client running in network mode does not specify any DB file.
When you submit your assignment, each part (client and server) must be executable using a command of this exact form:
java -jar <path_and_filename> [<mode>]
Your programs must not require use of command line arguments other than the single mode flag, which must be supported. Your programs must not require use of command line property specifications. All configuration must be done via a GUI, and must be persistent between runs of the program. Such configuration information must be stored in a file called suncertify.properties which must be located in the current working directory.
The mode flag must be either "server", indicating the server program must run, "alone", indicating standalone mode, or left out entirely, in which case the network client and gui must run.
You must not require manual editing of any files by the examiners.
Jeff Philp wrote:Maybe a fictional scenario is a good way of explaining this:
Situation 1:
There is only one computer in the office which has the database on it, the user is also using that machine.
In this situation the user would type java -jar [] alone
and specify on a configuration screen the required settings for accessing the database on the local machine
Situation 2:
There are many computers in the office, and 1 server which has the database on it.
On the server you would type:
java -jar [] server
and specify on a configuration screen the required settings
All the users would type
java -jar [] (no argument)
and specify on a configuration screen the required settings
Jeff Philp wrote:
Hopefully I have not confused you more.
Jeff Philp wrote:There is a single jar file which needs to contain both the client and server code. As jar files can only have a single point of entry you need a single main method which can interpret the command line argument and launch the appropriate application.
At the command line you would be typing
java -jar runme.jar alone For standalone mode
java -jar runme.jar For network client mode
java -jar runme.jar server For the server
Ray Dawson wrote:
Sean Keane wrote:
Client running in network mode does not specify any DB file.
In the standalone mode, I have given the ability to the user to specify which db to use.
Then shall I hard code the location of the db file for the networking mode ? If so then what should I provide as the permanent server address ?
How do I allow the user to switch between modes ?
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Ray Dawson wrote:I'm kind of rushing through the assignment to submit it before 1st oct so that I dont have to pay for the course.
I never worked with any network based program, simply did core level stuff.
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Ray Dawson wrote:I agree with you that I'm missing few of the skills required for the certification.
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Ray Dawson wrote:If I dont complete before that I dont have the money to go through training & thus my cert run ends here
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
I have a knack for fixing things like this ... um ... sorry ... here is a consilitory tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|