• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Networking must requirement.

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!!
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That particular line confused already a lot of people, so you are definitely not the only one. This one could be one helpful thread
 
Cesar Cardozo
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perfect. Thanks Roel!!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic