aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Which layer the locking mechanism should be implemented? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Which layer the locking mechanism should be implemented?" Watch "Which layer the locking mechanism should be implemented?" New topic
Author

Which layer the locking mechanism should be implemented?

Hanna Habashy
Ranch Hand

Joined: Aug 20, 2003
Posts: 532
hi guys:
I want to hear you openion about which layer in the application should the locking mechanism be implemented. Should it be considered a low level operation, implemented at the data access layer. Or,should be considered as high level operation, and implemented at the control layer level.
I am interested to hear all opinions.
thanks
[ May 28, 2004: Message edited by: Hanna Habashy ]

SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11460
    
  94

Hi Hanna,

You might be interested in the really long discussion we had about this in the thread "Should lock methods be callable by the client".

As you will be able to see, some of us favour having the lock method exposed right up at the client code, and others favour having it hidden at a low or mid level.

Both have their good and bad points. Take a look at some of the arguments for and against, and work out which ones make the most sense to you.

(Then document your decision, of course ).

Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Which layer the locking mechanism should be implemented?