File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Two Question?? 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 "Two Question??" Watch "Two Question??" New topic

Two Question??

shao zhimin

Joined: Aug 07, 2002
Posts: 16
I have some question at test my assignment:
1) i start the server, then start two client. i use one client to lock an record, and the other client lock the same record and wait,then i close the first client. Why the server-side not call the unreferenced method? (In the unreferenced method,i have print clause and some operation.)
2)In server-side, do i need to set an share lock? i consider when the client to read the record that is being modifyed by the other client, the message that is received by the first client is dirty data.
i planning to design an buffer area that mapping the database and the client to read it, not to directly read data in the db.db file. when each written-operation complete, it write back to the buffer-area. is right?? or not do it?
BJ Grau
Ranch Hand

Joined: Jul 10, 2001
Posts: 234
1) Unreferenced will take a certain amount of time to be called, depending on java.rmi.dgc.leaseValue. I would recommend reading this:
2)As far as handling dirty reads, I wouldn't worry about it. It's beyond the scope of this project.
I agree. Here's the link:
subject: Two Question??
It's not a secret anymore!