aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Confused about lock cookie Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Confused about lock cookie" Watch "Confused about lock cookie" New topic
Author

Confused about lock cookie

Ronnie Phelps
Ranch Hand

Joined: Mar 12, 2001
Posts: 329
I am taking the beta 1.4 exam and I am kind of confused about the lock cookie concept. I made a few assumptions that I'm not sure about:
1. the lockCookie attribute is just an arbitrary numeric value that you can increment after the server is locked or unlocked.(this value isn't obtained from any core library function calls)
2. There should only be one lockCookie and this must be released by clients during an unexpected event such as a client losing a connection before the lock is released.
Again these are just assumption I made. Let me know what you think.
Tybon Wu
Ranch Hand

Joined: Jun 18, 2002
Posts: 84

1. the lockCookie attribute is just an arbitrary numeric value that you can increment after the server is locked or unlocked.(this value isn't obtained from any core library function calls)

That's my intepretation too.

2. There should only be one lockCookie and this must be released by clients during an unexpected event such as a client losing a connection before the lock is released.

At most one lockCookie per record at any given time. The server should unlock all records locked by the client which crashed.


SCJP2
 
 
subject: Confused about lock cookie