aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Database location configurability Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Database location configurability" Watch "Database location configurability" New topic
Author

Database location configurability

Robin van Riel
Greenhorn

Joined: May 04, 2012
Posts: 20

Hi guys,

I'm currently working on the Bodgitt and Scarper assignment.

The following requirement puzzles me a bit:

"The program must allow the user to specify the location of the database in both standalone and network mode and persist the db configuration details in suncertify.properties file. The application must read the properties file to determine the location of the db and display the data from the db."

Could this simply mean the location of the database file should be defined and read from the properties file, or should the GUI offer the end user the possibility to configure the DB location?
(even though the latter option would only make sense when running the standalone version of the application)

Thanks in advance!

Cheers,
Robin.
Helen Ma
Ranch Hand

Joined: Nov 01, 2011
Posts: 451
In the SCJD Exam J2SE 5 study guide, the GUI let the user specify the location where the database file is. I think we can use this as an example for our project.
I have not started working on the assignment yet. But I think we can learn from the study guide.
Anayonkar Shivalkar
Bartender

Joined: Dec 08, 2010
Posts: 1456
    
    5

Hello Robin van Riel,

Welcome to CodeRanch!
The program must allow the user to specify the location of the database in both standalone and network mode

This means that, when user is running the application for first time (in any mode), it MUST allow user to configure the DB location.
and persist the db configuration details in suncertify.properties file. The application must read the properties file to determine the location of the db and display the data from the db

This means that, your options MUST be saved in a property file, and that file MUST be read during subsequent runs. Thus, in your next run, the text box etc. MUST already contain DB location details - which you can accept and continue, or which you can again edit and continue. Please note that all such changes to DB location MUST be updated in property file.

I hope this helps.


Regards,
Anayonkar Shivalkar (SCJP, SCWCD, OCMJD, OCEEJBD)
Robin van Riel
Greenhorn

Joined: May 04, 2012
Posts: 20

Thanks for the warm welcome and the advice .

I guess it wouldn't make much sense to let the end user determine the location of the DB file, while they are actually using the client.
I can imagine it makes sense to let the end user determine what service to connect to, though (e.g. by making the URL of the RMI server configurable).

So I'll add both these variables to the properties file, and let the RMI server read from the same properties file (even though it might reside on another server in practice).

Cheers,
Robin.
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 4910
    
  10

Robin van Riel wrote:I can imagine it makes sense to let the end user determine what service to connect to, though (e.g. by making the URL of the RMI server configurable).

Don't forget the port number the RMI server is running on.


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Database location configurability
 
Similar Threads
Database Location - Bodgitt & Scarper
suncertify.properties and database location
UB client DB connection
NX:Contractors database location
Database location and properties file doubts.