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 B&S I Don't Need To Prompt For Any Config Info When Running In 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 "B&S I Don Watch "B&S I Don New topic
Author

B&S I Don't Need To Prompt For Any Config Info When Running In "Alone" Mode, Right?

Bob Nedwor
hangman
Ranch Hand

Joined: Aug 17, 2005
Posts: 215

There is no need for an ipaddress, service or port. We all know where the data file is (../db-2X3.db). Let me know if I am off base. Thanks so much for your opinion.
--Bob


Bob N
SCJP - 1.4
SCJD - (B&S) Used 1.5 And It Runs On Solaris10
SCWCD - Thanks to HFSJ!!
Ta Ri Ki Sun
Ranch Hand

Joined: Mar 26, 2002
Posts: 442
That's fine. In fact you don't need to prompt in any mode if you're able to use the previous settings, else prompt. You'll probably put the user in a sort of a loop unless you can reuse settings. It would attempt to initialise -> fail -> check if user wants to reconfigure settings -> attempt to initialise -> and so on until either successful or the user chooses to exit.
As you said in the case of 'alone' the only cause for failure is the db not being there, it's possible so cater for that by catching the exception -> prompt to reconfigure settings etc.

I just always loaded the same settings screen, nothing special for just the missing database.
Bob Nedwor
hangman
Ranch Hand

Joined: Aug 17, 2005
Posts: 215

Thanks, TA. Yes. On the other two modes, I only prompt if the suncertify.properties are missing or inadequate.
Bob Nedwor
hangman
Ranch Hand

Joined: Aug 17, 2005
Posts: 215

I've changed my position on this. When running in Alone mode, I think I need to prompt the user for the DB path/filename if the info does not exist in the suncertify.properties.
 
wood burning stoves
 
subject: B&S I Don't Need To Prompt For Any Config Info When Running In "Alone" Mode, Right?
 
Similar Threads
netbeans + oracle
ERROR in all jtable cells using DefaultTableModel
Database cannot be connected
refresh page with new data
Database Connection in .jar