RestEasy and Atmosphere integration

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RestEasy and Atmosphere integration

elangovans
This post was updated on .
Hi I am new here, and new to atmosphere. I have used RestEasy. However I havent used comet architecture in RestEasy. RestEasy doesnt have much on comet. So, I thought I would be able to use Atmosphere with RestEasy. I am not successful integrating this. Can someone point me to a right direction and help me?

My environment is...
Windows 7
Jboss AS 7
RestEasy 2.2.2.GA
Atmosphere 0.9-Snapshot

Thanks and appreciate your help.
Elangovan S

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[atmosphere-users] Re: RestEasy and Atmosphere integration

Jeanfrancois Arcand-4
Salut,

RestEasy doesn't support Atmosphere annotation so the only way you can get it to work is by injecting Atmosphere object:

   @Context HttpServletRequest req

and retrieve Atmosphere object using one of the request attributes:

   https://github.com/Atmosphere/atmosphere/blob/master/modules/cpr/src/main/java/org/atmosphere/cpr/FrameworkConfig.java#L23

and do the suspend/resume/broadcast from those object. Search for RestEasy+Atmosphere in Google so you can see what others did as well (this is not simple, unfortunately). Unless someone implement in RestEasy the Atmosphere annotation's set, I don't think it will be an easier way that using jersey.

A+

-- Jeanfrancois



On 11-11-20 8:01 PM, elangovans wrote:
Hi I am new here, and new to atmosphere. I have used RestEasy. However I havent used comet architecture in RestEasy. RestEasy doesnt have much on comet. So, I thought I would be able to use Atmosphere with RestEasy. I am not successful integrating this. Can someone point me to a right direction and help me? Thanks and appreciate your help. Elangovan S

View this message in context: RestEasy and Atmosphere integration
Sent from the Atmosphere users mailling list mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [atmosphere-users] Re: RestEasy and Atmosphere integration

elangovans
Thanks Jeanfrancois, Before posting here, I had been trying and googling on this topic, without much luck.

Unfortunately we have so many services built using Resteasy and now I am trying the comet to make these services to work with Comet. Resteasy doesnt have much at this point. It has @suspend annotation, but it doesnt work the way Atmosphere implemented.

Could you please show any samples how to use @Context HttpServletRequest req and do HTTP Streaming? BTW, what is the better approach longpolling or HTTP streaming?

Thanks & appreciate your help on this.
Elangovan S
Loading...