Network Approaches
Your choice of RMI or serialized objects will not affect your grade, but no other approach is acceptable. In either case, 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. No authentication is required for database access.
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 program must allow the user to specify the location of the database
Q:How to specify the location of the database?
a local database is to be used, in which case, the networking must be bypassed entirely.
Q:How to understand this section saying?
Q:What's the single mode flag?
Q:What's the suncertify.properties file?
What's the format for this file?
How to use???
When do I specify the location of the database after running?
I don't understand the question
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.
"I'm not back." - Bill Harding, Twister
We can't pass port or DB location to the server. We can read this from the properties file, but since we also need to be able to edit the properties with a GUI...
Originally posted by Jim Yingst:
By and large, they're talking about the client configuration here. Which server, which port, etc. In terms of the server, the only things you need to pass in are legal command line arguments, like port, mode, db location, etc.
I think there are different versions of the requirements floating about here. Dunno about Tony, but my assignment includes the same line quited by xi ruo above: "Your programs must not require use of command line arguments other than the single mode flag, which must be supported." We can't pass port or DB location to the server. We can read this from the properties file, but since we also need to be able to edit the properties with a GUI, and we can't specify whether or not the GUI properties editor is started up as part of the server (vs. simply starting the server with no GUI at all, the way we'd probably prefer) it seems that our only choice is to always start up some sort of GUI whenever the server is started, which at least offers the option of editing the properties before continuing. So maybe the "GUI" for the server is just a short popup that you dispose of before the server really starts. But it seems like there has to be some sort of minimal GUI here, for me an xi ruo at least, and probably Tony, and anyone else with the same mix of requirements1. Kinda sucks because this makes it hard to start up the server with a simple startup script or cron job the ways many sysadmins would prefer, but that's what [our version of] Bodgett & Scarper seem to have stuck us with...![]()
Tony's server GUI sounds a little more involved than mine. Mine just says "here are the server config values" and you either edit them or don't, then press OK. Then the new values are saved and the rest of the server starts up. The only other thing needed is an exit - I just let the user hit ^C or whatever. Tony's version could be a little more elegant in this regard, since there's still a window up while the server is running.
[ September 15, 2003: Message edited by: Jim Yingst ]
"I'm not back." - Bill Harding, Twister
Ummm... Keep It Simple? Yes, I do sometimes follow this advice. Basically I was getting tired of playing with layout managers for more complex screens (GUIs aren't really my thing) so I went with the simplest design I could think of for this part.
And aside from the extra effort for the GUI design - how do you do something like let the user change, say, the port number, without stopping and restarting the server?
I promised to myself to keep everything as simple as possible ...
Additionally I think using CTRL-C for stoping the server is bad, as it's effectivelly a user controlled crash so you lose control of actions that should be carried out when you close down the server, i.e saving the properties file.
Does anyone have the opinion that there is more work in the new assignements than the old ones.
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
"I'm not back." - Bill Harding, Twister
Eliminate 95% of the weeds in your lawn by mowing 3 inches or higher. Then plant tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|