felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-5446) Http Service ignores Whiteboard Servlet API Listeners
Date Mon, 12 Dec 2016 12:19:58 GMT

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

Carsten Ziegeler commented on FELIX-5446:

The web console uses the DTOs.

There are two context implementations, one for the context of the http service and the other
one for the whiteboard contexts. I assume that the context implementation for the http service
is not considering the listeners registered through the official whiteboard but just calling
the listeners registered through the old felix whiteboard.
I think the problematic part is the ServletContextManager class which is not considering listeners
from the official whiteboard

> Http Service ignores Whiteboard Servlet API Listeners
> -----------------------------------------------------
>                 Key: FELIX-5446
>                 URL: https://issues.apache.org/jira/browse/FELIX-5446
>             Project: Felix
>          Issue Type: Bug
>          Components: HTTP Service
>    Affects Versions: http.base-3.0.16, http.jetty-3.4.0
>            Reporter: Felix Meschberger
>            Assignee: Carsten Ziegeler
>             Fix For: http.base-3.0.18, http.jetty-3.4.2
> Situation:
> # A ServletRequestListener registered with the Http Whiteboard Service (standard OSGi
Http Whiteboard) with property {{osgi.http.whiteboard.listener==true}}.
> # A Servlet registered with the traditional OSGi HttpService
> Problem: The ServletRequestListener is not called for requests for requests to said servlet.
> Investigation: It looks like the ServletRequestListenerManager used to handle ServletRequestListener
services for traditionally registered Servlets explicitly ignores listeners registered with
the {{osgi.http.whiteboard.listener}} property set. See this code in [ServletRequestListenerManager|https://github.com/apache/felix/blob/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/service/listener/ServletRequestListenerManager.java#L45].
> For one thing, the listener should at best ignore services registered with the property
set to true. If the property is set to anything else, it will explicitly be ignored by the
OSGi Whiteboard Http Service and thus should probably be accepted by the legacy Felix Http
Service implementation.
> On the other hand: Why ignore at all ? Originally the legacy Felix Http Service accepted
all Servlet API listeners regardless of such property set. So if there is a listener used
and the Jetty bundle is updated and the service updated to make sure it is called for new
OSGi Whiteboard services it will not be called any more for the legacy registered services
> I think the legacy Felix Http Service should just accept all listeners like it always

This message was sent by Atlassian JIRA

View raw message