Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Jetty 10 with ALPN / H2 on the class path


On Mon, Jan 25, 2021 at 10:30 PM Eirik Bjørsnøs <eirbjo@xxxxxxxxx> wrote:
> If Jetty had done this:
> ServiceLoader.load(Server.class, Server.class.getClassLoader())
> Instead of this:
> ServiceLoader.load(Server.class)
> Then I think things would just work out of the box, without having to call Thread.currentThread().setContextClassLoader() first.

I don't think it's correct that we hardcode the Server classloader to
load these services.
The point of the services is that you can implement your own and have
it loaded from non-yours classes.
The TCCL is the way to pass the classloader implicitly from your code
to non-your code, so I think it's the correct way to do it.

Simone Bordet
Developer advice, training, services and support
from the Jetty & CometD experts.

Back to the top