[ANN] Pax Web 8.0.0 released!

4 views
Skip to first unread message

Grzegorz Grzybek

unread,
Sep 17, 2021, 4:23:26 AM9/17/21
to ops4j-ann...@googlegroups.com
Hello

It is my big pleasure to announce the release of Pax Web 8.

After almost two years of refactorings and code reviewing in my spare time, I believe the release is just-enough (because I didn't yet run OSGi CMPN TCK) implementation of 3 specifications:
  • HttpService Specification (chapter 102 of OSGi R7 CMPN)
  • Web Applications Specification (chapter 128 of OSGi R7 CMPN)
  • Whiteboard Service specification (chapter 140 of OSGi R7 CMPN)
The architecture and the main goals of Pax Web 8 are preserved, which means:
  • there are 3 main "runtime" bundles - for Jetty, for Tomcat and for Undertow
  • the runtime is 1-class citizen of Pax Web, which means it is possible to configure given runtime using container-specific configuration file (like jetty.xml, tomcat-server.xml and undertow.xml). It's a bit different approach than the "dispatcher servlet" method
It is very important to emphasize that "container-first" (instead of "specification-first") approach leads to one big violation of Whiteboard specification:

If there are two contexts configured - "/foo" and "/" and when there's a request incoming with http://localhost:8080/foo/x URI and when "/foo" context doesn't have any mapping for "/x" servlet/resources, the dispatching stops and 404 is returned. Whiteboard specification mandates searching "/" context for "/foo/x" mapping.

There _may_ be ways to comply to this requirement (see chapter 140.2), but the non-compliant behavior comes from Servlets specification itself and how contexts and handlers work in Jetty/Tomcat/Undertow.

The main theme of Pax Web 8 is fixing one big flaw of Pax Web 7 regarding Whiteboard specification.

Whiteboard specification describes "osgi.http.whiteboard.context.select" service registration property that should be an LDAP expression that "selects" target "contexts" where given web element (servlet, filter, ...) should be registered.
Pax Web 7 was simply taking the <value> out of the property value, so for:


"myCTX" was taken. Pax Web 7 never handled selectors like this:

osgi.http.whiteboard.context.name=(|(osgi.http.whiteboard.context.path=/path1)(osgi.http.whiteboard.context.path=/path2))

The original issue mentioning this problem is PAXWEB-1123/#1413[1].

This single problem was the ultimate reason why I started the refactoring in the first place.

Another reason (though Pax Web 7 wasn't THAT problematic here) was to ensure that typical, modern WARs (with SCIs, web-fragment.xml, annotated elements in WEB-INF/classes and WEB-INF/lib/*.jars) work in Pax Web 8 without problems. I've provided samples for Vaadin (8 and 20), Primefaces and Myfaces).

Such release definitely requires much more information, but trust me - I'll provide more details when I have time. Also the manual will be refreshed (at some point).

Thank you very much for your support and patience!

regards
Grzegorz Grzybek
====
Reply all
Reply to author
Forward
0 new messages