Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-413

It is not possible to add identical beans through BeforeBeanDiscovery.addAnnotatedType

    Details

      Description

      Adding a bean that is exactly the same as an existing bean results in the added bean being ignored.

      I can't think of a use case for having two beans exactly the same, however it still should work, and may be a symptom of a larger problem.

        Gliffy Diagrams

          Activity

          Hide
          jharting Jozef Hartinger added a comment -

          This is addressed by CDI 1.1 where addAnnotatedType now takes a String identifier for container to be able to distinguish two otherwise equal AnnotatedTypes

          http://docs.jboss.org/cdi/api/1.1/javax/enterprise/inject/spi/BeforeBeanDiscovery.html#addAnnotatedType(javax.enterprise.inject.spi.AnnotatedType, java.lang.String)

          Show
          jharting Jozef Hartinger added a comment - This is addressed by CDI 1.1 where addAnnotatedType now takes a String identifier for container to be able to distinguish two otherwise equal AnnotatedTypes http://docs.jboss.org/cdi/api/1.1/javax/enterprise/inject/spi/BeforeBeanDiscovery.html#addAnnotatedType(javax.enterprise.inject.spi.AnnotatedType , java.lang.String)

            People

            • Assignee:
              Unassigned
              Reporter:
              swd847 Stuart Douglas
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development