Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5C55A9039 for ; Tue, 9 Oct 2012 10:26:09 +0000 (UTC) Received: (qmail 54612 invoked by uid 500); 9 Oct 2012 10:26:08 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 54297 invoked by uid 500); 9 Oct 2012 10:26:04 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 53945 invoked by uid 99); 9 Oct 2012 10:26:02 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2012 10:26:02 +0000 Date: Tue, 9 Oct 2012 10:26:02 +0000 (UTC) From: "Nick Tuckett (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <63774032.13775.1349778362793.JavaMail.jiratomcat@arcas> Subject: [jira] [Created] (JCR-3438) Lock tokens acquired inside a transaction do not get released when session logs out MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Nick Tuckett created JCR-3438: --------------------------------- Summary: Lock tokens acquired inside a transaction do not get released when session logs out Key: JCR-3438 URL: https://issues.apache.org/jira/browse/JCR-3438 Project: Jackrabbit Content Repository Issue Type: Bug Components: jackrabbit-core Affects Versions: 2.4.2 Reporter: Nick Tuckett Attachments: LockTokenTransactionTest.java When outside a transaction, LockManager.addLockToken() calls org.apache.jackrabbit.core.lock.LockManagerImpl.addLockToken(). This sets the lock holder, and if the LockInfo object is actually an InternalLockInfo object, it adds that object as a session listener. This means that the LockInfo object is notified when the session is logging out, whereupon it causes the session to release the lock token. When adding a lock token inside a transaction, the underlying implementation calls org.apache.jackrabbit.core.lock.XAEnvironment.addLockToken(). This sets the lock holder on the LockInfo object but does not add it as a session listener. Consequently the lock token remains owned by the session, even when the session finishes logging out. Subsequent attempts to get the lock token in other sessions using the same credentials then fail. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira