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: Am I the only one who MUST use lockCookie?

 
Sakke Wiik
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm doing URLyBird 1.2.1 and did the locking mechanism as many others: I use the unique Data-object as lock. But when i scanned the instructions for all "musts", I stumbled upon this comment inside the DBAccess interface which I must implement:
// Returned value is a cookie that must be used when the record is unlocked,
// updated, or deleted.
How strict is this "must"? It's not stated in the "What you must do"-chapter. And how come I seem to be the only one that must use the cookie for unlocking?
Maybe it's enought to do an add-on to my locking mechanism by storing a lockCookie in my Data-object and verify the cookie? Seems like an unnecessary double-check. Any ideas?
Cheers,
Sakke
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

How strict is this "must"? It's not stated in the "What you must do"-chapter.

You will result automatically fail, if you have not implemented ALL MUST items.

And how come I seem to be the only one that must use the cookie for unlocking?

You can assign a cookie, like transaction ID, to each transaction, and thus, the cookie in fact can be used to identify the transaction, and you can use it to identify the whether an object is lock by which transaction.

Maybe it's enought to do an add-on to my locking mechanism by storing a lockCookie in my Data-object and verify the cookie? Seems like an unnecessary double-check. Any ideas?

This depends on how you implement your locking mechanism. But you always need to check whether the object has been locked, and then accquire a lock if it is available or wait for a lock to be available.
Nick
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic