wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Networking must requirement. 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 "Networking must requirement." Watch "Networking must requirement." New topic
Author

Networking must requirement.

Cesar Cardozo
Greenhorn

Joined: Jun 30, 2013
Posts: 14
Hi again.

I am reading the "must" requirements to make sure that everything is clear in my application. However I found something that is bugging me a bit.
Your choice of RMI or serialized objects will not affect your grade, but no other approach is acceptable. In either case, it must 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.

I am using Roberto's approach and created an abstract listener. In my case this abstract listener gets a database connection, opens the main window and closes the configuration dialog. It is abtract because the getDBAccess() method is not implemented.

When the user starts the application he indicates in the console the running mode. Depending on the mode a ServerConfDialog, a ClientConfDialog or a StandaloneConfDialog will appear. Each one of the configuration windows has a contrete implementation of the abstract listener and adds it to its "Accept" button. This concrete implementation "implements" the getDBAccess() method.

Now for example, if I have a ClientConfDialog then I just implement the getServices method (in the concrete implementation of the button listener) retrieving a remote database connection. If I have a StandaloneConfWindow I retrieve a local database connection.
For the client mode:

What is worring me is the part of "it must accept and indication that a local database is to be used". Which "indication" they are refering to?. In my case the only indication is when I run the application starter:


What I am starting to think is that they are saying they want me to implement a factory. The "indication" would be an enum or something similar.

What do you suggest in this case, is my "indication" at the start of the application enough or do I have to create a factory and pass a kind of enum to have an "indication" (although we could say that the getDBAccess is a factory by itself)?

Regards!!
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5139
    
  12

That particular line confused already a lot of people, so you are definitely not the only one. This one could be one helpful thread


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Cesar Cardozo
Greenhorn

Joined: Jun 30, 2013
Posts: 14
Perfect. Thanks Roel!!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Networking must requirement.
 
Similar Threads
NX: Question about database location.
Network approaches confusing statement
[URLyBIRD] guicontroller problem with interfaces
Database location
Miscellaneous Questions