[jax-rs-spec users] [jsr339-experts] Re: Re: Adding SSE support to JAX-RS 2.1?

From: Sergey Beryozkin <>
Date: Sun, 9 Mar 2014 22:21:12 +0000


I have mixed feeling about it. To be honest I don't mind binding JAX-RS
implementations to not very RESTful protocols.

For a start,


in Jersey clearly overloads semantics of Produces. It does not feel like
it is JAX-RS. I'd go for a dedicated annotation or may be do it out of
band, something that I believe Bill may be referring to.
Or may be AsyncResponse should be extended ? Using @Produces to indicate
a sse-'feature' support is too much ...

The fact that SSE utilizes HTTP, does it make it RESTful ? I mean,
WebSocket, they use HTTP upgrade and don't 'claim' it is all HTTP, SSE
does use HTTP but does it make it closer to HTTP the protocol ?

as I said, I support the idea of the users being able to reuse their
JAX-RS-annotated code with other transports, example, let JMS messages
flow in, etc. I'd like JAX-RS becoming the choice for users doing
HTML5/etc, which is in our interests IMHO.

Cheers, Sergey

On 06/03/14 13:53, Santiago Pericas-Geertsen wrote:
> Sergey,
> WebSockets is already covered by JSR 356 in EE 7. And, other that the upgrade mechanism, there's little connection with HTTP. SSE runs on HTTP and with the features already in JAX-RS (async, streaming, etc.) it's rather easy (and elegantly) to integrate it in JAX-RS as seen the link included by Marek.
> -- Santiago
> On Mar 5, 2014, at 11:24 AM, Sergey Beryozkin <> wrote:
>> Right, it is exactly what it is called...
>> Sorry, got confused as we are working binding WebSockets to JAX-RS right now
>> Marek: I honestly think it is for 3.0 - we need to review different mechanisms, SSE, WebSockets, etc...
>> Thanks, Sergey
>> On 05/03/14 15:51, Sergey Beryozkin wrote:
>>> Is it supposed to represent WebSocket at high level by any chance ? What
>>> is the underlying mechanism/transport it is meant to represent if not ?
>>> And it is not for 2.1, this is a completely new feature, 2.1 is supposed
>>> to be a maintenance/bug fixes release
>>> Sergey
>>> On 05/03/14 15:39, Marek Potociar wrote:
>>>> Hello experts,
>>>> As you may know, the first steps towards starting work on Java EE 8 has
>>>> been made already. Among the most important ones was the Java EE 8
>>>> Community Survey. As the survey results
>>>> <>
>>>> indicate,
>>>> there is a very strong support in Java EE community for coming with a
>>>> standard API for supporting Server-Sent Events in Java EE 8. Clearly,
>>>> one way or the other, SSE support will be added in Java EE 8 platform.
>>>> There are multiple options how to achieve this and one of these options
>>>> being considered is to extend JAX-RS API to provide better support for
>>>> SSE. Before we make a final decision, I'd like to get your feedback on
>>>> whether or not you think that extending JAX-RS API with SSE support is a
>>>> good idea.
>>>> To get the idea how such JAX-RS API support could look like, please
>>>> check Jersey User Guide section that describes how client and server SSE
>>>> support is currently implemented in Jersey 2.x:
>>>> I am looking forward to your feedback.
>>>> Thank you,
>>>> Marek
>> --
>> Sergey Beryozkin
>> Talend Community Coders
>> Blog:

Sergey Beryozkin
Talend Community Coders