Pax Web 8 - WabAugmentingIntegrationTest works

3 views
Skip to first unread message

Grzegorz Grzybek

unread,
Sep 7, 2021, 10:35:38 AM9/7/21
to op...@googlegroups.com, Karaf Dev
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
Reply all
Reply to author
Forward
0 new messages