[weld-dev] Is my class a proxy?

Ales Justin ales.justin at gmail.com
Tue Oct 29 09:53:00 EDT 2013


> Basically, in the bug, an injected bean's method is losing parameter 
> type information.  Can you either:

Not just methods, whole generic class signature is lost.
At least that's what I still got with my custom Providers (with AS7.2.0.Final).

My workaround was to explicitly set them as @Dependent scoped.

> a) Fix weld proxies so that generic type information is not lost (in 
> this case, it is method parameter type information). *Preferred*

I think this got easier to do -- as there was finally some support for generic signatures generation added to Javassist.
(which is what we use in Weld)

> b) Have a supported way going forward to determine if the class is a CDI 
> proxy.  A marker interface or an annotation added to the proxy class 
> would be best, then I wouldn't need to have a binary dependency on Weld 
> and could do this via reflect calls.

Afair, you already have a few "custom" interfaces added, as hooks into Weld's internals,
but that is Weld specific, not CDI.

-Ales




More information about the weld-dev mailing list