Karl Pauls created SLING-9588:
---------------------------------
Summary: 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
Fix For: File System ClassLoader 1.0.14
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)