On Fri, Apr 4, 2025 at 6:48 PM [email protected] <
[email protected]> wrote:

> Relatively solved indeed, that's what I expected, which worked for my PoC
> modules.
>
> The first problem I encountered was loading some application classes
> through the DevMode launcher's classloader and some others from the
> application classloader.
> for example: SpringFramework interfaces loaded from the isolated DevMode
> classloader but concrete implementation classes loaded from the application
> classloader, which produced class loading errors.
>
> I had to start excluding dependencies from the Jetty container's
> WEB-INF/lib folder using a specific technique so that the classes would be
> all loaded from the classloader of DevMode instead, but even that wasn't
> enough.
>
> The problem got worse when I tried to make use of even more dynamic
> frameworks like SpringSecurity, being unable to prepare the underlying
> component chains, which is where I stopped.
>
> Overall, it seems that even though the DevMode classloader is isolated, a
> lot of trickery may still be required.
>

I haven't looked at the code, but in case you were on that path: please do
not try to mimic the current behavior where server-side classes can be
loaded from the classpath. Having a breaking change like this is a great
opportunity to ditch that and just require that server-side classes are
within WEB-INF/classes and WEB-INF/lib. That way, you use the server's
already implemented and battle-tested classloaders respecting the Jakarta
Servlet specs for precedence and isolation.
That custom classloader was the main reason Jetty wasn't updated more often
(in addition to changing its API in minor or even patch releases).

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAEayHEPb8%3DAbSG8WjwLbxB7jdQ2PKYU_6hPwFFHtzcKgNhsaaQ%40mail.gmail.com.

Reply via email to