users@jersey.java.net

Re: Injectable fields not set on target object for proxied resource (using cglib)

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Fri, 07 Mar 2008 11:05:32 -0500

Hmm, this seems like a general problem with proxies. How is this
usually handled, can the jersey component provider get access to the
proxied object somehow or do we need support for injection via bean
setters/getters as an alternative to fields ?

Marc.

On Mar 7, 2008, at 8:58 AM, Martin Grotzke wrote:

> Hi,
>
> I'm using spring as container and (as I wrote in another posting) want
> to use spring AOP for some authentication/authorization stuff.
>
> Unfortunately, if my resource is proxied (and that might happen
> magically in spring ;)), injectable fields like UriInfo or
> HttpServletRequest are only set on the proxy, but not on my object.
>
> Is this an issue for jersey (can jersey handle this) or is this an
> issue
> of the container in use / proxying mechanism?
>
> Thanx in advance,
> cheers,
> Martin
>

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.