How do I use Comet with Spring MVC?
Asked Answered
R

2

43

I'd like to add some Comet/server push capabilities to a simple web application. I'm having trouble finding up to date information on how to do this.

Can anyone point me to some examples, tutorials, blogs, or anything recent that walks you through using Comet with Spring MVC?

In case it matters, I'm using Freemarker to render the views, and JQuery for the JavaScript framework.

Aside: I already know all about Lift and its awesome Comet support built-in. This app is a proof of concept that I've already implemented using Lift. Now I'm building it with Spring MVC to compare and contrast.

Edit: I've started trying out DWR. It's not fantastic, but I can make something that works. I also checked out Atmosphere, but I couldn't get any traction with it at all.

I'm leaving the question open. Hopefully some better suggestions will come in.

Repand answered 16/12, 2010 at 0:24 Comment(3)
atmosphere is the thing ;) You'd have to be more specific on what didn't work with it.Kindig
Bozho: it's not that anything with atmosphere didn't work. I just spent an hour or two with the docs and examples, and didn't get any closer to figuring out how to use it to push events up to JavaScript on the web page.Repand
I'm working on getting atmosphere and spring mvc playing together; i'll post an answer some time next month if I get some traction or have an epiphany.Dogberry
K
12

Atmosphere is really the best I've seen (I haven't used any, but I've evaluated multiple solutions). The good thing with it is that it uses the best mechanism available. If running on servlet 3.0 - using the async support. If using jetty - using its support, and so on. It also has spring integration.

So, perhaps you should ask a concrete question about atmosphere. See this and this related questions.

Kindig answered 21/12, 2010 at 15:52 Comment(1)
I'll take another crack at it. But I can't find anything about using Atmosphere with Spring MVC.Repand
F
0

Try ItsNat Comet, Spring can be used for setting up your application (contact with me if you don't know how you do so) but Spring MVC is not used.

Ferriage answered 17/1, 2011 at 14:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.