[
https://issues.apache.org/jira/browse/SLING-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14325654#comment-14325654
]
Carsten Ziegeler commented on SLING-4312:
-----------------------------------------
[~mpetria] Yes I think this goes in the right direction. Some comments:
- you need to handle the amendments as well, whenever one is bound, register a
service user etc.
- mentioning the serviceName should not be required as this is the calling
bundle. You don't want to hardcode bundle symbolic names in your code. Not sure
what the best way is.
We could say, that these mapping services are only visible to the bundles which
they are declared for; so we could use a service hook to filter out services.
But maybe there is an easier/lightweight solution to that
> 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
>
> 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)