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

deleteRecord method in DBAccess interface

 
Jofer Chan
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,everyone:
in my DBAccess interface,the deleteRecord method format follow:
public void deleteRecord(long recNo, long lockCookie)
throws RecordNotFoundException, SecurityException;
I don't know how to get the lockCookie,
what's mean the lockCookie?
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jofer,
I don't know how to get the lockCookie,

lockCookie is the value returned by your lockRecord() method. From within that method, you may generate it by using the Random.nextLong() method.
what's mean the lockCookie?

It just identifies a given lock. Before deleting or updating a record, you need to get a lock on it. The lockCookie mechanism is just a way Sun found out to ensure that you do it.
Best,
Phil.
 
Jofer Chan
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,Philippe , Thanks for your reply.
I know what your mean.
Thank you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic