dev@jersey.java.net

ResourceFilter mixed with ContainerRequestFilter/ResponseFilter

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Tue, 19 May 2009 22:03:57 -0400

Salut,

to integrate Jersey in Atmosphere, I'm currently trying to use a
ResourceFilter to manipulate the request/response flow. I also need to
filter both the request and response, so I've created class:

https://atmosphere.dev.java.net/nonav/xref/org/atmosphere/core/AtmosphereFilter.html#63

Using the latest trunk, I do see my create method invoked and the
Atmosphere annotation properly handled, but I don't see both the
ContainerRequest|ResponseFilter invoked. My web.xml defines:

> <init-param>
> <param-name>com.sun.jersey.spi.container.ResourceFilters</param-name>
> <param-value>org.atmosphere.core.AtmosphereFilter</param-value>
> </init-param>

By just looking at the above class, does somebody see something trivial
I'm missing? A simple demo can be downloaded from here:

http://download.java.net/maven/2/org/atmosphere/samples/atmosphere-simple-jersey/0.2-SNAPSHOT/atmosphere-simple-jersey-0.2-SNAPSHOT.war

Just deploy that war file and invoke:

% curl -i http://192.168.0.101:8080/atmosphere-simple-jerse
y/resources/resource1

It's the Jersey' simple-servlet demo but with comet support (not yet,
but pretty soon).

Thanks!

-- Jeanfrancois