[ https://issues.apache.org/jira/browse/SLING-7624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16493135#comment-16493135 ]
Julian Sedding edited comment on SLING-7624 at 5/29/18 6:43 AM: ---------------------------------------------------------------- [~kwin] Thanks for the explanation! I like keeping things simple, especially for developers who use these APIs only occasionally. I would therefore suggest removing {{@SlingServletName}} all together. If someone wants to set it, they can do so easily without the convenience annotation. Having a separate annotation for "sling.servlet.prefix" seems overkill to me, but I can live with it. Especially because it doesn't get used a lot. [~cziegeler] My rationale goes a bit differently: {{@SlingServletPaths}} and {{@SlingServletResourceTypes}} are mutually exclusive (even though not technically enforced), so defining {{prefix}} in both is a purely hypothetical case. Furthermore, {{prefix}} by itself has no semantics defined. So it seems more appropriate to add it to the annotation(s) where it has a meaning. IMHO that would guide users (well... downstream devs) better to avoid mistakes and make the feature more discoverable. I assume you're referring to the OSGi annotations {{@ServiceRanking}}, {{@ServiceDescription}} and {{@ServiceVendor}}. While they all describe common properties of services, only the {{service.ranking}} has a defined function in OSGi, {{service.description}} and {{service.vendor}} are purely informational. Therefore, they seem to be more independent of each other. Anyway, this is certainly an area where there's a lot of room for personal opinion and judgement :) was (Author: jsedding): [~kwin] Thanks for the explanation! I like keeping things simple, especially for developers who use these APIs only occasionally. I would therefore suggest removing {{@SlingServletName}} all together. If someone wants to set it, they can do so easily without the convenience annotation. Having a separate annotation for "sling.servlet.prefix" seems overkill to me, but I can live with it. Especially because it doesn't get used a lot. > Add OSGi7 component property annotations for Servlet and Filter > --------------------------------------------------------------- > > Key: SLING-7624 > URL: https://issues.apache.org/jira/browse/SLING-7624 > Project: Sling > Issue Type: New Feature > Components: Servlets > Reporter: Konrad Windszus > Assignee: Konrad Windszus > Priority: Major > > Previously there were annotations hosted at Felix for Sling Servlets/Filters > as custom Felix SCR annotations > (https://github.com/apache/felix/tree/trunk/tools/org.apache.felix.scr.annotations/src/main/java/org/apache/felix/scr/annotations/sling). > With OSGi R7 and DS 1.4 component property annotations are specified. Sling > should provide those annotations in a dedicated new artifact. Compare also > with FELIX-5396. > Those are supported in the upcoming bnd 4.0 > (https://github.com/bndtools/bnd/issues/2163). -- This message was sent by Atlassian JIRA (v7.6.3#76005)