[
https://issues.apache.org/jira/browse/SLING-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14329064#comment-14329064
]
Marius Petria commented on SLING-4312:
--------------------------------------
Hi [~fmeschbe],
1. Actually the serviceName is not necessary to be exposed. We can use only the
subServiceName so I can drop it from the ServiceUserMapping interface.
2. ServiceUserMapping is meant to represent *one* mapping not all.
3. This mechanism is meant to provide a reliable way for a component to start
only when there exists a mapping for the subService it wants to use. The
usecase is that if you want to use loginService in an activate method there is
not way to guarantee that the mapping you need is registered and hence the
ServiceUserMapper.getServiceUserID might fail.
> 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)