You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Karl Pauls (Jira)" <ji...@apache.org> on 2020/08/21 11:15:00 UTC

[jira] [Closed] (SLING-9588) The FSClassLoaderProvider activate/deactivate is racing to unregister the MBean

     [ https://issues.apache.org/jira/browse/SLING-9588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl Pauls closed SLING-9588.
-----------------------------

> The FSClassLoaderProvider activate/deactivate is racing to unregister the MBean
> -------------------------------------------------------------------------------
>
>                 Key: SLING-9588
>                 URL: https://issues.apache.org/jira/browse/SLING-9588
>             Project: Sling
>          Issue Type: Bug
>          Components: Commons
>    Affects Versions: File System ClassLoader 1.0.12
>            Reporter: Karl Pauls
>            Assignee: Karl Pauls
>            Priority: Major
>             Fix For: File System ClassLoader 1.0.14
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> It looks like the activate/deactivate method of the FSClassLoaderProvider is racing to unregister the mbean service reference. That is problematic as if it is unregistered twice, it will throw an exception - potentially killing the activate.
> Not sure what the right thing todo is here - but it seems very strange that the service ref would be static and clearly, there is a check-then-act cases in the below:
> https://github.com/apache/sling-org-apache-sling-commons-fsclassloader/blob/97d73c116d296b290e4484ca842bbbf185a8d36e/src/main/java/org/apache/sling/commons/fsclassloader/impl/FSClassLoaderProvider.java#L142
> https://github.com/apache/sling-org-apache-sling-commons-fsclassloader/blob/97d73c116d296b290e4484ca842bbbf185a8d36e/src/main/java/org/apache/sling/commons/fsclassloader/impl/FSClassLoaderProvider.java#L169
> [~cziegeler], any ideas why the code would be like it is right now?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)