File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes locking help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "locking help" Watch "locking help" New topic
Author

locking help

uzma ali
Ranch Hand

Joined: Jun 22, 2007
Posts: 56
the following method is in data.java which implements DBAccess interface


Then I have a lockManager class which returns a cookie to be used in the above method

I have another class DataFileAccess which gives the detail methods of Data.java



If this is correct to call lock,update and then unloack from updateRecord method from Data.java

Please comment and any help is appreciated

uzma
Xabier Martija
Ranch Hand

Joined: Jul 18, 2007
Posts: 40
No. The user of data.java should do it. But you should document it well.
Note that update(in data class) throws security exception if not provided with a valid coockie, so it has no sense that you lock and unlock in your data class.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: locking help
 
Similar Threads
NX: Some question about DBAccess
lockRecord method help
How to throw RemoteException?
Cookie value used in DBAccess Interface
lock-cookie generation?