Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

assumption about lock/unlock

 
Johnva
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am working on the lock/unlock part right now. I made a assumption about the server: there need only one instance of the Data class running on the RMI server (and might be shared by multiple RMI server threads).
Remember the getRecord() and modify() are all synchronized.
So, for getRecord(int recNum), change returned DataInfo object, modify(DatInfo dataInfo) sequence, the race condition can only occur on the concurrent changing DataInfo object part.
If I am right, I am confused why in the requirement it mentiona a lot about lock, read modify, wrtie, unlock sequence?
Any insights are welcome.
Thanks
 
HenkGijsbert
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because multiple clients can connect to that 1 Data class.
I think the famous 'lock/unlock the correct question' mailthread will give you a lot of answers.
Regards,
Henk van Jaarsveld (NL)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic