简体   繁体   中英

Implementing WebSocket in Java

I have a Spring MVC application. UI makes some asynchronous requests to back end. Backend processes the requests and sends the response. Current implementation is done with the help of queues and listeners.
I want to replace it with Web Sockets.
I understand that JDK 7 supports websockets out of the box.
My application gets deployed on different servers like Tomcat 6.0, WebSphere Application Server etc. Would it make any difference?

Spring MVC does not support WebSocket so what is the work aorund?

There's no support for WebSockets in Spring 3.2 There's a log for it in Spring 4 here

There's also a blog post about how to use it in Spring 4 here

Spring released 4.0 GA which supports Websocket, tomcat 7.0.47+ will be required for the websocket implementation. http://spring.io/blog/2013/12/12/announcing-spring-framework-4-0-ga-release

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM