2008/11/26 Gili Tzabari <[EMAIL PROTECTED]> > That's essentially what I'm doing, but first I need to understand if > CGLIB proxies work the way I understand or not. That is, do they contain > the data or do they redirect calls to another instance as Hibernate does > (at least, I remember it doing so)? >
...it depends, you could have a CGLIB proxy that always delegates to its superclass, which means the data would be contained in the proxy or you could have a CGLIB proxy that redirects calls to various other objects, in which case the data could be spread out amongst them http://cglib.sourceforge.net/apidocs/net/sf/cglib/proxy/Callback.html in Guice I guess it would depend what method interceptors you used > Gili > > tzwoenn wrote: > > A simpler (but as dirty!) solution would look like iterating over the > > inherated types looking for the first one, which is no proxy. CGLIB > > generated types are created using a naming strategy (as far as I > > remember guice uses something like "ByGuice" for generated classes > > name), so it might be possible to find proxy classed by checking their > > class names against this phrase. > > > > BR, Sven > > > > > > On Nov 24, 5:48 pm, Gili Tzabari <[EMAIL PROTECTED]> wrote: > >> Robbie, > >> > >> I'd like to implement a workaround in the meantime (this is the > only > >> issue preventing me from releasing the jersey-guice integration module). > >> > >> Does CGLIB build a proxy implementation that redirects method > calls to > >> the unproxied object? Or does the CGLIB proxy contain the actual data > >> itself? > >> > >> Thank you, > >> Gili > >> > >> Robbie Vanbrabant wrote: > >>> This issue tracks your problem: > >>> http://code.google.com/p/google-guice/issues/detail?id=201 > >>> Robbie > >>> On Mon, Nov 24, 2008 at 4:49 PM, Gili <[EMAIL PROTECTED] > >>> <mailto:[EMAIL PROTECTED]>> wrote: > >>> Hi, > >>> Is there a Guice API for getting at the underlying instance behind > a > >>> proxy? Jersey needs to inspect @Path annotations on the original > class > >>> instead of the CGLIB proxy. If I could pass Jersey a copy of the > >>> original class somehow then it will be happy. > >>> Thank you, > >>> Gili > > > > > > > > > -- Cheers, Stuart --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-guice?hl=en -~----------~----~----~----~------~----~------~--~---
