jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-685) Remove some synchronization on CachingNamespaceResolver
Date Thu, 21 Dec 2006 09:44:22 GMT
    [ 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

        

Mime
View raw message