To change(wirte) this file, is it need to be thread safe. Is it possible that 2 client want to set port or host to different values at the same time?
1. By using sytem.getProperty("user.dir") to get the directory where suncertify.properties sits, you'll have as many files as you have JVM start directories. If you start the server and a client on the same machine and from the same directory, you'll get one suncertify.properties file. On two different machines and/or if the JVM is started from different directories, you'll have two different files. Notice that you have *no control* on the way your application is started.
5. No. The suncertify.properties file is always local to the application which uses it.
What does IMO mean? What do "magic cookie could be a constant IMO" and "Its acceptable IMO" mean?
prefix your property names with "server." and "client." to make sure that server and client property names never collide
SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
And if you have a server GUI, does it stay visible the whole time the server is running so you can shut it down?
Originally posted by Peter Yunguang Qiu:
Both server and client use the same suncertify.properties file and use the same values. Is that OK?
If the client and server are on different machines then you obviously can't use the same suncertify.properties file.
I don't understand in what situation 2 properties files are needed.
1 properties file but 2 sets of value(example: server.port, client.port).
SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
The assignment is packed in a single file "runme.jar". It can run in networked mode or non-networked mode. It CANNOT be seperated.
SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Regards, George
SCJP, SCJD, SCWCD, SCBCD
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.
Originally posted by David Chan:
But according to the sun requirements, to change config value it must be done via a GUI. Then, does it mean server must have a GUI?
Regards, George
SCJP, SCJD, SCWCD, SCBCD
It seems to me that the executable running in both client and server modes must have a GUI to allow the user to configure such items.
Don't get me started about those stupid light bulbs. |