Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 72711 invoked from network); 13 Mar 2009 13:46:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Mar 2009 13:46:21 -0000 Received: (qmail 18442 invoked by uid 500); 13 Mar 2009 13:46:20 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 18422 invoked by uid 500); 13 Mar 2009 13:46:20 -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 18413 invoked by uid 99); 13 Mar 2009 13:46:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2009 06:46:20 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2009 13:46:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7CEE2234C045 for ; Fri, 13 Mar 2009 06:45:50 -0700 (PDT) Message-ID: <1026400736.1236951950498.JavaMail.jira@brutus> Date: Fri, 13 Mar 2009 06:45:50 -0700 (PDT) From: "Marius Ropotica (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-1634) In XA transaction session.addLockToken() does not have effect In-Reply-To: <17123111.1212162765080.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-1634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681717#action_12681717 ] Marius Ropotica commented on JCR-1634: -------------------------------------- Well, I've modified the XAEnvironment and XALockManager classes. I'm not sure that this is the right solution, but it seems that the problem is gone. In XAEnvironment I've modified addLockToken and removeLockToken methods as following: public void addLockToken(SessionImpl session, String lt) { lockMgr.lockTokenAdded(session, lt); } public void removeLockToken(SessionImpl session, String lt) { lockMgr.lockTokenRemoved(session, lt); } and in XALockManager class the following methods: public void lockTokenAdded(SessionImpl session, String lt) { if (isInXA()) { xaEnv.addLockToken(session, lt); } else { lockMgr.lockTokenAdded(session, lt); } } public void lockTokenRemoved(SessionImpl session, String lt) { if (isInXA()) { xaEnv.removeLockToken(session, lt); } else { lockMgr.lockTokenRemoved(session, lt); } } > In XA transaction session.addLockToken() does not have effect > ------------------------------------------------------------- > > Key: JCR-1634 > URL: https://issues.apache.org/jira/browse/JCR-1634 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-core, locks, transactions > Affects Versions: core 1.4.4 > Environment: Jackrabbit Core 1.4.4, Jencks 2.0, Springmodules 0.8a, Jackrabbit JCA 1.4 > Reporter: Roman Puchkovskiy > Attachments: test-external-lock-in-tx.zip > > > Following sequence does not work as expected: > 1. first tx (and first session) > create node > make it lockable > 2. second tx (and second session) > lock this node and save lock token > 3. third tx (and third session) > add saved lock token to session > modify this locked node -> fails as if lock token was not added to session3 > The same sequence works as expected without transactions. > I had to separate transactions 1 and 2 because JCR-1633 prevents node from being locked in same tx in which it was created. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.