You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Julian Sedding (JIRA)" <ji...@apache.org> on 2017/09/19 10:12:00 UTC

[jira] [Comment Edited] (SLING-7139) ScriptEngineManagerFactory does not register ScriptEngineFactory references

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

Julian Sedding edited comment on SLING-7139 at 9/19/17 10:11 AM:
-----------------------------------------------------------------

[~rombert] You could move the {{\@Reference}} annotation to the bind method.


was (Author: jsedding):
You could move the {{\@Reference}} annotation to the bind method.

> ScriptEngineManagerFactory does not register ScriptEngineFactory references
> ---------------------------------------------------------------------------
>
>                 Key: SLING-7139
>                 URL: https://issues.apache.org/jira/browse/SLING-7139
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>            Reporter: Robert Munteanu
>            Priority: Critical
>             Fix For: Scripting Core 2.0.48
>
>
> It seems that the {{bind}} methods are not called any more, the simple fix that I found was
> {noformat}diff --git a/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptEngineManagerFactory.java b/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptEngineManagerFactory.java
> index fe60415c17..79fef581eb 100644
> --- a/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptEngineManagerFactory.java
> +++ b/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptEngineManagerFactory.java
> @@ -60,7 +60,9 @@ import org.slf4j.LoggerFactory;
>          name = "ScriptEngineFactory",
>          service = ScriptEngineFactory.class,
>          policy = ReferencePolicy.DYNAMIC,
> -        cardinality = ReferenceCardinality.MULTIPLE
> +        cardinality = ReferenceCardinality.MULTIPLE,
> +        bind = "bindScriptEngineFactory",
> +        unbind = "unbindScriptEngineFactory"
>      )
>  )
>  public class ScriptEngineManagerFactory implements BundleListener {
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)