Hello Samuel,
Have you checked how exceptions in Resource or one of prior ContainerResponseFilter (whether attached to a Resource method or global) will affect your filter. I have not tested ResourceFilterFactory provided filters but exception in a global filter or in resource itself definitely interrupt response chain thus your filter might not be executed.
See my post "ContainerResponseFilter is not suitable for cleanup job"
What's your experience?
Thanks,
Alex
-----Original Message-----
From: Samuel Le Berrigaud [mailto:samuel.lb_at_gmail.com]
Sent: Tuesday, February 10, 2009 9:18 PM
To: Jersey Users
Subject: Resource method interceptor
Hi all,
I was trying to figure out if there was some sort of
ResourceInterceptor API avialable for Jersey. I couldn't find anything
apart from the container request and response filters and they don't
quite match my requirements.
Ideally what I'd like is an interface that I could implement and that
would let me do things before, after and possibly even instead of the
resource method being called. It would probably give me the method, it
argument and the object on which it is being called as arguments.
That would really help implement some "cross-cutting" concerns to our
REST APIs in a simpler way than using AOP.
Hope this make sense.
Thanks,
SaM