[
https://issues.apache.org/jira/browse/SLING-2228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112581#comment-13112581
]
Justin Edelson commented on SLING-2228:
---------------------------------------
I was trying to avoid dealing with SLING-2229 (or rather, the variance in
JSR-223 implementations), but it's definitely the right thing to do. +1 to
Felix's patch. Local testing shows that stopping/starting a script engine or
the dynamic classloader service doesn't cause a re-registration of the
ScriptEngineManager.
> Prevent Reregistration of ScriptEngineManager on ScriptEngineFactory update
> ---------------------------------------------------------------------------
>
> Key: SLING-2228
> URL: https://issues.apache.org/jira/browse/SLING-2228
> Project: Sling
> Issue Type: Improvement
> Components: Scripting
> Affects Versions: Scripting Core 2.0.18
> Reporter: Felix Meschberger
> Attachments: SLING-2228-fmeschbe.patch, SLING-2228.patch
>
>
> The ScriptEngineManager must be recreated when an existing
> ScriptEngineFactory is removed or updated. This causes the
> ScriptEngineManager service to be unregistered and registered again.
> We should probably prevent this, maybe along these lines:
> * Register the ScriptEngineManager as a service during the whole lifetime
> of the Scripting Core
> * The registered ScriptEngineManager is a proxy to the actual
> ScriptEngineManager which gets ScriptEngineFactory registered
> * On ScriptEngineFactory update, the proxied ScriptEngineManager is just
> replaced
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira