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

Record Locking and SCJD in general

 
Marcelo Ortega
Ranch Hand
Posts: 528
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi people,

I'm practicing for my SCJD by making little programs which use RMI, Swing API, InputStreams, OutputStreams, etc..

First question: Do you think this aproche is a good start? I am reading Java RMI by O'Reilly for the RMI part of the exam and Swing second edition by Manning for the swing side of things.

Any comments will be more than welcome.

Secondly, i am new to the whole record locking thing. I'm not sure exactly what records we are locking on? Is it an object? A field (byte) read or writen from a file?

I searched in google for a tutorial for Record locking but it doesn't seem to be an actual stand alone "Topic".

Any good articles that i can read to catch up on this?

Thanks in advance and best regards,
Marzo.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm practicing for my SCJD by making little programs which use RMI, Swing API, InputStreams, OutputStreams, etc..

First question: Do you think this aproche is a good start?


It's a great way to start. Don't throw anything away either - small snippets of your learning code will be useful during the real thing. Look at it as prototyping. The good thing is you will not have to put your prototype into production - you will have time for a complete rewrite.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Regarding locking:

In the Bodgit and Scarper database, each record represents one of the contractors. We have to prevent two customer representives from thinking they have booked the same contractor for their customer. (The dreaded double booking that airlines are so good at nowdays). We could do that by placing a file based lock on the complete database, updating the required record, and unlocking the database. That would work, but it would be inefficient because it would cause customer representatives who are not interested in the same contractor to be locked out.

But we cannot lock the complete file because that goes against the requirements: we must only lock specific records according to the interface provided by Sun. The problem is to implement that record based locking somehow and to satisfy the requirements of the interface.

Take a look at the interface Sun provided, what methods involve record locking?

Another level of locking is required to prevent the records in the given data file from becoming corrupted.
[ September 17, 2005: Message edited by: Barry Gaunt ]
 
Marcelo Ortega
Ranch Hand
Posts: 528
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Barry.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic