• 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

about the "server" instructions

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the instructions given to me Under the topic "Server"
<instruction>
Required Interface
Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface:
[then they list the DBAccess interface]
Any unimplemented exceptions in this interface must all be created as member classes of the suncertify.db package. Each must have a zero argument constructor and a second constructor that takes a String that serves as the exception's description.
Any methods that throw RecordNotFoundException should do so if a specified record does not exist or is marked as deleted in the database file.
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.
</instruction>
"In either case, the program must allow the user to specify the location of the database" - I interpret it as, in RMI mode or Sockets mode, the server program (that is "java -jar runme.jar server") should allow the user to choose the DB file on the machine where he is running this server. I have gui for the server mode where the user gets to choose the file using a JFileChooser.
"and it must also accept an indication that a local database is to be used" - how do you interpret this? is it talking about the program when started with the "alone" flag? If so why is it listed under the topic "server". It should be listed under "client".
I am giving a JFileChooser when he starts the program using "server" flag to choose the DB file, and the program when started in "alone" mode, brings up the client and gets to choose the Db file (using a JFileChooser) in the clients machine. When the program is started with no flags, the client interface is up in network mode, he gets a JDialog to enter the host to connect to.
[ September 25, 2003: Message edited by: Arun Kumar ]
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Arun,

"In either case, the program must allow the user to specify the location of the database" - I interpret it as [...] the server program [...] should allow the user to choose the DB file on the machine where he is running this server


Some people have also interpreted this to mean that the client must be able to specify the location of the database. In local mode the location would be a local file. In remote mode the location would be a server name / port combination.

"and it must also accept an indication that a local database is to be used" - how do you interpret this?


I interpet it as talking about the client application starting in either "alone" or networked mode. The flag itself would be the indication that a local database is to be used.

why is it listed under the topic "server". It should be listed under "client"


Agreed.
Regards, Andrew
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In remote mode the location would be a server name / port combination.
Some people have also argued that "location" means a remote client should also be able to specify the exact path on the server to the DB file. This seems a little crazy; I don't agree with it, but some people believe it's a proper interpretation of "specify location". Something to consider, maybe.
 
reply
    Bookmark Topic Watch Topic
  • New Topic