-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable use of Tomcat 10, a Jakarta-enabled servlet container #159
Conversation
Brilliant work, thank you so much for your time! I have a few general questions. I'll also add some comments inline later.
Thanks again for the great work! |
...extraResourceBases/src/main/java/org/akhikhl/examples/gretty/hellogretty/ExampleServlet.java
Show resolved
Hide resolved
The README must be updated (the first paragraph) to note the supported Tomcat and Jetty versions. |
Wow, that's much to unpack! Thank you very much for your thorough review. |
In principle that is something I could implement. I guess my primary constraint is time. While I have (obviously) found some enjoyment in hacking Gretty, all the "missing pieces" are tasks are free to be picked up by anybody who is willing to put time into it. |
To my understanding that is correct. I assume that the API artifact "jakarta.ws.rs:jakarta.ws.rs-api" was comparatively trivial to rename and thus is available earlier than the core functionality. I think the Jersey project is simply halfway in the Jakarta migration.
Which project should contain the open issue? As for Spring (Boot) I cannot identify a singular issue or milestone I could link to. I'll create a ticket in Gretty as already promised. I can add that reference to the commit, no problem.
I extracted this discussion to #161 and already left a reply there. As far as I know there is build-time dependency on JDK 11, which is bad news, because it requires more effort.
Neither am I, but I think we do need some overview of what's missing. Also when playing the "waiting game" for releases of other projects. I hope that a milestone exactly does that. |
Hopefully I addressed all of your concerns. I left two fixup commits such that you can immediately see how that was done. I'll do the organisational stuff (creating tickets, milestone) later. |
Great, all seems good, thanks again! The only two questions remaining for me are:
|
Sorry for the longer response time than usual... to me last week was.... rough.
I dug deeper and (already completed) Spring Boot milestone 2.3.0.M3 (https://github.com/spring-projects/spring-boot/milestone/155?closed=1) contains several dependency upgrades hinting at Jakarta: spring-projects/spring-boot#20510, spring-projects/spring-boot#20452, spring-projects/spring-boot#20453, spring-projects/spring-boot#20451. I hope that important artifacts such as "jakarta-servlet-api" follow swift. That's what I wanted to describe with "singular issue": I failed to pinpoint a single issue / milestone that says "Spring Boot is now ready for Jakarta", which we can simply watch. Perhaps Gretty is in a difficult role, because it is sandwiched in between servlet containers and application frameworks. I do think that trademark will be removed in the long run, even if it's a bit early to tell when major framework releases are out of the door. I'll rebase this branch and squash fixups as appropriate. |
The WebappLoader lost the ctor with the parent class loader parameter and instead sets the reference from the started context. Alas, it should be possible to directly set the parent class loader on the context, and it should just function as before.
While a recent Jersey version provides "jakarta"-ified APIs, we are still unable to deploy it because Jersey depends on the javax.servlet classes internally (for instance in org.glassfish.jersey.servlet.ServletContainer). We'll have to wait for a compatible release of Jersey.
There is already some preliminary work which pulls in dependencies for Jetty 10. Because Jetty 10 raises the minimum supported Java version to 11, Gretty will also require JDK 11 to compile and run. Source: https://www.eclipse.org/jetty/documentation/current/what-jetty-version.html
Good work finding these issues! So they will be supporting the new APIs sooner or later. We'll wait and see. By the way, I'm not sure whether you want to leave the PR open until everything is resolved or merge it in the branch and then add new commits? I'm fine either way. As for my help - you're welcome! You're doing 99% of the work so the thanks goes to you! :) Beers are on me! :) |
I guess it's good to have that one (possibly long-lived) branch "gretty4" and regularly merge into it than to have a stale PR. After all, this PR completes issue #144, which then can be closed. For the remainders of the milestone the devs can create new feature branches, which will once more target "gretty4". |
Can I conclude this PR is good to go? Did you finish your review, does the end result look good to you? Wow, that's 6k in removed lines btw 😲 |
Yes, I think the PR is great! Go ahead and merge. Removing tons of code is my favorite thing. 😄 |
This PR represents the result of the discussion in #144. I also had to make some organisational changes which may require adjustment (or reversal):
4.0.0-SNAPSHOT
.Changes
httpsIdleTimeout
,maxPostSize
Missing pieces
Especially the minimum JDK version would require further discussion. With the state in this PR, Gretty requires all users to use Java 11 at a minimum, although Tomcat 10 only requires 8+. I can only guess how many users would be impacted.
If one were to change that, there are two challenges: it requires refactoring, because the "gretty" module can no longer depend on "jetty-util", and changes in packaging, such that there are two Gretty variants, one of which supports only Tomcat and JDK 8+, and another, which ships Tomcat and Jetty connectors and supports JDK 11+. I would leave that discussion for a new issue.
If you think it's a good idea, I would create issues for each bullet point of the missing pieces. What do you think about creating a milestone for that?