File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes should there be 2 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 "should there be 2 "db.db" files" Watch "should there be 2 "db.db" files" New topic
Author

should there be 2 "db.db" files

dinesh pande
Ranch Hand

Joined: Apr 07, 2003
Posts: 124
I got the Fly By Night assignment where i am supposed to have a network data server and also a provision to work in offline mode.
I was a little confused with this. Should we be having 2 "db.db" files. One on the server and one on the client?
Could someone please help me understand this.
Thanks
[ May 21, 2003: Message edited by: dinesh pande ]
[ May 21, 2003: Message edited by: dinesh pande ]
[ May 21, 2003: Message edited by: dinesh pande ]
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11277
    
  59

Hi Dinesh,
No, there is only one db.db file. The local client and the server will both refer to the same file (but not at the same time).
In all probabilty the examiner will run your local application, your remote application, and your server application in the same directory, however the requirements do say that they should work no matter what directory they are installed into, so dont rely on how I think the examiner will run the applications.
If you wanted to think of this in terms of a real life scenario, imagine that the client is worried about network outages. So, normally everyone would work via the networked version. But if there was an outage, then the person whose computer houses the server and the db.db file can then run it in local mode.
Regards, Andrew
[ May 21, 2003: Message edited by: Andrew Monkhouse ]
[ May 21, 2003: Message edited by: Andrew Monkhouse ]

The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
dinesh pande
Ranch Hand

Joined: Apr 07, 2003
Posts: 124
Originally posted by Andrew Monkhouse:
In all probabilty the examiner will run your local application, your remote application, and your server application in the same directory (although the requirements do say that they should work no matter what directory they are installed into, so dont rely on that).

Please help me understand if we really dont have to rely on the requirements and make assumptions that examiners will be testing in a particular way ?
Thanks
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11277
    
  59

Hi Dinesh,
Sorry, my bad. Typo changed my meaning.
I meant do not rely on the probability that the examiners will run all your applications in the one directory.
Always follow the requirements in your spec.
Regards, Andrew
dinesh pande
Ranch Hand

Joined: Apr 07, 2003
Posts: 124
Thanks for trying to answer patiently.
However my question still remains a question. Now that you have clarified we can't make any assumptions, it could be possible that client and server are in sepearte directories , may be on seperate machines.
So do'nt we need 2 db.db files in such a case, one for the clinet and one for the server?
Thanks
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
So do'nt we need 2 db.db files in such a case, one for the clinet and one for the server?
Nope, you only need one. You should jar up both client and server and probably should locate db.db in the same directory with your client and server jar files embedded in your submission jar. You should also note the location of db.db in your README.txt file. You can do as I did and provide an optional command line parameter that indicates the path of db.db. In my case, if the optional parameter was not used, both client and server attempted to open db.db in the current directory (of course that is client running in local mode).


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: should there be 2 "db.db" files
 
Similar Threads
SCBCD Exam + Availability in Australia
Using J2EE Vs JEE in SCEA (my experience)
questions on the unique lock manager among different JVM
Part II - J2EE Design Patterns
Problem with form submission!!