GeeCON Prague 2014*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes NX:Contractors database location Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "NX:Contractors database location" Watch "NX:Contractors database location" New topic
Author

NX:Contractors database location

Bill Robertson
Ranch Hand

Joined: Mar 21, 2003
Posts: 234
I need some assitance on understanding the directions. My project states:
"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."
Question: What exactly do the mean by "allowing the user to specify the
location of the database?
Do they mean for network mode identifying just the server? Or do they
mean the server AND the directory on the server in which the database
is actually stored?
If both how do you map a directory to a server you database is running on?
(In local mode this is easy but I am lost on how to do this in server
mode). If we prompt the user for the directory, how do we look up the
directory on the server side?
Mike Southgate
Ranch Hand

Joined: Jul 18, 2003
Posts: 183
It doesn't say the client has to be able to specify the server's database file. It only says 'the program' must be able to do it. I created a properties file and a properties editor dialog that specified that. You might also want to consider specifying things like the server's url, port #, and symbolic name it's registered with (if using RMI).
ms


ms<br />SCJP, SCJD
Bill Robertson
Ranch Hand

Joined: Mar 21, 2003
Posts: 234
For standalone mode should we request the path of the DB file?
Or simply read from a properties file
Bill Robertson
Ranch Hand

Joined: Mar 21, 2003
Posts: 234
so are you saying we do not need directory information when connecting
the network gui to the server?
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
For standalone mode should we request the path of the DB file?
Or simply read from a properties file

You need to be able to do both, I think. The info may be stored in a properties file, but the user should be able to edit/change the info using the GUI you provide. (According to my instructions at least.)
so are you saying we do not need directory information when connecting
the network gui to the server?

I would say that you don't, correct. Though if you want to let the network user specify a file path, you can. But that leads to other complications that you need to think about. What if two users ask for two different file paths from the same server? The server will need to keep track of each independently. Which is certainly possible, and even easy in some designs - but not so easy in others. I think it's easier to just not let network users specify a file path. That can be done by the person who starts the server, or by a person in local mode.


"I'm not back." - Bill Harding, Twister
 
GeeCON Prague 2014
 
subject: NX:Contractors database location