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

Dan Klco commented on SLING-7624:
---------------------------------

Trying to think of this from the basis of a standard developer's perspective, I 
want to make sure we're not causing more confusion with these new annotations. 
A couple thoughts:
 * I'd agree with [~jsedding], 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.
 * Rather than having separate annotations for Resource Type & Path based 
servlets, it seems easier to understand to just have a single annotation. It's 
less documentation for developers to read and it makes switching mildly easier. 
Would it be possible to do something like:

{code:java}
@SlingServlet(registration={PathRegistration(path="/bin/dosomething")})
@SlingServlet(registration={ResourceTypeRegistration(resourceType={"myapp/mytype"})}){code}
I'm imagining unfortunately not because I can't see how the properties would 
get properly parsed out, but I'd be happy to be wrong...
 * Why is the Filter annotation, @SlingServletFilter instead of @SlingFilter 
like it was in the Felix annotations? 
http://felix.apache.org/documentation/subprojects/apache-felix-maven-scr-plugin/extending-scr-annotations.html

> 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