Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 30949 invoked from network); 21 Dec 2006 09:44:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Dec 2006 09:44:49 -0000 Received: (qmail 86660 invoked by uid 500); 21 Dec 2006 09:44:51 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 86626 invoked by uid 500); 21 Dec 2006 09:44:50 -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 86608 invoked by uid 99); 21 Dec 2006 09:44:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Dec 2006 01:44:50 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Dec 2006 01:44:42 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 65EAB714295 for ; Thu, 21 Dec 2006 01:44:22 -0800 (PST) Message-ID: <1747372.1166694262414.JavaMail.jira@brutus> Date: Thu, 21 Dec 2006 01:44:22 -0800 (PST) From: "Jukka Zitting (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-685) Remove some synchronization on CachingNamespaceResolver In-Reply-To: <3386506.1166518821094.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/JCR-685?page=comments#action_12460195 ] Jukka Zitting commented on JCR-685: ----------------------------------- > i'd rather leave this issue open, the core issue (monitor contention with concurrent read access) > still exists a thread dumps show. > > the committed fix affected deprecated methods only and doesn't solve the core issue. The issue title and description only mention the deprecated methods. I'd rather open a separate issue with a better description of the core problem. Additionally, from the release and Jira management perspective it's troublesome to have issues that are "partially fixed" in a release. > Remove some synchronization on CachingNamespaceResolver > ------------------------------------------------------- > > Key: JCR-685 > URL: http://issues.apache.org/jira/browse/JCR-685 > Project: Jackrabbit > Issue Type: Improvement > Components: core > Affects Versions: 1.1, 1.1.1 > Reporter: Marcel Reutegger > Priority: Minor > Fix For: 1.2 > > Attachments: CachingNamespaceResolver.patch > > > The methods getQName() and getJCRName() are unnecessarily synchronized and cause monitor contention with concurrent calls to the methods of the NameCache interface (those are also synchronized). > I propose the following change: > Index: CachingNamespaceResolver.java > =================================================================== > --- CachingNamespaceResolver.java (revision 488245) > +++ CachingNamespaceResolver.java (working copy) > @@ -84,7 +84,7 @@ > /** > * @deprecated use {@link NameFormat#parse(String, NamespaceResolver)} > */ > - public synchronized QName getQName(String name) > + public QName getQName(String name) > throws IllegalNameException, UnknownPrefixException { > return NameFormat.parse(name, this); > } > @@ -92,7 +92,7 @@ > /** > * @deprecated use {@link NameFormat#format(QName, NamespaceResolver)} > */ > - public synchronized String getJCRName(QName name) > + public String getJCRName(QName name) > throws NoPrefixDeclaredException { > return NameFormat.format(name, this); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira