Gili wrote:
>
>> W.r.t. getInjectableInstance the parameter passed in should be from
>> the ComponentProvider .getInstance method, the return value should be
>> the underlying component instance that is proxied or the parameter
>> that is passed in otherwise.
>
> Paul, I think this method needs to return a Class, not an Object. CGLIB
> proxies are simply subclasses of the underlying class which means that I
> have an object of type Foo$$EnhancerByGuice$$45c70c66
> whose superclass is Foo which you want. There is no way for me to give
> you an unproxied instance; rather, I can point you to the class level to
> look at.
>
Actually I would suggest breaking the method up into two:
Class<?> getInjectableClass(Object original);
Object getInjectableObject(Object original);
For Spring getInjectableClass() would simply return
getInjectableObject(original).getClass(), for Guice I would return something
else.
Gili
--
View this message in context: http://n2.nabble.com/Simplifying-Jersey-life-cycle-and-IoC-integration-tp1367641p1572702.html
Sent from the Jersey mailing list archive at Nabble.com.