Open gkresic opened 1 year ago
I may submit a pull request for this one, but would like first to clarify the strategy for getting there among the two described above.
Since Pippo 1.x supports javax
namespace, it's stable and can be used in legacy apps as is, my suggestion would be to go with Pippo 2.x straight to jakarta
namespace.
my suggestion would be to go with Pippo 2.x straight to jakarta namespace
I agree.
Working on it and I'm almost done, but have one question.
Due to the changes in the way Jetty handles WebSockets, I need an access to Jetty Server
instance from within JettyWebSocketFilter.init
What would be the best was to access it from there? Provided FilterConfig
does not hold any reference to Server
.
Here's my work so far:
https://github.com/gkresic/pippo/tree/jakarta
Notice hardcoded server access in ro.pippo.jetty.websocket.JettyWebSocketFilter
: https://github.com/gkresic/pippo/blob/jakarta/pippo-server-parent/pippo-jetty/src/main/java/ro/pippo/jetty/websocket/JettyWebSocketFilter.java
Tests confirm that WebSocket endpoints are working.
Unrelated, notice that my initial assumptions about servlet versions were incorrect: servlet specs 4 and 5 are the same, only difference being javax
/jakarta
namespace difference. So this, when implemented will move Pippo to servlet version 5 spec. Version 6 will have to wait until Jetty 12 (currently in alpha) since it's the only server of three (Jetty/Tomcat/Undertow) that doesn't support v6.
@gkresic When you have something functional please create a PR fore review and comments. It's more easy to compare the impact of the changes using the diffs view.
Created WIP PR #639
This is an extension to #490 (first half of it, anyway). Over there it was proposed to to upgrade to servlet 4 spec, but nothing is said on javax -> jakarta namespace migration that is part of spec 4.
So I propose migration in 2 steps:
io.undertow:undertow-servlet-jakartaee9
dependencyIf Pippo doesn't have to support parallel versions for JavaEE and JakartaEE, then those two steps could be squashed into one and leave JavaEE compatibility behind.
Depends on #613