Skip to content

Make use of native doUpgrade operation in Undertow 1.3.5+ / 1.4 [SPR-13593] #18171

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

Closed
spring-projects-issues opened this issue Oct 21, 2015 · 5 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Oct 21, 2015

Rossen Stoyanchev opened SPR-13593 and commented

Undertow 1.3.1+ provides an API for upgrading to WebSocket at runtime similar to Tomcat. See undertow-io/undertow@9180db6.


Affects: 4.2.2

Issue Links:

Referenced from: commits 8656186

@spring-projects-issues
Copy link
Collaborator Author

Rossen Stoyanchev commented

I gave this a a try with WildFly 10.0.0.CR4 (Undertow 1.3.3) and it doesn't work yet. I've left a comment.

Furthermore it seems 4.2.2 no longer works with Undertow 1.3.3:

Caused by: java.lang.NoClassDefFoundError: org.xnio.StreamConnection from [Module "deployment.spring-websocket-portfolio.war:main" from Service Module Loader]
	at com.sun.proxy.$Proxy41.<clinit>(Unknown Source)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
	at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:739)
	at org.springframework.web.socket.server.standard.UndertowRequestUpgradeStrategy.upgradeInternal(UndertowRequestUpgradeStrategy.java:173)

@spring-projects-issues
Copy link
Collaborator Author

Rossen Stoyanchev commented

There is a fix now for the doUpgrade issue in the 1.3.x and master branches of Undertow (1.3.5 snapshot and 1.4.0.Beta1 respectively).

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Oct 28, 2015

Juergen Hoeller commented

Moved to 4.3 RC1 due to Undertow's doUpgrade implementation not working with programmatic endpoints yet. This has been fixed in Undertow already but won't see the light of day until 1.3.5, so let's rather not make any bets and keep the fine-tuned version of our existing manual upgrade code (#18197) in place for the time being.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Rossen Stoyanchev. please roll your doUpgrade branch into master now... simply using that method when present, as originally intended. We're at Undertow 1.3.10 already, and WildFly 10 is still not GA, so it's not really relevant anymore whether 1.3.1-1.3.4 didn't properly work there... in particular not by the time we go 4.3 GA.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

Rossen Stoyanchev commented

Sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants