• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Of course, that's - Passed SCJD Contractor exam -- 388/400

 
Jim
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just wanted to clear that up!
Also, I received many ideas from reading the posts on this site. Thanks to all who have participated! I will be happy to provide guidance (within the rules, of course) to anyone looking for some help!
Jim
[ September 12, 2003: Message edited by: Jim Paulhamus ]
 
Damian Ryan
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well done!
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congrats Jim, great job.
Can you describe your design for locking?
Mark
 
Jim
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark -
To provide the locking capability I created a lock manager object which was responsible for granting, validating and releasing locks. The 'Data' object which is required by the specification communicated with the lock manager for all of those cases. For example, a request to the Data object to 'lockRecord( recNo )' was deletgated to the manager (after checking for validity, of course), and the lock token from the manager was returned.
My lock manager is really nothing more than a wrapper around a data structure which stores and reads key / value pairs...record numbers and lock tokens.
As a side note, next to writing the code to interact with the db file, the locking mechanism was where I put my time. Testing is very important for the manager.
Hope this helps!
Jim
[ September 12, 2003: Message edited by: Jim Paulhamus ]
 
Vlad Rabkin
Ranch Hand
Posts: 555
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jim,
Could please describe to prevent read while somebody writes?
Did you use chain: lock-read-write-lock(for update) and lock-read-lock (for read/find) accordinatelly
or did you just synhronized all read/write methods?
Tx,
Vlad
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic