[Jersey] Re: Jersey on netty?

From: Marek Potociar <>
Date: Thu, 29 Aug 2013 17:49:20 +0200

Hi Jan,

On Aug 28, 2013, at 11:31 PM, wrote:

> Hi all,
> looking into possibilities to run Jersey on top of an async HTTP 'server' , e.g. netty.
> Is anyone aware of any effort trying to do this in production quality?

Using Grizzly HTTP container to run Jersey can be certainly considered production-quality:

Grizzly, like Netty, is a high-level NIO framework with lots of advanced features:

> What I am not sure in general is whether the programming model of JAX-RS actually fits an async. container (set aside AsyncResponse).

From the moment I saw your earlier tweet on the subject, I really wonder what is your use case here :)

It almost seems that you do not want async processing, but non-blocking (and async) processing. If so, the current JAX-RS model would be hard to bend to support such task. I'm also afraid that it would be too low level. Maybe I'm wrong - sharing the concrete use case that you have in mind would certainly help.

> Has anyone tried and succeeded or failed?

There are some Jersey examples demonstrating how JAX-RS AsyncResponse can be used to do async processing:

Also Jersey proprietary generic chunked i/O as well as the SSE support (that builds on the Jersey chunked I/O) leverages async HTTP container facility keep the client connection open even after resource method is finished. Here are some pointers:

Async & chunked I/O docs -
SSE support doc -

Some related Jersey examples:


> Jan