• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Anyone passed SCJD without putting wait on locked record?

 
Bram Pramono
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

This is a thing I'm very curious about. I just had a discussion with Roel and K.Tsang (link) about should threads trying to lock a locked record wait? or get an error message mentioning that a record is lock, please try again later? I feel that with my assignment and solution, error message seems to be good, but Roel and K say otherwise.

So please for people who did passed SCJD without using wait on lock, let me know. Thank you.

Cheers,

Bram
 
Fernando Franzini
Ranch Hand
Posts: 489
2
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bram

I dont think that there are anyone in this situation cause lock/wait are mandatory requirements ! If you dont implement, you'll have automatic faill.
Look my assignment:

Where this document uses the word "must" an absolute requirement is being described. If you fail to adhere to such a requirement, your assignment will be failed automatically, and without further evaluation. It is therefore imperative that you pay close attention to any statement using the word "must" in this document. Portions of your submission will be analyzed by software; where a specific spelling or structure is required, even a slight deviation could result in automatic failure.


Locking
Your server must be capable of handling multiple concurrent requests, and as part of this capability, must provide locking functionality as specified in the interface provided above. You may assume that at any moment, at most one program is accessing the database file; therefore your locking system only needs to be concerned with multiple concurrent clients of your server. Any attempt to lock a resource that is already locked should cause the current thread to give up the CPU, consuming no CPU cycles until the desired resource becomes available.

So..if your assignment dont tell you this....you can let this implementation out.
Regards.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic