You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Mikko Peltonen <mi...@netikka.fi> on 2006/05/06 20:46:23 UTC
Node (un)locking in transaction
Hi All,
I'm having problems to get Node.unlock() to work under a different session
and transaction from the session/transaction under which the Node was
locked. I've been trying to transfer the lock token between
transactions/sessions but Node.unlock() always throws LockException "Node
not locked by this session" in XAEnvironment's unlock method.
Looking into the source of XAEnvironment, the addLockToken() method's
implementation is empty:
/**
* Add lock token to this environment.
* @param lt lock token
*/
public void addLockToken(String lt) {
}
And if I understood correctly after a quick look into the source,
Session.addLockToken() gets delegated to this method when we are under
transaction. Am I missing something here, or doesn't addLockToken work under
transactions? Can I lock a node under transaction/session A and then unlock
it under transaction/session B and how?
Regards,
Mikko