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 FBN : StandAlone mode Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "FBN : StandAlone mode" Watch "FBN : StandAlone mode" New topic
Author

FBN : StandAlone mode

Akshay Sharma
Ranch Hand

Joined: Mar 27, 2003
Posts: 42
Hi,
If we run the FBN assignment mode in the standalone mode then we are not using RMI or sockets.
If a user happens to start two clients from the same machine in the standalone mode. In effect we are having two JVM's running.
db.db file is part of client.jar
How do we make sure that we dont end up screwing the data file because our locking etc will be handled in the JVM.
In case of remote clients we can handle this because all our i/o access to the file is via one single class on the RMI server.
But in the standalone case havingmultiple clients.
we will definitely end up screwing the data file..
Any advises/suggestions/clues.


Akshay Kumar Sharma<br />**********************<br />Good Better Best <br />Never Let it rest<br />For your good is better<br />and the better is the best
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11503
    
  95

Hi Akshay
I dont think we have to worry about someone starting two separate applications using the same DB.
In the new assignment it is specifically stated that we dont have to worry about this.
Regards. Andrew


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

Joined: Mar 27, 2003
Posts: 42
Then it should be fine.
Otherwise this will be really tricky.
But Andrew I am doing the old FBN assignment.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11503
    
  95

Hi Akshay
Sorry I wasnt clear. I did see that you had mentioned that you were doing FBNS. I also did this. I did not try to handle the case where two applications could both write to the file at the same time.
My comment about the new assignment was just for information - if they have explicitly stated it is not required in the new assignment, then I think it is reasonable to assume the same for the old assignment.
Regards, Andrew
Damian Ryan
Ranch Hand

Joined: May 09, 2003
Posts: 117
I agree with Andrew.
Just make sure you explicitly state this assumption in the list of assumptions you include with your design choices document.


Always proofread carefully to see if you any words out.
Akshay Sharma
Ranch Hand

Joined: Mar 27, 2003
Posts: 42
Sure guys....
Thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: FBN : StandAlone mode