Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-351

Implicit bean archive compatibility issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 1.1.FD
    • 1.1.PFD
    • Portable Extensions
    • None

      Assume an existing extension library (CDI 1.0). This library is not deployed as a bean archive (it does not contain beans.xml). Instead, the library contains an extension which registers beans, interceptors, etc. using BeforeBeanDiscovery.addAnnotatedType().

      With CDI 1.1 the no-bean-archive assumption no longer holds and since a scope annotation is used somewhere in the extension, this extension is now recognized as an implicit bean archive. That causes the discovered beans to clash with those added programatically.

      Note that it is not possible to fix this by adding beans.xml with bean-discovery-mode set to "none". This would fix the problem in CDI 1.1 but the presence of beans.xml would break the extension in a CDI 1.0 container.

              pmuiratbleepbleep Pete Muir (Inactive)
              rhn-engineering-jharting Jozef Hartinger
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: