• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Two Question??

 
shao zhimin
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Unreferenced will take a certain amount of time to be called, depending on java.rmi.dgc.leaseValue. I would recommend reading this: http://java.sun.com/products/jdk/1.2/docs/guide/rmi/faq.html#fastleases
2)As far as handling dirty reads, I wouldn't worry about it. It's beyond the scope of this project.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic