Servlet API Event Support

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Servlet API Event Support

Felix Meschberger-3
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.