Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 32193 invoked from network); 20 Aug 2009 07:58:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Aug 2009 07:58:15 -0000 Received: (qmail 4117 invoked by uid 500); 20 Aug 2009 07:58:34 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 4068 invoked by uid 500); 20 Aug 2009 07:58:34 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 4057 invoked by uid 99); 20 Aug 2009 07:58:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Aug 2009 07:58:34 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Aug 2009 07:58:25 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Me2X6-00063X-Sf for users@jackrabbit.apache.org; Thu, 20 Aug 2009 00:58:04 -0700 Message-ID: <25057614.post@talk.nabble.com> Date: Thu, 20 Aug 2009 00:58:04 -0700 (PDT) From: Gamba To: users@jackrabbit.apache.org Subject: Re: Own nodes with mix:lockable In-Reply-To: <510143ac0908200022v7f337da2g47a7ff800049c16d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: holger.breuer@handelshof.de References: <25056308.post@talk.nabble.com> <25056614.post@talk.nabble.com> <510143ac0908200022v7f337da2g47a7ff800049c16d@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Here is my Test. I'm using a Junit-Test and the rmi-server-jar of jackrabbit. But the result is the same. The nod I locked is still locked after the session.logout(): @Test public void testSessionScopedLock() throws Exception { Context context = new InitialContext(); Repository repository; Session session; // Get Repository-Instance over RMI ClientAdapterFactory adapter = new ClientAdapterFactory(); RemoteRepository rr = (RemoteRepository) context.lookup("jnp://localhost:1099/jcrServer"); repository = adapter.getRepository(rr); // Get a session session = repository.login (new SimpleCredentials("portal", "edv9052".toCharArray()), "default"); // Get node to update ... Node rootNode = session.getRootNode(); Node nodeToLock = rootNode.getNode("HMG"); // start node-locking nodeToLock.lock(true, true); // Ensure that folder does not exist if (!nodeToLock.hasNode("TEST")) { nodeToLock.addNode("TEST", "hmg:folder"); // only with this snippet unlocking is performed // nodeToLock.unlock(); } // stop node-locking on logout(), because of session-scoped lock ... I thought ... session.save(); session.logout(); // LockExcpetion is thrown assertFalse("Node is still logged, after session-logout", nodeToLock.isLocked()); } -- View this message in context: http://www.nabble.com/Own-nodes-with-mix%3Alockable-tp25056308p25057614.html Sent from the Jackrabbit - Users mailing list archive at Nabble.com.