Return-Path: Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: (qmail 26062 invoked from network); 18 Dec 2006 16:35:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Dec 2006 16:35:37 -0000 Received: (qmail 15467 invoked by uid 500); 18 Dec 2006 16:35:44 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 15430 invoked by uid 500); 18 Dec 2006 16:35:44 -0000 Mailing-List: contact commits-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 commits@jackrabbit.apache.org Received: (qmail 15416 invoked by uid 99); 18 Dec 2006 16:35:44 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Dec 2006 08:35:44 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Dec 2006 08:35:35 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 2D2321A981A; Mon, 18 Dec 2006 08:34:48 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r488325 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/CachingHierarchyManager.java Date: Mon, 18 Dec 2006 16:34:48 -0000 To: commits@jackrabbit.apache.org From: dpfister@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061218163448.2D2321A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dpfister Date: Mon Dec 18 08:34:47 2006 New Revision: 488325 URL: http://svn.apache.org/viewvc?view=rev&rev=488325 Log: JCR-682 AccessManager + CachingHierarchyManager problem Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/CachingHierarchyManager.java Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/CachingHierarchyManager.java URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/CachingHierarchyManager.java?view=diff&rev=488325&r1=488324&r2=488325 ============================================================================== --- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/CachingHierarchyManager.java (original) +++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/CachingHierarchyManager.java Mon Dec 18 08:34:47 2006 @@ -374,14 +374,22 @@ /** * {@inheritDoc} *

- * Generate subsequent add and remove notifications for every replacement. + * Generate subsequent add and remove notifications for every replacement. This method + * currently assumes that the reordering is detectable by comparing the state's child + * node entries to the overlayed state's child node entries. It is not able to handle + * a transient reordering and will therefore evict its cached entry if such a situation + * is detected. */ public void nodesReplaced(NodeState state) { List entries = state.getReorderedChildNodeEntries(); if (entries.size() == 0) { + synchronized (cacheMonitor) { + if (idCache.containsKey(state.getNodeId())) { + evict(state.getNodeId()); + } + } return; } - Iterator iter = entries.iterator(); while (iter.hasNext()) { NodeState.ChildNodeEntry now = (NodeState.ChildNodeEntry) iter.next(); @@ -806,6 +814,13 @@ */ public PathMap.Element getElement() { return element; + } + + /** + * {@inheritDoc} + */ + public String toString() { + return id.toString(); } } }