File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes managing connection per lock is necessary ?? 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 "managing connection per lock is necessary ??" Watch "managing connection per lock is necessary ??" New topic

managing connection per lock is necessary ??


Joined: Sep 22, 2002
Posts: 2
for lock/unlock part in the specs its mentioned "
the unlock method simply removes the lock from the specified record, if an attempt is made to unlock a record that has not been locked by this connection, then no action is be taken. "
this action could'nt occur and shouldnt be by the spec. why ? becuse its mentioned in the spec. " the lock method block until a requested lock can be applied" , and so it cannot be unlocked unitl its locked before, and trivially unlock comes after lock, so its for sure only the record that lock is the one that can unlock, since if others are to lock what is locked they have to wait. I think the complexity of monitoring what connection for a lock is not neccessary. although its mentioned in the specs. I think this part is trivial and wont add something to the locking programming. and so connection class/object is not necessary, and the lock/unlock methods signature mentioned in the specs are enough. any comment ??
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
If you want to get the best help and advice on Java anywhere, you need to change your display name to a first and last name.
Read thru this thread to see some opinions on this matter:
Unlock ignoring bogus requests

Michael Morris

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher

Joined: Sep 22, 2002
Posts: 2
Thanks a lot, I believe this reference is useful.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it
Thanks! and welcome to the JavaRanch!

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: managing connection per lock is necessary ??
It's not a secret anymore!