[ https://issues.apache.org/jira/browse/SLING-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14352935#comment-14352935 ]
Marius Petria commented on SLING-4312: -------------------------------------- Hi [~fmeschbe] I think your points are fine, one I would like to comment though. ServiceUserMapping.getSubServiceName() is useful if a component takes the subServiceName as a parameter via an osgi config. You would need to provide the subServiceName to bind the ServiceUserMapping (mapping.target=(subServiceName=dedicatedUserService)) and again as a dedicated OSGI config property (componentSubServiceName=dedicatedUserService). That redundancy can be avoided by being able to query the mapping for the mapped subServiceName. Can you also share your thoughts on the relation with SLING-4461? One issue with the current implementation of this marker interface is that it cannot accurately represent the fact that a call to ServiceUserMapper.getServiceUserID will succeed if and only if a mapping is registered. That happens because of fallback mappings. More exactly consumer components that bind to a specific subServiceName will not be started even if a default has been configured. That breaks the separation of concerns, meaning that an "administrator" is forced to configure the service users in a particular way (not using the fallbacks). SLING-4461 proposes to drop the fallbacks but that will introduce a breaking change. WDYT? > 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)