LockService problem
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2013 03:26 PM
I have a code like this:
lockservice.lock(node) throws an exception because the node is locked and I can't figure out what the problem is.
In a second try, I embedded into this code in a transaction and I get the same result.
Can anybody help me? Any idea?
Regards,
Saru
,public void setProperties(NodeRef node, Map<QName, Serializable> props){ lockService.unlock(node); nodeService.setProperties(node,props); lockService.lock(node);}
,lockservice.lock(node) throws an exception because the node is locked and I can't figure out what the problem is.
In a second try, I embedded into this code in a transaction and I get the same result.
Can anybody help me? Any idea?
Regards,
Saru
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2013 05:23 AM
You need to give details of the exception.
However the obvious thing that may be wrong with your code is calling unlock for a node that is either not locked or is locked by somebody else, you can't blindly assume that you can unlock a node. A better approach may be to suspend locks while your code is running.
However the obvious thing that may be wrong with your code is calling unlock for a node that is either not locked or is locked by somebody else, you can't blindly assume that you can unlock a node. A better approach may be to suspend locks while your code is running.
