You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2007/10/03 21:29:50 UTC

[jira] Created: (SLING-36) ScriptedComponent has a static reference to ScriptManager which seems to stick beyond bundle udpate

ScriptedComponent has a static reference to ScriptManager which seems to stick beyond bundle udpate
---------------------------------------------------------------------------------------------------

                 Key: SLING-36
                 URL: https://issues.apache.org/jira/browse/SLING-36
             Project: Sling
          Issue Type: Bug
          Components: Scripting
    Affects Versions: 2.0.0
            Reporter: Felix Meschberger
            Priority: Critical
             Fix For: 2.0.0


The ScriptedComponent uses the ScriptManager to resolve the script to ComponentRenderer to actually call the script. This reference is static and obviously even survives PackageAdmin.resolveBundle() calls if the scripting core bundle is updated.

The ScriptedComponent instances are loaded by the Core bundle and instantiated by the Content-JCR bundle.

It has to be discovered whether this is a class loader artefact which may have to be solved in the realm of Felix as the OSGi framework.

On the other hand, using a static reference to a class is not the best of all solutions. A better solution trating the ScriptManager as a service must be found.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-36) Repository Based components not cleaned up when not existing any longer

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-36?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-36:
-----------------------------------

    Component/s:     (was: Scripting)
                 Core
    Description: 
The RepositoryComponentRegistration services access the JCR repository to see whether there are any component descriptors stored in the repository and updates the component registry in case of new, modified or removed components.

Unfortunately, this service does not pay attention to the fact, that a bundle providing mappings for such components may be stopped, removed, added or updated. In such cases the registered components are not touched and stay. In fact new components will not be visible until after a restart of the RepositoryComponentResgistration.

The registration of JCR based components must be modified to take into account that OCM mappings for such components may be added and/or removed at run time and that there is another influence on the state of registered components than just the repository.

  was:
The ScriptedComponent uses the ScriptManager to resolve the script to ComponentRenderer to actually call the script. This reference is static and obviously even survives PackageAdmin.resolveBundle() calls if the scripting core bundle is updated.

The ScriptedComponent instances are loaded by the Core bundle and instantiated by the Content-JCR bundle.

It has to be discovered whether this is a class loader artefact which may have to be solved in the realm of Felix as the OSGi framework.

On the other hand, using a static reference to a class is not the best of all solutions. A better solution trating the ScriptManager as a service must be found.

        Summary: Repository Based components not cleaned up when not existing any longer  (was: ScriptedComponent has a static reference to ScriptManager which seems to stick beyond bundle udpate)

The issue is actually different and just manifests itself such that the ScriptComponent still refers to an
old instance of the ScriptManager. The real cause is, that the JCR based Components (of which ScriptedComponent is an instance) are not removed from the system once the bundle providing the implementation class and OCM mapping are stopped.

This causes the ScriptComponents to stay and still have the old reference.

> Repository Based components not cleaned up when not existing any longer
> -----------------------------------------------------------------------
>
>                 Key: SLING-36
>                 URL: https://issues.apache.org/jira/browse/SLING-36
>             Project: Sling
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0
>            Reporter: Felix Meschberger
>            Priority: Critical
>             Fix For: 2.0.0
>
>
> The RepositoryComponentRegistration services access the JCR repository to see whether there are any component descriptors stored in the repository and updates the component registry in case of new, modified or removed components.
> Unfortunately, this service does not pay attention to the fact, that a bundle providing mappings for such components may be stopped, removed, added or updated. In such cases the registered components are not touched and stay. In fact new components will not be visible until after a restart of the RepositoryComponentResgistration.
> The registration of JCR based components must be modified to take into account that OCM mappings for such components may be added and/or removed at run time and that there is another influence on the state of registered components than just the repository.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SLING-36) Repository Based components not cleaned up when not existing any longer

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-36?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed SLING-36.
----------------------------------

    Resolution: Won't Fix

Issue pertains to former Component API and has no correspondence with the new Sling API. Closing.

> Repository Based components not cleaned up when not existing any longer
> -----------------------------------------------------------------------
>
>                 Key: SLING-36
>                 URL: https://issues.apache.org/jira/browse/SLING-36
>             Project: Sling
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0
>            Reporter: Felix Meschberger
>            Priority: Critical
>             Fix For: 2.0.0
>
>
> The RepositoryComponentRegistration services access the JCR repository to see whether there are any component descriptors stored in the repository and updates the component registry in case of new, modified or removed components.
> Unfortunately, this service does not pay attention to the fact, that a bundle providing mappings for such components may be stopped, removed, added or updated. In such cases the registered components are not touched and stay. In fact new components will not be visible until after a restart of the RepositoryComponentResgistration.
> The registration of JCR based components must be modified to take into account that OCM mappings for such components may be added and/or removed at run time and that there is another influence on the state of registered components than just the repository.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.