You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2016/08/30 05:32:20 UTC

[jira] [Commented] (SLING-6014) [ServiceBlacklister] Allow to blacklist OSGi services given generic criteria to prevent finding them in OSGi container

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

Bertrand Delacretaz commented on SLING-6014:
--------------------------------------------

Thanks for this, I think it is useful in specific situations where legacy services need to be hidden in an evolving system. Having this as a Sling contrib module makes sense to me.

> [ServiceBlacklister] Allow to blacklist OSGi services given generic criteria to prevent finding them in OSGi container
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-6014
>                 URL: https://issues.apache.org/jira/browse/SLING-6014
>             Project: Sling
>          Issue Type: New Feature
>          Components: Extensions
>            Reporter: Arek Kita
>
> h3. Case study
> The OSGi container gives an ability for specific {{InterfaceAB}} to find a service that implements given interface. Sometimes more services might implement and satisfy this interface, i.e. {{ServiceA}} and {{ServiceB}}. Based on service ranking (if present) services are used in specific order.
> h3. The purpose
> The goal of service blacklister is to *exclude* i.e. {{ServiceB}} from finding in OSGi container so always {{ServiceA}} gets used no matter what service ranking is specified.
> h3. Typical use cases
> Imagine that {{ServiceB}} gets deprecated and it should be no longer used and referenced, however it is widespread and there is no easy way of identifying its bundle (multiple bundles or in other words bundles with different symbolic names may provide it) or it can be installed using many ways and for existing Sling instances there no easy way of disabling it by changing service ranking or uninstalling unknown bundle.
> The service blacklister idea accepts the fact that the service might live still in OSGi container but using a service-related (service-oriented) generic criteria and [FindHook|https://osgi.org/javadoc/r4v42/org/osgi/framework/hooks/service/FindHook.html] API the service might be excluded from OSGi service find operations which effectively prevents this service from being referenced.
> h3. The idea
> The idea would be to create a generic *{{ServiceBlacklister}}* OSGi component that allows to specify OSGi configurations through configuration factory defining a generic criteria (i.e. LDAP-like search query criteria) for blacklisting services.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)