[jira] [Commented] (SLING-11315) Reject duplicate servlet mount configurations

2022-05-11 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-11315:
-

For the case listed in this issue only the last criteria from 
https://sling.apache.org/documentation/the-sling-engine/servlets.html#servlet-resolution-order
 is relevant (service.ranking). 

> Reject duplicate servlet mount configurations
> -
>
> Key: SLING-11315
> URL: https://issues.apache.org/jira/browse/SLING-11315
> Project: Sling
>  Issue Type: New Feature
>  Components: Servlets
>Reporter: Adrian Kozma
>Priority: Major
>
> Multiple servlets having the same mount parameters should trigger an error.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Commented] (SLING-11315) Reject duplicate servlet mount configurations

2022-05-11 Thread Bertrand Delacretaz (Jira)


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

Bertrand Delacretaz commented on SLING-11315:
-

The docs that you mention are about multiple servlets matching the current 
request, which is fine and by design, when multiple servlets with _different 
mount parameters_ match at different levels.

What we're talking about here is multiple servlets registered with the _exact 
same_ mount parameters, like in [my new 
test|https://github.com/apache/sling-org-apache-sling-servlets-resolver/commit/1603a0ecb2ab8b4395560c0d53d9e5569b68a568],
 which I don't think ever makes sense.

> Reject duplicate servlet mount configurations
> -
>
> Key: SLING-11315
> URL: https://issues.apache.org/jira/browse/SLING-11315
> Project: Sling
>  Issue Type: New Feature
>  Components: Servlets
>Reporter: Adrian Kozma
>Priority: Major
>
> Multiple servlets having the same mount parameters should trigger an error.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Commented] (SLING-11315) Reject duplicate servlet mount configurations

2022-05-11 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-11315:
-

IMHO this should not trigger an error but the servlet is picked according to 
the rules outlined at 
https://sling.apache.org/documentation/the-sling-engine/servlets.html#servlet-resolution-order.

> Reject duplicate servlet mount configurations
> -
>
> Key: SLING-11315
> URL: https://issues.apache.org/jira/browse/SLING-11315
> Project: Sling
>  Issue Type: New Feature
>  Components: Servlets
>Reporter: Adrian Kozma
>Priority: Major
>
> Multiple servlets having the same mount parameters should trigger an error.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Commented] (SLING-11315) Reject duplicate servlet mount configurations

2022-05-11 Thread Bertrand Delacretaz (Jira)


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

Bertrand Delacretaz commented on SLING-11315:
-

I have tentatively added [a new 
test|https://github.com/apache/sling-org-apache-sling-servlets-resolver/commit/1603a0ecb2ab8b4395560c0d53d9e5569b68a568]
 to the servlets resolver module to check the current behavior.

Running the test multiple times it looks like it's the first registered servlet 
that wins if two are registered with the same mount parameters.

I'm not sure if that's by design or just by chance, but refusing to register 
the second servlet seems to make more sense to me in such cases. I'll discuss 
on our dev list.

> Reject duplicate servlet mount configurations
> -
>
> Key: SLING-11315
> URL: https://issues.apache.org/jira/browse/SLING-11315
> Project: Sling
>  Issue Type: New Feature
>  Components: Servlets
>Reporter: Adrian Kozma
>Priority: Major
>
> Multiple servlets having the same mount parameters should trigger an error.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)