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

exclusive lock() yes or not?

 
jamel bal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the contractor assignment. I did read some comments about lock and unlock and the possibility to use them. Those two methods are platform depending as far as I know. However if I use just exclusive lock does this guaranty the platform independence.
thank you!
 
Mike Southgate
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you think these methods are platform dependent? What would meake them so? I implemeneted these using a HashMap.
ms
 
Ken Krebs
Ranch Hand
Posts: 451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jamel,
Perhaps you are confusing whether to lock a record with locking the database file itself. Locking a file is platform dependent while locking a record is not as it refers to locking an Object. My own assignment (Contractor) says that I can assume that at any moment, at most 1 program is accessing the database file; therefore the locking system only needs to be concerned with multiple concurrent clients of the server.
Hope this helps.
kktec
SCJP1.4, SCWCD
 
jamel bal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all for the answer.
I shouldn't ask a trivial question like this. I was a little bit confuse, I'm returning using java little by little.
Thank you all cool:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic