Skip to content
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

JettyWebSocketFrameHandlerFactory.createAnnotatedMetadata(...) does not provide handle methods for Ping and Pong #7992

Closed
MobAbi opened this issue May 14, 2022 · 7 comments
Labels
Question Stale For auto-closed stale issues and pull requests

Comments

@MobAbi
Copy link

MobAbi commented May 14, 2022

Jetty Version 10.0.9

Java 11

I upgraded from Jetty 9 to 10 and noticed that the Ping/Pong does not work anymore as before.
If I debugged that correctly, then it is because in websocket-jetty-common-10.0.9.jar
the jettyWebSocketFrameHandlerFactory.createAnnotatedMetadata() method does not supply metadata
for the handleMethods for Ping and Pong.

Is this a bug or a feature?

@lachlan-roberts
Copy link
Contributor

Can you show us what WebSocket endpoint you had when using 9.4 that does not work in 10.0.9.

That createAnnotatedMetadata() method is for finding the methods on the endpoint annotated with Jetty WebSocket API annotations, and this did not have any ping/pong specific annotations even in 9.4. You either use the OnWebSocketFrame annotation or WebSocketFrameListener or WebSocketPingPongListener to handle ping/pong.

@MobAbi
Copy link
Author

MobAbi commented Jun 3, 2022

Thank you for your reply.As soon as I find the time I will check what you wrote and might come back to this Issue.

@MobAbi
Copy link
Author

MobAbi commented Jun 3, 2022

I think I found the reason - it's not Jetty itself, but Spring:

Jetty10WebSocketHandlerAdapter_no_onWebSocketFrame

If someone knows how to workaround this, that would be great to know.

@lachlan-roberts
Copy link
Contributor

@MobAbi probably best to open an issue asking about this on the spring project.

But it looks like they have addressed this in their main branch as part of the work for spring-projects/spring-framework#27424.
See that JettyWebSocketHandlerAdapter is now using the jetty 10 version of Frame at org.eclipse.jetty.websocket.api.Frame.

@MobAbi
Copy link
Author

MobAbi commented Jun 6, 2022

Thx for your reply.
I'm not so deep into the versions of Spring vs Jetty, but am I right when I say that as soon there is a Spring version that supports Jakarta and uses Jetty 11, then I can migrate to that and the Frame (Ping/Pong) support should be fine.
Is this correct?

@github-actions
Copy link

github-actions bot commented Jun 7, 2023

This issue has been automatically marked as stale because it has been a
full year without activity. It will be closed if no further activity occurs.
Thank you for your contributions.

@github-actions github-actions bot added the Stale For auto-closed stale issues and pull requests label Jun 7, 2023
@lachlan-roberts
Copy link
Contributor

I don't know much about the available Spring versions either.

Open an issue on their repository if this is still not working because there is nothing we can do to fix it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Stale For auto-closed stale issues and pull requests
Projects
None yet
Development

No branches or pull requests

2 participants