File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why locking in SCJD

 
Leo Tien
Ranch Hand
Posts: 156
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 !
 
Leo Tien
Ranch Hand
Posts: 156
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Every body have no idea about this???
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Leo Tien
Ranch Hand
Posts: 156
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Max:
Nice diagram. Mind if I add it to the FAQs?

Never mind, I'd like to do that.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic