[ 
https://issues.apache.org/jira/browse/SLING-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14647550#comment-14647550
 ] 

Marius Petria commented on SLING-4895:
--------------------------------------

I am afraid it is a bit harder than I thought initially to prevent double 
registration :). However even for you version I have some questions.

1. unregisterMapping does not remove the mapping from unprocessed mappings
2. what happens if registerMapping and unregisterMapping execute concurrently 
for the same mapping (modulo equals). It can happen that registerMapping just 
puts an incomplete placeholder that unregisterMapping will pick it up bringing 
the useCount to -1. 

> Service registry should not be called from within synchronized block
> --------------------------------------------------------------------
>
>                 Key: SLING-4895
>                 URL: https://issues.apache.org/jira/browse/SLING-4895
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: Service User Mapper 1.2.0
>            Reporter: Carsten Ziegeler
>             Fix For: Service User Mapper 1.2.2
>
>         Attachments: SLING-4895-alt.diff, SLING-4895.diff
>
>
> RIght now, if e.g. an amendment is added/removed/updated, all 
> registration/unregistration is done in a "large" synchronized block. This 
> should be avoided



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to