Details

      Description

      There's currently not a clear way on how to obtain the current injection point (if any) from Bean<T>#create.

      A previously somewhat accepted way (though not specified) was:

        Bean<? extends Object> bean = beanManager.resolve(beanManager.getBeans(InjectionPoint.class));
        InjectionPoint injectionPoint = (InjectionPoint) beanManager.getReference(bean, InjectionPoint.class, creationalContext);
      

      This however broke in some version of Weld.

      Since getting the injection point is an often used feature in producers, I'd like to propose to introduce an easy API for this, so Bean<T> implementations can use this just as easily. E.g. something like: BeanManager#getCurrentInjectionPoint().

      Also see: http://cdi-development-mailing-list.1064426.n5.nabble.com/Getting-injection-point-from-Bean-create-td5710505i20.html

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                atijms Arjan Tijms
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: