Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S deleteRecord

 
Harish Yerneni
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all:

Here is the spec I got



I have checked for RNFE if the record is not existing in FileManager hashmap or already marked as deleted. I have thrown security exception, when cookie is not matching with the existing cookie in the hashmap or if recno doesnt exist in the lockManager hashmap itself(question: am I OK here).

I have seen in many posts they are recommending
lockRecord() - can somebody explain me why we should use lockRecord() here. I am thinking we are deleting an already locked record. If we use lockRecord(), dont we get a new cookie value here.
deleteRecord() - fine
unlock() - fine

Here is what I have coded in my Data.class


thanks,

Harish

question: Why should we lock() first, if the record is already
 
mohamed sulibi
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi;

i don't understand your question , but i think the sequence for calling client is:


regards.
M_darim.
SCJP, SCJD in progress ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic