• 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.

            [CDI-351] Implicit bean archive compatibility issue

            Closing all resolved issues in CDI 1.x

            Antoine Sabot-Durand (Inactive) added a comment - Closing all resolved issues in CDI 1.x

            Done

            Bill Shannon suggests setting bean discovery mode to none in bean archives with extensions automatically.

            Pete Muir (Inactive) added a comment - Bill Shannon suggests setting bean discovery mode to none in bean archives with extensions automatically.

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

                Created:
                Updated:
                Resolved: