wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes blocking the code /application 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 "blocking the code /application" Watch "blocking the code /application" New topic
Author

blocking the code /application

pramod karnani
Ranch Hand

Joined: May 22, 2007
Posts: 88

Hi All,



// Locks a record so that it can only be updated or deleted by this client.
// If the specified record is already locked, the current thread gives up
// the CPU and consumes no CPU cycles until the record is unlocked.
public void lock(int recNo) throws RecordNotFoundException;



For e.g . when lock method locks a contractor record 1

lock(1);

if unlock is not called again there will be lock method call

lock(1);


then it should block the code , correct?
Since record number 1 is not release so it will block the code until record number 1 is released.


Regards,
Pramod
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2380
    
    7

You may want to look at this thread


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: blocking the code /application