[weld-dev] Do Custom implementations of Bean need to provide injection points?

John D. Ament john.d.ament at gmail.com
Fri Aug 4 05:42:24 EDT 2017


Hi

As the subject says.  I have a library that registers a custom
implementation of Bean, which has a method

    @Override
    public Set<InjectionPoint> getInjectionPoints() {
        return Collections.emptySet();
    }

When testing this on Weld3, I have code that looks up the injection point,
to find the annotations present.  However, the following injection point
lookup fails:

    private static InjectionPoint findInjectionPoint(final BeanManager bm,
final CreationalContext<?> ctx) {
        return InjectionPoint.class.cast(

bm.getReference(bm.resolve(bm.getBeans(InjectionPoint.class)),
InjectionPoint.class, ctx));
    }

so based on a CreationalContext I'm looking for InjectionPoint.  Maybe
there's a different way that this is supposed to work?  If you're
interested in giving it a shot, take a look at
https://github.com/apache/geronimo-config and run the Weld3 profile to
replicate the issue.

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20170804/2e7feef7/attachment.html 


More information about the weld-dev mailing list