You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Grzegorz Grzybek <gr...@gmail.com> on 2021/09/07 14:35:20 UTC

Pax Web 8 - WabAugmentingIntegrationTest works

Hello

I'd like to share good news. The remaining task before GA seems to be DTOs
only (I just have to review the work made initially Marc Schlegel to check
how everything works with my changes).

What "WAB Augmenting" means?

the test:
 - installs a WAB with web.xml and single servlet
 - checks that it works
 - installs a Whiteboard filter targeting the WAB using
osgi.http.whiteboard.context.select=(osgi.http.whiteboard.context.path=/war-bundle)
selector
 - checks that it works - the filter should be used before the WAB's servlet
 - obtains a HttpService instance using bundle context of the WAB and calls
plain old HttpService.registerServlet()
 - checks again that the Whiteboard filter can filter access both to the
WAB's servlet AND to the HttpService servlet
 - stops the WAB
 - checks that nothing works (WAB's servlet, HttpService servlet and
Whiteboard filter), but...
 - ... I register a `ServletContextHelper` with
"osgi.http.whiteboard.context.path=/war-bundle", so the Filter which is NOT
yet unregistered can be satisfied (based on its context selector)
 - checks that the filter works again!

Actually this concludes the 3-way access to Pax Web, where underlying
context can be manipulated easily (I hope) using standard OSGi CMPN methods.

kind regards
Grzegorz Grzybek