[
https://issues.apache.org/jira/browse/SLING-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14329054#comment-14329054
]
Felix Meschberger commented on SLING-4312:
------------------------------------------
Please, reconsider this ServiceUserMapping service !
This service has two major issues:
# It -exposes- leaks an (administrative) implementation detail to developers:
The service name is internal derived from the bundle providing the service. It
is documented with the bundle how its dervied and its made available to
adminitrators for them to configure the mapping. With this service we expose
this implementation detail to developers. I am really not in favor of such a
thing.
# A service may have multiple subservices. This ServiceUserMapping just exposes
a single sub service. Thus we will have ServiceUserMapping service for each
subservice and thus a proliferation of services whose uses are really limited
to a select few cases.
Also, going back to the original issue: Why do we need this "fix" (or band-aid,
if you will) ?
> Register an osgi service for each available service user
> ---------------------------------------------------------
>
> Key: SLING-4312
> URL: https://issues.apache.org/jira/browse/SLING-4312
> Project: Sling
> Issue Type: Improvement
> Components: Service User Mapper
> Reporter: Marius Petria
> Attachments: SLING-4312.diff
>
>
> In order to only activate osgi components when a service user mapping is
> available it would be useful to have an osgi service registered for a service
> user. A component can reference the registered service name and only start
> when that becomes available.
> {code}
> @Reference(target="(name=serviceName)")
> ServiceUserExists userExists;
> {code}
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)