[
https://issues.apache.org/jira/browse/SLING-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14352981#comment-14352981
]
Felix Meschberger commented on SLING-4312:
------------------------------------------
bq. ServiceUserMapping.getSubServiceName() is useful if a component takes the
subServiceName as a parameter via an osgi config
I don't fully understand why the getSubServiceName() may be usefull in this
context ? If the Subservice Name is available as a property from the service
reference, which is required to support the target filter, you can get that
exact value from the respective ServiceReference, which in turn is always the
first step in getting a service.
bq. Can you also share your thoughts on the relation with SLING-4461?
I think, as proposed in SLING-4461, the filter to support this situation could
be used as such, yet I agree this is complicated. In addition, if we have a
default mapping, we could register that with a default service name, which can
be passed through by the ServiceUserMappingBundleFilter and thus made visible.
Or maybe the default mapping setup was just a bad idea ?
> 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)