wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Multiple servers start scenario Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Multiple servers start scenario" Watch "Multiple servers start scenario" New topic
Author

Multiple servers start scenario

Liviu Carausu
Ranch Hand

Joined: Oct 07, 2004
Posts: 158
Hi,
Have you take precautions measures against multiple starts of the server using the same database file or the same service name ?
Do you think it is necessary to obtain a lock on the database file ?
Thanks,
Liviu


Oracle Certified Master Java SE6 Developer(SCJD),
OCE JEE 6 JSP and Servlets Developer.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11460
    
  94

Hi Liviu,

Search your instructions for something like "You may assume that at any moment, at most one program is accessing the database file" - if you have that, then you don't need to worry about multiple starts of the server.

Also - check the APIs for file level locking - you should find a warning against this (at least if you want "write once, run everywhere" functionality).

Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple servers start scenario