Hello

Great about Karaf 4.3.0!

And here's my traditional report on Pax Web 8 ;)

I've just pushed new master-improvements changes after huge change of
already refactored model. Simply because of this statement from OSGi CMPN
"140.4 Registering Servlets":

With implementations that both implement this specification as well as the
> Http Service Specification, situations can arise where a servlet is
> registered for the same pattern with the Http Service as well as with the
> Http Whiteboard. The Servlet Context of the Http Service is treated in the
> same way as all contexts managed by the Whiteboard implementation. *The
> highest ranking is associated with the context of the Http Service.*
>

This changed situation _slightly_, but all the tests (and tens of new ones)
work again. Also I've finally implemented what I anticipated (>1 year ago!)
to be the most difficult part - when a servlet (or other element) is
registered with:

osgi.http.whiteboard.context.select = (osgi.http.whiteboard.context.name=*)

then each time new Whiteboard context is registered (or unregistered), a
servlet (or other element) should be re-registered to new context. Funny
situation arises when a servlet was registered to a context with:

osgi.http.whiteboard.context.name = x
osgi.http.whiteboard.context.path = /

and a higher-ranked context is registered with:

osgi.http.whiteboard.context.name = x
osgi.http.whiteboard.context.path = /new-path

Then a servlet should be automatically re-registered from "/" to
"/new-path" context. In felix-http it's not that problematic, as everything
happens within a context (...) of single "dispatcher servlet". But with
actual Jetty/Tomcat/Undertow running underneath it wasn't so funny.

Also I've finally implemented proper "context classloaders" and JSPs
(supported by ServietContainerInitializers). Tag files and taglibs are
properly handled without forcing user to add Import-Package for e.g.,
org.apache.taglibs. See:

OsgiServletContextClassLoader loader = new OsgiServletContextClassLoader();
loader.addBundle(osgiModel.getOwnerBundle());
loader.addBundle(paxWebJettyBundle);
loader.addBundle(Utils.getPaxWebJspBundle(paxWebJettyBundle));
loader.makeImmutable();

The above classloader (which only delegates and never does anything in
ClassLoader.findClass()) is set as THE classloader of
org.eclipse.jetty.servlet.ServletContextHandler /
org.apache.catalina.core.StandardContext /
io.undertow.servlet.api.DeploymentInfo each time a "highest ranked" Osgi
Context Model (ServletContextHelper underneath) changes for given context
path.

I'm finally ready (but need to do some other work for a while) to tackle
pax-web-extender-war. It (as it does in Pax Web 7) build upon existing
registerXXX() methods of WebContainer, but with new batch support.

thanks for patience and best regards
Grzegorz Grzybek

śr., 7 paź 2020 o 10:35 Jean-Baptiste Onofre <j...@nanthrax.net> napisał(a):

> Hi guys,
>
> I have the last PR to open and merge (json cfg file support) and I will
> propose Karaf 4.3.0 to vote.
>
> I’m also preparing a blog post about some new features in Karaf 4.3.0.
>
> Stay tuned ;)
>
> Regards
> JB

Reply via email to