jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikko Peltonen" <mikko.pelto...@netikka.fi>
Subject Node (un)locking in transaction
Date Sat, 06 May 2006 18:46:23 GMT
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
 


Mime
View raw message