3 Replies Latest reply on Dec 23, 2016 2:23 AM by ljnelson

    AfterTypeDiscovery.addAnnotatedType: should be picked up by bean scanning, yes?

    ljnelson

      I've added a few annotated type instances for a given class, each with a distinct ID using the AfterTypeDiscovery.addAnnotatedType(String, Class) method introduced in CDI 2.0EDR2.

       

      With that configurator, I've programmatically added the Dependent, Default, and Any annotations to the class.  My understanding is that the Dependent annotation on the class coupled with its preexisting @Inject-annotated constructor would constitute a bean defining annotation, and hence this annotated type should be "picked up" by the container during bean discovery as an ordinary managed bean.

       

      In Weld 3.0.0 Alpha17, I do not see a container-discovered bean representing this type when bean discovery is finished.

       

      I was under the impression that types added in this manner would be scanned by the container as though they had existed in this form on disk.

       

      Is there something else I must do?

       

      Thanks,

      best,

      Laird