Sven Haiges
Sven Haiges

Reputation: 2636

Using HTML5 Websockets with Spring

I'd like to use Websockets with a Spring MVC-powered web app. I've read o jWebsockets and bristleback, but I am wondering if that is the best way to integrate. I am sure someone has done this before and has some tips what works and what does not...

Thanx!

Upvotes: 7

Views: 9896

Answers (5)

Alex
Alex

Reputation: 331

since Springframework 4.0 M1 Websocket are supported, see http://blog.springsource.org/2013/05/22/spring-framework-4-0-m1-websocket-support/

Edit - 08 january 2014: Springframework 4.0 released and supports websocket, have fun.

Upvotes: 25

keaplogik
keaplogik

Reputation: 2419

Spring has plans to implement the WebSocket servlets offered by many popular application servers. The main problem is that, as each server comes out with it's own webscocket implementation, they all vary greatly. The Atmosphere Framework is available, and supports cross server, cross browser implementations.

There are some blog posts available, like combining atmosphere websockets and comet with Spring MVC

I would suggest you research the framework before deciding it's right for you. They have a github src repo with demo's and documentation available as well.

Upvotes: 3

Barry Pitman
Barry Pitman

Reputation: 3127

It seems that support is planned, https://jira.springsource.org/browse/SPR-9356 (but they'll need to work around the lack of Servlet API support)

Upvotes: 1

skaffman
skaffman

Reputation: 403581

Spring MVC will offer you no help here - it supports HTTP traffic using the Servlet and Portlet APIs only. Websockets, I believe, are not HTTP-based.

Upvotes: 7

Related Questions