users@jersey.java.net

[Jersey] Re: Jersey ResourceConfig supported properties

From: Raúl Guerrero Deschamps <raul_at_jimi.com.mx>
Date: Mon, 2 Nov 2015 09:08:25 -0600

Has anyone bumped into this before?

Do you know a workaround for this issue? Like registering the
ResourceConfig in a web.xml so I can set the <async-supported> tag and see
if that fixes it.

Thanks,


Raul



2015-11-02 2:27 GMT-06:00 Marek Potociar <marek.potociar_at_oracle.com>:

> This seems to be a problem in Tomcat - Jersey is attempting to register a
> new Servlet for your JAX-RS application and tries to enable the async
> support on it, but - for some reason - Tomcat is not allowing this.
>
> Cheers,
> Marek
>
> On 22 Oct 2015, at 11:28, Raúl Guerrero Deschamps <raul_at_jimi.com.mx>
> wrote:
>
> Hi,
>
> I'm extending the ResourceConfig class for my Application configuration,
> in there I use register(), packages() etc.
>
> The problem is, on Tomcat 8.0.28 I'm getting the following exception when
> calling an async Resource:
>
> javax.ws.rs.ProcessingException: Attempt to suspend a connection of an
> asynchronous request failed in the underlying container.
>
> On a Mac it works correctly, but on Windows it throws such exception, and
> I read on a StackOverflow answer for this issue, that you should either
> define the <async-supported>true</async-supported> tag in the web.xml, but
> as I don't have a web.xml, the post mentions that there is a property()
> that can be set to achieve that, but the answer never mentions how to set
> it so it works.
>
> So my question is two-fold here, how do I set the async-supported through
> property() in my ResourceConfig, and also, is there any documentation
> mentioning what property() options are supported in Jersey? because the
> property() method has a javadoc, but nowhere in the documentation mentions
> what is used for and what properties supports.
>
> Thanks
>
> Raul
>
>
>