Hi all: After read this thread, I have a question, why use locking in SCJD? I think it never be asked before, so I post it in new thread. Because I confused on locking mechanism yet, so my idea may be not exact. First, this is sun's requirement:
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.
Second, synchronized and lock/unlock mechanism are different things at all:
If use synchronized method, the search and book operation are equally blocked on DB Access Layer, one operation must waiting till another active operation is finished. No request cache, no response cache. Your server is "multiple-request-single-response" schema. If use lock/unlock, condition is different obviously. Because have a book operation cache, your server is "multiple-request-multiple-response" schema. What are you thinking on this? Pls comment !
Joined: Sep 10, 2002
Every body have no idea about this???
town drunk ( and author)
Joined: Jun 27, 2002
Hi Leo, Nice diagram. Mind if I add it to the FAQs? To answer your question. Yes, you're right. There are ways to do achieve this functionality without locking. However, the requirements state that you much provide locking in order to pass. M [ February 11, 2004: Message edited by: Max Habibi ]