You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Felix Meschberger <fm...@adobe.com> on 2011/01/10 08:55:29 UTC

Servlet API Event Support

Hi all,

I have implemented FELIX-1962 [1] to support forwarding Servlet API
events to listeners registered in the OSGi Framework. This works for
both the bridged and embedded servlet containers (but is a bit more
complex in the bridged case)

I have updated the Sling Launchpad Base and Builder modules to refer to
the deployed 2.0.5-SNAPSHOT bundles to give it a bit of testing in Sling
before the next release of the Http Bundles will be cut.

To listen to events register service(s) with the following interfaces:

   HttpSessionListener -- session created/destroyed events
   HttpSessionAttributeListener -- session attribute events
   ServletRequestListener -- request started/ended events
   ServletRequesAttributeListener -- request attribute events
   ServletContextAttributeListener -- context attribute events

Note, that there is no support for the ServletContextListener (context
initialized/destroyed) because it is not that easy to implement in the
Http Service context and thus not easily mappable. Furthermore I think
it is not that important in an OSGi context anyway.

Regards
Felix

[1] https://issues.apache.org/jira/browse/FELIX-1962