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 DCCAC1000A for ; Thu, 21 Nov 2013 07:18:50 +0000 (UTC) Received: (qmail 51439 invoked by uid 500); 21 Nov 2013 07:18:48 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 51111 invoked by uid 500); 21 Nov 2013 07:18:38 -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 51103 invoked by uid 99); 21 Nov 2013 07:18:36 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Nov 2013 07:18:36 +0000 Date: Thu, 21 Nov 2013 07:18:36 +0000 (UTC) From: "Radoslaw Stachowiak (JIRA)" To: dev@jackrabbit.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (JCR-3698) Locking works incorrectly when used with JTA transactions. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Radoslaw Stachowiak created JCR-3698: ---------------------------------------- Summary: Locking works incorrectly when used with JTA transactions. Key: JCR-3698 URL: https://issues.apache.org/jira/browse/JCR-3698 Project: Jackrabbit Content Repository Issue Type: Bug Components: jackrabbit-core, locks Affects Versions: 2.6.3 Environment: JDK 7, JTA 1.1 Reporter: Radoslaw Stachowiak When JTA is used, locking is performed inside the transaction the session is registered in. This makes locks visible only after transaction is commited and session-scoped locks are useless. Steps to reproduce: 1. Add a node. 1. Begin transaction. 2. Create lock for node. 3. Suspend transaction. 4. Begin new transaction. 5. Check for lock on node. Expected: node is locked. Actual result: node is not locked until first transaction is commited. If session-scoped lock is used, node will never be locked. Workaround that simulates session scoped lock: 1. Suspend current transaction. 2. Begin new transaction. 3. Create lock. 4. Commit. 5. Resume suspended transaction. 6. Assign lock to resumed transaction. 7. Register Synchronization to release lock before transaction is finished. -- This message was sent by Atlassian JIRA (v6.1#6144)