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 2010/06/07 15:15:48 UTC

[jira] Created: (SLING-1548) Move bundle event handling to Loader (from AbstractSlingRepository)

Move bundle event handling to Loader (from AbstractSlingRepository)
-------------------------------------------------------------------

                 Key: SLING-1548
                 URL: https://issues.apache.org/jira/browse/SLING-1548
             Project: Sling
          Issue Type: Bug
          Components: JCR
    Affects Versions: JCR Base 2.0.6
            Reporter: Felix Meschberger
            Assignee: Felix Meschberger
             Fix For: JCR Base 2.1.0


I am looking at a strange situation starting Sling Trunk build. Not all namespace prefixes seem to be registered in the Loader class of the JCR Base bundle.

IMHO the setup in the JCR Base Bundle between the AbstractSlingRepository and the Loader is not optimal:

  * AbstractSlingRepository implements SynchronousBundleListener
     to just forward the events to the Loader
  * There is a time gap between the time the Loader class is
     instantiated (and handling a set of bundles) and the time
     AbstractSlingRepository is registered as a bundle listener
  * There is a bug in the Loader constructor preventing all
     just INSTALLED bundles from being registered by the BundleListener
     only handles the INSTALLED (and UNINSTALLED and UPDATED) events.

The last part will certainly miss some bundles.

I suggest we change this setup such, that the Loader itself is the bundle listener handles the events itself. The AbstractSlingRepository just sets up the loader and uses it.

As a result handling events is completely where it should be (in the Loader) and the AbstractSlingRepository does not leak implementation detail (being a bundle listener) to downstream extensions of the class.

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


[jira] Updated: (SLING-1548) Move bundle event handling to Loader (from AbstractSlingRepository)

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

Felix Meschberger updated SLING-1548:
-------------------------------------

    Attachment: SLING-1548.patch

Patch moving bundle event handling to the Loader class and fixing the bundle filter for first-time setup in the constructor

> Move bundle event handling to Loader (from AbstractSlingRepository)
> -------------------------------------------------------------------
>
>                 Key: SLING-1548
>                 URL: https://issues.apache.org/jira/browse/SLING-1548
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR
>    Affects Versions: JCR Base 2.0.6
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: JCR Base 2.1.0
>
>         Attachments: SLING-1548.patch
>
>
> I am looking at a strange situation starting Sling Trunk build. Not all namespace prefixes seem to be registered in the Loader class of the JCR Base bundle.
> IMHO the setup in the JCR Base Bundle between the AbstractSlingRepository and the Loader is not optimal:
>   * AbstractSlingRepository implements SynchronousBundleListener
>      to just forward the events to the Loader
>   * There is a time gap between the time the Loader class is
>      instantiated (and handling a set of bundles) and the time
>      AbstractSlingRepository is registered as a bundle listener
>   * There is a bug in the Loader constructor preventing all
>      just INSTALLED bundles from being registered by the BundleListener
>      only handles the INSTALLED (and UNINSTALLED and UPDATED) events.
> The last part will certainly miss some bundles.
> I suggest we change this setup such, that the Loader itself is the bundle listener handles the events itself. The AbstractSlingRepository just sets up the loader and uses it.
> As a result handling events is completely where it should be (in the Loader) and the AbstractSlingRepository does not leak implementation detail (being a bundle listener) to downstream extensions of the class.

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


[jira] Resolved: (SLING-1548) Move bundle event handling to Loader (from AbstractSlingRepository)

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

Justin Edelson resolved SLING-1548.
-----------------------------------

    Resolution: Fixed

applied a modified version of Felix's patch in r991929

> Move bundle event handling to Loader (from AbstractSlingRepository)
> -------------------------------------------------------------------
>
>                 Key: SLING-1548
>                 URL: https://issues.apache.org/jira/browse/SLING-1548
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR
>    Affects Versions: JCR Base 2.0.6
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: JCR Base 2.1.0
>
>         Attachments: SLING-1548.patch
>
>
> I am looking at a strange situation starting Sling Trunk build. Not all namespace prefixes seem to be registered in the Loader class of the JCR Base bundle.
> IMHO the setup in the JCR Base Bundle between the AbstractSlingRepository and the Loader is not optimal:
>   * AbstractSlingRepository implements SynchronousBundleListener
>      to just forward the events to the Loader
>   * There is a time gap between the time the Loader class is
>      instantiated (and handling a set of bundles) and the time
>      AbstractSlingRepository is registered as a bundle listener
>   * There is a bug in the Loader constructor preventing all
>      just INSTALLED bundles from being registered by the BundleListener
>      only handles the INSTALLED (and UNINSTALLED and UPDATED) events.
> The last part will certainly miss some bundles.
> I suggest we change this setup such, that the Loader itself is the bundle listener handles the events itself. The AbstractSlingRepository just sets up the loader and uses it.
> As a result handling events is completely where it should be (in the Loader) and the AbstractSlingRepository does not leak implementation detail (being a bundle listener) to downstream extensions of the class.

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


[jira] Closed: (SLING-1548) Move bundle event handling to Loader (from AbstractSlingRepository)

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

Justin Edelson closed SLING-1548.
---------------------------------


> Move bundle event handling to Loader (from AbstractSlingRepository)
> -------------------------------------------------------------------
>
>                 Key: SLING-1548
>                 URL: https://issues.apache.org/jira/browse/SLING-1548
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR
>    Affects Versions: JCR Base 2.0.6
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: JCR Base 2.1.0
>
>         Attachments: SLING-1548.patch
>
>
> I am looking at a strange situation starting Sling Trunk build. Not all namespace prefixes seem to be registered in the Loader class of the JCR Base bundle.
> IMHO the setup in the JCR Base Bundle between the AbstractSlingRepository and the Loader is not optimal:
>   * AbstractSlingRepository implements SynchronousBundleListener
>      to just forward the events to the Loader
>   * There is a time gap between the time the Loader class is
>      instantiated (and handling a set of bundles) and the time
>      AbstractSlingRepository is registered as a bundle listener
>   * There is a bug in the Loader constructor preventing all
>      just INSTALLED bundles from being registered by the BundleListener
>      only handles the INSTALLED (and UNINSTALLED and UPDATED) events.
> The last part will certainly miss some bundles.
> I suggest we change this setup such, that the Loader itself is the bundle listener handles the events itself. The AbstractSlingRepository just sets up the loader and uses it.
> As a result handling events is completely where it should be (in the Loader) and the AbstractSlingRepository does not leak implementation detail (being a bundle listener) to downstream extensions of the class.

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