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

NX:Booking a Seat

 
guyue0505
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I have a question about synchronized like these:
1) I have a class named LockManager whitch do "genCookie", "LockRecord" ,
"unlockRecord" ...
synchronized boolean unlockRecNo(
long recNo , long lockCookie ){
....
}
synchronized boolean lockRecNo(
long recNo , long lockCookie ){
....
}
2) In client, when i Book a seat I do like:
lockManager.LockRecord;
Book;
lockManager.unlock;
Doing like these , is right?
Thank you first.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Steven,
You have been asked 9 times to change your name to meet the JavaRanch Naming Policy. Your account will now be closed.
Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic