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

Konrad Windszus commented on SLING-7624:
----------------------------------------

bq. I'd agree with Julian Sedding, if servlet name & servlet prefix are not 
common settings, why make a dedicated annotation? I'm wondering if this will 
cause people to start using these when it's really not necessary vs only using 
the properties when needed.

I agree with [~cziegeler] in this point. Every component property in the 
context of servlets should also encapsulated in an annotation. What makes you 
think that people start to use those annotations if they haven't set the 
according properties in the past? IMHO the javadoc is pretty clear, but feel 
free to further clarify it. Additional annotations which have clear javadocs 
don't make things any more complicated.
bq. Rather than having separate annotations for Resource Type & Path based 
servlets, it seems easier to understand to just have a single annotation...
In my experience over 90% of the developers haven't really understood that 
extension, selector and method only applies to resource type based servlets. 
Having two dedicated annotation is the only way I can think of to prevent this 
misunderstanding. Your proposed SlingServlet annotation with complex property 
type is not really simple IMHO and also I doubt that this is supported by Java 
at all.
bq. Why is the Filter annotation, @SlingServletFilter instead of @SlingFilter 
like it was in the Felix annotations? 
The class name for single element annotations is not completely free as the 
property name is derived from it. Please read the according OSGi spec and also 
my comment in 
https://issues.apache.org/jira/browse/SLING-7624?focusedCommentId=16490791&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16490791.


> 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)

Reply via email to