users@jersey.java.net

[Jersey] Container filter and Annotation

From: <go_at_livemocha.com>
Date: Tue, 22 Nov 2011 00:41:19 +0000 (GMT)

Hello,

I have a resource filter that looks at annotations supported by a
resource to do a few things. So, this, I believe, is a perfect use
case for Resource Filter.

Now, I have to make it so that logic in this filter be executed even if
there is no resource matching for a request. To do this, I think I
need to change my filter to Container Filter. But if I do that, I lose
Annotation based configuration.

My question is, Is there a way to get a list Annotations supported by a
resource in Container Filter? If there is no resource available for a
request, some kind of signal (null, an empty list) is sufficient for me
to do the right thing.

If this is not possible, is is possible to get URI to
AbstractResourceMethod mapping in a Sprint servlet filter? If there
is, I can move the logic to a servlet...

Thanks,
Go