-
Notifications
You must be signed in to change notification settings - Fork 357
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
HTTP/2 for Jetty container #5296
Conversation
405907b
to
0353502
Compare
// Start the server. | ||
server.start(); | ||
} catch (final Exception e) { | ||
throw new ProcessingException(LocalizationMessages.ERROR_WHEN_CREATING_SERVER(), e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The localization-messages file is missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's taken from the original Jetty container. Shall it be separated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generated class searches for localization messages from the module the LocalizationMassages class is from. This module shares the package name with the original Jetty module, which is wrong, and likely there would be a Java warning (with JPMS at least) at some point about a package being in another module. Hence, it is not clear where the org.glassfish.jersey.jetty.internal.LocalizationMessages is from. But given you use
<plugin>
<groupId>com.sun.istack</groupId>
<artifactId>istack-commons-maven-plugin</artifactId>
<inherited>true</inherited>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<inherited>true</inherited>
</plugin>
the LocalizationMessages would be generated in this new module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The container shares the original package because most of the functionality is reused from the org.glassfish.jersey.jetty.JettyHttpContainer
however, the given class has package private constructors which makes impossible to initialize it outside of the package. I did not want to modify the original container, so I've just shared the original package. However, with JPMS this won't work. What do you advise as a proper solution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The best looks extending JettyHttpContainerProvider by public <T> T createContainer(final Class<T> type, final Application application, Object parentContext)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, will try
Please update bom.pom |
...ttp2/src/main/java/org/glassfish/jersey/test/jetty/http2/JettyHttp2TestContainerFactory.java
Outdated
Show resolved
Hide resolved
...s/jetty-http2/src/main/java/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerFactory.java
Outdated
Show resolved
Hide resolved
...s/jetty-http2/src/main/java/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerFactory.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
5937c1e
to
989fcd6
Compare
### What changes were proposed in this pull request? This pr aims upgrade Jersey from 2.40 to 2.41. ### Why are the changes needed? The new version bring some improvements, like: - eclipse-ee4j/jersey#5350 - eclipse-ee4j/jersey#5365 - eclipse-ee4j/jersey#5436 - eclipse-ee4j/jersey#5296 and some bug fix, like: - eclipse-ee4j/jersey#5359 - eclipse-ee4j/jersey#5405 - eclipse-ee4j/jersey#5423 - eclipse-ee4j/jersey#5435 - eclipse-ee4j/jersey#5445 The full release notes as follows: - https://github.com/eclipse-ee4j/jersey/releases/tag/2.41 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass GitHub Actions ### Was this patch authored or co-authored using generative AI tooling? No Closes #43490 from LuciferYang/SPARK-45636. Lead-authored-by: YangJie <yangjie01@baidu.com> Co-authored-by: yangjie01 <yangjie01@baidu.com> Signed-off-by: Sean Owen <srowen@gmail.com>
No description provided.