users@jersey.java.net

Jersey Spring Servlet (/dispatcher) not invoking Spring Interceptors

From: Mahesh Venkat <mhvenkat_at_gmail.com>
Date: Tue, 3 Nov 2009 08:56:08 -0800

Hi,

I am using Jersey 1.0.3.1 release with Spring 2.5 framework.
I have defined a Rest Resource class as a Spring bean using @Scope &
@Component annotation as well as a regular spring bean xml definition and is
able to invoke it through the Spring container.

I implemented the Paul's blog
http://blogs.sun.com/enterprisetechtips/entry/jersey_and_spring and defined
the application context. I defined a separate Spring Dispatcher using the
JerseySpring Servlet and its xml definition has reference to a bunch of
interceptos.

*However I am finding that none of the interceptors are invoked. *

I also tried the regular Spring way of adding the rest Resource bean in the
standard DispatcherServlet-servlet.xml with a reference to the interceptors.

Is this a bug in Jersey Spring Rest Servlet or I am missing somewhere in my
configuration?
One of the items i am curious about is the application context visibility.
Check out http://www.dotkam.com/2008/07/09/spring-web-application-context-visibility/
. I added DispatcherServlet-servlet.xml and applicationContext.xml as part
of the root context.

-- 
Regards
--Mahesh