users@jersey.java.net

Re: Security Interceptors

From: Lars Tackmann <lars_at_randompage.org>
Date: Tue, 25 Mar 2008 14:47:27 +0100

On Tue, Mar 25, 2008 at 2:19 PM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
> Hi Lars,
>
> I would really like if possible to defer such support to an IoC
> container so we do not have to re-implement such functionality.

I can understand that, currently I know of Interceptor style
functionality in EJB, Spring, Guice, Seam, Struts2.... No nead for
making that list longer.

>
> I wonder if an IoC container could manage an existing instance of
> something, for example:
>
> // Manage an instance created by something else
> Object manage(Object o)
>
> Then Jersey can pass the instance returned by a sub-locator for
> management to an IoC container.
>
> Anybody know if that is possible in Spring/Guice/WebBeans ?

I have never seen such functionality, but will look in to it. I wonder
if some configurable object factory support is really what we need.
i.e. a IObjectFactory style interface that can be implemented via
Spring, Guice... and then be set as a JAX-RS config parameter in
web.xml.


-- 
Yours sincerely
Lars Tackmann