This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes regarding mode Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "regarding mode" Watch "regarding mode" New topic
Author

regarding mode

Jashua Ni
Greenhorn

Joined: Jul 31, 2004
Posts: 17
For my assignment, there is request that allow user to specify the location of the database
means the db file in the file system?

and it must also accept an indication that a local database is to be used, in which case, the networking must be bypassed entirely

There are three mode: server/alone/gui_client only

for server mode, let user specify db file is pretty enough, it doesn't mkae sense for local or network indication

for gui_client only, it doesn't make sense for user to choose network or local, 'cause it has to be networked, only GUI and network client will be started as doc states.

So the only place to let user specify local or network is in standalone mode, isn't that local already, or I have to let user choose local and network, then invoke properly, using localhost to loop back if user select network, very strange to me.

Any body has other intepretations?
Jashua Ni
Greenhorn

Joined: Jul 31, 2004
Posts: 17
Or is the let user select the database location really means select LOCAL or NETWORKED connection?
mike acre
Ranch Hand

Joined: Sep 23, 2003
Posts: 197
I think the popular interpretation is that the user must be able to select:

In server mode:
The path to the database file.
The port to start the RMI registry on or make socket connections available.

In Networked mode (Client):
The IP/hostname of the server.
The port to connect to on the server.

In Standalone mode:
The path to the database file

These should all be configured in a single properties file that may be available in multiple locations one for each jar file copy, so at least one on the server and one on the client.


SCJP 1.4, SCJD
Jashua Ni
Greenhorn

Joined: Jul 31, 2004
Posts: 17
Mike:

Thanks a lot.

but for this statement:

and it must also accept an indication that a local database is to be used

I agree with you. The problem is the above statement, does it make sense to create a dialog for user to choose local or network, the word "ALSO" really bothers me. I can see no place will need for user to choose, when the application starts, it already predefine whether it's local or networked already based on the mode server/alone/[].

I try to make everything clear before I submit. Really appreciate if you or other people can give some advice, thanks
mike acre
Ranch Hand

Joined: Sep 23, 2003
Posts: 197

and it must also accept an indication that a local database is to be used


the word 'it' in the above quote refers to 'the program'
This fits in with the command line requirement that stiplulates one of the 3 modes to be requested on the command line ie 'alone' for local database.

The paragraph with that sentence does not mention GUI at all.
Jashua Ni
Greenhorn

Joined: Jul 31, 2004
Posts: 17
Mike:

Yeah, after you reiterate. I think it's clear. Thanks a lot.

Jashua Ni
Richard Jackson
Ranch Hand

Joined: Jun 25, 2003
Posts: 128
Like Mike's statement, I don't know whether I need build a application ( a class file called "Main.java") containing three command line arguments.

When I need "alone" mode to start application, I just do as follows,


And then , the application will run GUI to open the local .db file and start reading and writing operation.

When I want to run "server" mode ,I am able to enter other command line argument to meet the requirement.

Please comment on.

Best Regards, Richard


Regards, Richard
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: regarding mode
 
Similar Threads
before I submit
Server database file location
Network Approaches
Java Certified Developer 1 Question
on being alone