cancel
Showing results for 
Search instead for 
Did you mean: 

LockService problem

saruqui
Champ in-the-making
Champ in-the-making
I have a code like this:
,
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
1 REPLY 1

mrogers
Star Contributor
Star Contributor
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.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.