Skip to content

Jetty 12 support in WebFlux #29575

Closed
Closed
@jhoeller

Description

@jhoeller

Jetty 12 is currently in alpha but expected to enter its beta phase soon, as the first generation of Jetty to provide Servlet 6.0 (Jakarta EE 10) support.

While Spring MVC should be naturally compatible with it as a Servlet 6.0 container and the standard Jakarta WebSocket upgrade strategy (also from EE 10) should kick in for WebSocket request upgrades without specific changes on Spring's side, explicit adaptations will be necessary for Jetty 12 in core WebFlux:

  • org.eclipse.jetty.server.Request/Response#getHttpFields() has been changed to #getHeaders(), with Request/Response themselves being interfaces instead of classes now (not binary compatible): API compatibility between Jetty 11 and 12: org.eclipse.jetty.server.Request/Response#getHeaders() jetty/jetty.project#8938
  • Additionally, HttpFields.Mutable has been changed from a class to an interface as well, making our JettyHeadersAdapter binary incompatible with it. Given the amount of reflection required here, it seems better to avoid the HttpFields optimization completely and rely on Servlet header access instead.
  • HttpOutput.write(ByteBuffer) has been relocated to a different package. We can support both variants of HttpOutput in their different locations side by side through compiling against the Jetty 11 BOM plus the Jetty 12 EE 10 Servlet artifact.

Beyond that, our JettyWebSocketClient variants are tied to Jetty 11. They would have to work with a relocated API in Jetty 12, even in EE-version-specific jetty.ee10.websocket.client packages. Since they are superseded by the Jakarta WebSocket based StandardWebSocketClient already, we intend to deprecate them in 6.0.3 and never upgrade them for Jetty 12 to begin with: #29576

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions