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

Marius Petria commented on SLING-4312:
--------------------------------------

bq. you can get that exact value from the respective ServiceReference, which in 
turn is always the first step in getting a service.

That is right but then you will have to parse the target filter which might be 
hard (imagine an OR filter). The guarantee offered by the ServiceUserMapping is 
that if it is bound to something then calling 
getServiceUserID(bundle,mapping.getSubServiceName()) will succeed. But we can 
drop this method if you think the argument is not strong enough.




> 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
>            Assignee: Marius Petria
>             Fix For: Service User Mapper 1.1.2
>
>         Attachments: SLING-4312.1.diff, 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)

Reply via email to