jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viz06 <vijaykumarsharma_1...@yahoo.com>
Subject Unlocking: Node not locked by this session
Date Sat, 24 May 2008 15:12:15 GMT

I have a very simple setup using spring module jcrTemplate. I am able to lock
a node using


Lock nodeLock = jcrTemplate.getNodeByUUID(<myUUID>).lock(false, false);

and this is how I am attempting unlocking

jcrTemplate.getSessionFactory().getSession().addLockToken(nodeLock
.getLockToken());


jcrTemplate.getNodeByUUID(<myUUID>).unlock();

this results in

javax.jcr.lock.LockException: Node not locked by this session.
	at
org.apache.jackrabbit.core.lock.XAEnvironment.unlock(XAEnvironment.java:162)
	at
org.apache.jackrabbit.core.lock.XALockManager.unlock(XALockManager.java:122)
	at org.apache.jackrabbit.core.NodeImpl.unlock(NodeImpl.java:4173)


the calls to lock and unlock are called from 2 different unit test methods.

I know its some silly mistake from my part but I am unable to find it even
after searching forum data nd the jsr-170 reference.

TIA,
Viz


-- 
View this message in context: http://www.nabble.com/Unlocking%3A-Node-not-locked-by-this-session-tp17448831p17448831.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message