2008/10/27 Gili <[EMAIL PROTECTED]> > > Hi James, > > I ran this question by the author of Jersey and he said that doing so > would violate the JAX-RS specification: > > http://n2.nabble.com/com.sun.jersey.impl.uri.UriBuilderImpl.path()-throws-an-unexpected-exception-td1373393.html#a1381422<http://n2.nabble.com/com.sun.jersey.impl.uri.UriBuilderImpl.path%28%29-throws-an-unexpected-exception-td1373393.html#a1381422> > > I need to somehow tell Guice to not use CGLIB or to annotate the > subclass with the same annotations as the superclass. >
looking at the codebase it appears Guice uses CGLIB's FastClass to create instances of public types when doing constructor injection, even if there's no circular dependency or interception going on, see: src/com/google/inject/DefaultConstructionProxyFactory.java afaik using FastClass here is just for performance, so it's technically possible to add some sort of switch to turn this off - but I'll leave it to the Google devs to decide if this is worthwhile or not... Gili > > On Oct 24, 8:36 pm, "James Carman" <[EMAIL PROTECTED]> wrote: > > Can Jersey search the class hierarchy for the @Path annotation? > > > > On Fri, Oct 24, 2008 at 7:45 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> > wrote: > > > > > On Oct 24, 2:42 pm, Gili <[EMAIL PROTECTED]> wrote: > > >> Is it possible to tell Guice to avoid the use of CGLIB unless it's > > >> absolutely necessary? I know Guice uses it to solve circular > > >> dependencies but I use the Provider<Foo> approach instead. CGLIB > > >> proxies sometimes break compatibility. For example, today I ran into > > > > > Are you using method interceptors? We can't do them without CGLIB. > > > -- 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 -~----------~----~----~----~------~----~------~--~---
