users@jersey.java.net

Re: [Jersey] Interception

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 15 Oct 2008 08:39:41 +0200

On Oct 14, 2008, at 6:46 PM, Julio Faerman wrote:

> Hello,
>
> I would like to intercept method calls to resources in order to
> provide additional functionality, such as declarative security
> control.
> Would it be possible to proxy instantiated beans without using Spring?
> Is there such thing as a pluggable instatiation mechanism?
>

Yes, you can use a ComponentProvider [1]. IIRC some one else on this
list was doing the type of thing you want with ComponentProvider.

See the code for Spring integration [1], namely
SpringComponentProvider and SpringServlet.

Paul.

[1] https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0/api/jersey/com/sun/jersey/spi/service/ComponentProvider.html
[2] http://download.java.net/maven/2/com/sun/jersey/jersey-spring/1.0/jersey-spring-1.0-sources.jar