From dev-return-25097-apmail-jackrabbit-dev-archive=jackrabbit.apache.org@jackrabbit.apache.org Sat Aug 22 09:51:18 2009 Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 73844 invoked from network); 22 Aug 2009 09:51:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Aug 2009 09:51:17 -0000 Received: (qmail 35722 invoked by uid 500); 22 Aug 2009 09:51:39 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 35663 invoked by uid 500); 22 Aug 2009 09:51:39 -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 35655 invoked by uid 99); 22 Aug 2009 09:51:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Aug 2009 09:51:38 +0000 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; Sat, 22 Aug 2009 09:51:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C9A8C234C004 for ; Sat, 22 Aug 2009 02:51:14 -0700 (PDT) Message-ID: <1839576241.1250934674811.JavaMail.jira@brutus> Date: Sat, 22 Aug 2009 02:51:14 -0700 (PDT) From: "Alexander Klimetschek (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-2273) Lock.getLockToken() returns null for session scoped lock In-Reply-To: <608979228.1250895494968.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-2273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12746435#action_12746435 ] Alexander Klimetschek commented on JCR-2273: -------------------------------------------- Does this happen only via RMI (as noted on the mailing list) or also if you access the repository directly? > Lock.getLockToken() returns null for session scoped lock > -------------------------------------------------------- > > Key: JCR-2273 > URL: https://issues.apache.org/jira/browse/JCR-2273 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-core > Affects Versions: 1.6.0 > Environment: Linux (Fedora 11), Sun JDK 1.5 (Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)) > Reporter: Marvin Lau > > The following code (part of a JUnit test) works in Jackrabbit 1.5.0 but fails in Jackrabbit 1.6.0 at the last line (assertNotNull("Failed to get lock token.", sessionLockToken)). Is this related to the work on JSR 283 where the behavior of Lock.getLockToken() has changed? > // Create lockable node > Node rootNode = session.getRootNode(); > Node lockableNode = rootNode.addNode("foo"); > rootNode.save(); > lockableNode.addMixin(JcrConstants.MIX_LOCKABLE); > lockableNode.save(); > session.save(); > // Get an open scope lock on the node > lockableNode.lock(false, false); > // Get lock token > Lock lock = lockableNode.getLock(); > String openLockToken = lock.getLockToken(); > assertNotNull("Failed to get lock token.", openLockToken); > // Remove the lock token by unlocking > lockableNode.unlock(); > // Get a session scope lock on the node > lockableNode.lock(false, true); > // Get lock token > lock = lockableNode.getLock(); > String sessionLockToken = lock.getLockToken(); > assertNotNull("Failed to get lock token.", sessionLockToken); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.