You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Thomas Baier (JIRA)" <ji...@apache.org> on 2015/04/30 17:54:08 UTC

[jira] [Commented] (FELIX-4860) Revisit HandlerRegistry implementation

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

Thomas Baier commented on FELIX-4860:
-------------------------------------

There are the following requirements the HandlerRegistry currently provides:

h4. Lookup
* Servlets
** by path/url: first in the servlet context with longest matching path, then in other servlet contexts in the order of their ranking, take wildcards into account
** by servlet context id + name

* Error pages - are bound to a servlet context
** by context id + exception/error code: only highest ranking page
** by servlet context path (only 404?)

* Filters - are bound to a servlet context
** by context id + path
** by context id + regex
** by context id + servlet name
** filters can be registered with multiple of the above, list of all matches ordered by ranking

h4. Registration
h5. Addition:
* Servlets
** by ServletHandler, servlets can be shadowed across servlet contexts
* Error pages
** by ServletHandler, error pages can be shadowed within a servlet context
* Filters
** by FilterHandler

h5. Removal
* Servlets
** by ServletInfo
** by servlet
* Error pages
** by ServletInfo
* Filters
** by FilterInfo
** by Filter

Servlets need to be initialized/destroyed when they are shadowed/activated
Shadowed servlets need to appear as failure DTOs

> Revisit HandlerRegistry implementation
> --------------------------------------
>
>                 Key: FELIX-4860
>                 URL: https://issues.apache.org/jira/browse/FELIX-4860
>             Project: Felix
>          Issue Type: Sub-task
>          Components: HTTP Service
>            Reporter: Thomas Baier
>             Fix For: http.base-3.0.0
>
>
> The implementation of the HandlerRegistry class needs to be revisited.   There is quite some code duplication between the code for the servlet handler registrations and error pages/filter registrations. Also it might be worth checking if the current division into a  servlet handler registry and a per context registry is the best solution, also with FELIX-4779 in mind. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)