The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
BEA 8.1 Certified Administrator, IBM Certified Solution Developer For XML 1.1 and Related Technologies, SCJP, SCWCD, SCBCD, SCDJWS, SCJD, SCEA,
Oracle Certified Master Java EE 5 Enterprise Architect
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
BEA 8.1 Certified Administrator, IBM Certified Solution Developer For XML 1.1 and Related Technologies, SCJP, SCWCD, SCBCD, SCDJWS, SCJD, SCEA,
Oracle Certified Master Java EE 5 Enterprise Architect
BEA 8.1 Certified Administrator, IBM Certified Solution Developer For XML 1.1 and Related Technologies, SCJP, SCWCD, SCBCD, SCDJWS, SCJD, SCEA,
Oracle Certified Master Java EE 5 Enterprise Architect
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
BEA 8.1 Certified Administrator, IBM Certified Solution Developer For XML 1.1 and Related Technologies, SCJP, SCWCD, SCBCD, SCDJWS, SCJD, SCEA,
Oracle Certified Master Java EE 5 Enterprise Architect
BEA 8.1 Certified Administrator, IBM Certified Solution Developer For XML 1.1 and Related Technologies, SCJP, SCWCD, SCBCD, SCDJWS, SCJD, SCEA,
Oracle Certified Master Java EE 5 Enterprise Architect
wouldnt locking the suncertify.property file be out of the scope of the assignment
I have used Property to read all the properties then update the necessary ones for a particular program then write them all back to the file
Andrew: creating an exclusive lock to ensure that only one application can do an update on the file
Billy: isn't fileLock platform depended so its against the spirit of the SCJD exam
Atomically creates a new, empty file named by this abstract pathname if and only if a file with this name does not yet exist. The check for the existence of the file and the creation of the file if it does not exist are a single operation that is atomic with respect to all other filesystem activities that might affect the file. This method, in combination with the deleteOnExit() method, can therefore serve as the basis for a simple but reliable cooperative file-locking protocol.
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Originally posted by Mark Spritzler:
You can't do that logically with one properties file. You have to have each client have their own properties file for their own configuration. This file is included with the client.jar. And the server has its own properties file that is in the server.jar.
Mark
suncertify.properties which must be located in the current working directory.
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>]
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>]
suncertify.properties which must be located in the current working directory.
When you submit your assignment, each part (client and server) must be executable using a command of this exact form:
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.
All elements of your submission must be packaged in a single JAR file. The JAR file must have the following layout and contents in its root:
The executable JAR containing the programs. This must be called runme.jar.
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Originally posted by Mark Spritzler:
That is what I mean by you should have two seperate files. How can you maintain one file when there are more than one machines accessing it. And then you have the scenario where you have 100 clients all running the app, and they are all on seperate machines, and each want to run a different configuration.
Mark[/QB]
SCJP, SCJD, SCWCD, SCBCD, SCEA, SCJP6
To be obtained: SCEA 5
Originally posted by Andrew Monkhouse:
Hi Mark
Nice solution, but it doesnt meet the requirements (didn't you psychically pick up on the ones not mentioned? )
So, if there can only be one runme.jar which contains all the code for both client and server, and both client and server must store their configuration in suncertify.properties, then you would have to allow for the case where both client and server are started from the same directory.
Regards, Andrew
SCJP, SCJD, SCWCD, SCBCD, SCEA, SCJP6
To be obtained: SCEA 5
BEA 8.1 Certified Administrator, IBM Certified Solution Developer For XML 1.1 and Related Technologies, SCJP, SCWCD, SCBCD, SCDJWS, SCJD, SCEA,
Oracle Certified Master Java EE 5 Enterprise Architect
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Originally posted by Andrew Monkhouse:
Hi George,
If you are doing the older Airline assignment then most of this topic does not apply to you, and you can package your assignment the way you suggested. You should see the section of your instructions marked "Deliverables" for more information.
However, if you are doing the new assignment (Writing a Contractors application or a Hotel application), then you should check for instructions similar to the ones I listed above, including the first bullet point I took from the section "Packaging of Submissions".
The way I read the instructions, you will have one jar file for the submission. The name of it is not specified in the instructions, but is usually specified when you are about to upload the assignment. For the sake of clarity, I will call this jar file scja.jar.
In the root directory of scja.jar, you will have the "runme.jar" file which must be executable. It will not be unpacked by the examiner, and it must have both client and server code in it.
There are more files and directories that will go into scja.jar, but they are not applicable to this topic, so I wont list them here.
Regards, Andrew
SCJP, SCJD, SCWCD, SCBCD, SCEA, SCJP6
To be obtained: SCEA 5
Originally posted by George Fung:
Hi Andrew,
my assingemnt is new one (contrator). Could you suggest the structure of the scja.jar?
In my requirement "When you submit your assignment, each part (client & server) must be executable using a command of this exact form:
java - jar <path_and_filename> [<mode]>
So, is runme.jar for server or client side? Also, server and client side has different suncertify.properties. right?
Thanks,
George
It's a tiny ad. At least, that's what she said.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|