On Mon, Dec 12, 2016 at 3:26 AM Romain Manni-Bucau <rmannibu...@gmail.com>
wrote:

> 2016-12-12 9:13 GMT+01:00 Mark Struberg <strub...@yahoo.de.invalid>:
>
> >
> > > Am 11.12.2016 um 22:24 schrieb John D. Ament <johndam...@apache.org>:
> > >
> > > However, using bean.getBeanClass() is more correct.
> >
> > Nope, read the spec paragraph for producer methods and fields:
> >
> > 11.1. The Bean interface
> > "• getBeanClass() returns the bean class of the managed bean or session
> > bean or of the bean that declares the producer method or field."
> >
> > So for a producer method or field getBeanClass() will NOT give you the
> > type of the produced contextual instance but the class which _contains_
> the
> > producer!
> > Means relying on getBeanClass() to produce the proxy is plain wrong and
> > Weld should not do that (IF they do, did not verify that)!
> >
> >
> Yep + "managed bean" doesn't mean "implementation" so Bus is very valid.
>
>
Hmm you're right.  If anything types should be leveraged now that I'm
thinking about it more.  I've withdrawn my PR for now, but I'll point out
that this means this entire block
https://github.com/apache/cxf/blob/3.1.x-fixes/integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java#L292,L325
has
the potential to be an issue.  Since JAX-RS requires annotations on the
class, I guess its OK then.

Either way Martin's explained why weld's generating the wrong proxy, or at
least a theory why (bad groovy filtering) it still doesn't explain why the
right proxy gets generated when using ExtensionManagerBus instead.


>
> > LieGrue,
> > strub
>

Reply via email to