• Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.1.FD
    • 1.1.PFD
    • None
    • None

      It seems that the only complete source of information about the bean-discovery-mode attribute is the schema file. The specification should better explain the attribute, list and explain allowed values.

            [CDI-344] bean-discovery-mode should be specified

            Closing all resolved issues in CDI 1.x

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

            Please review the latest changeset, available from the Commits tab.

            Pete Muir (Inactive) added a comment - Please review the latest changeset, available from the Commits tab.

            First, I think the wording is misleading because bean archives have no version. Only beans.xml files may have a version.

            A bean archive with no version has a default bean discovery mode of all.

            OK - CDI 1.0 beans.xml with bean-discovery-mode of any value should always result in bean discovery mode of all.

            But the sentence:

            A bean archive with version 1.1 (or later) has a default bean discovery mode of annotated.

            does not make sense in the context of the sentence written below:

            If beans.xml file with version 1.1 is used, the bean-discovery-mode attribute is required.

            (default value is always overwritten by user)

            What if we say: explicit archives have always bean discovery mode of all and implicit archives have always bean discovery mode of annotated?

            Martin Kouba added a comment - First, I think the wording is misleading because bean archives have no version. Only beans.xml files may have a version. A bean archive with no version has a default bean discovery mode of all. OK - CDI 1.0 beans.xml with bean-discovery-mode of any value should always result in bean discovery mode of all. But the sentence: A bean archive with version 1.1 (or later) has a default bean discovery mode of annotated. does not make sense in the context of the sentence written below: If beans.xml file with version 1.1 is used, the bean-discovery-mode attribute is required. (default value is always overwritten by user) What if we say: explicit archives have always bean discovery mode of all and implicit archives have always bean discovery mode of annotated ?

            A bean archive with no version has a bean discovery mode of all. A bean archive with version 1.1 (or later) has a bean discovery mode of annotated.

            Although the intention is for these default values to be only applied unless the bean discovery mode is explicitly specified, it is not clear from the specification.

            Jozef Hartinger added a comment - A bean archive with no version has a bean discovery mode of all. A bean archive with version 1.1 (or later) has a bean discovery mode of annotated. Although the intention is for these default values to be only applied unless the bean discovery mode is explicitly specified, it is not clear from the specification.

            I wrote this up.

            Pete Muir (Inactive) added a comment - I wrote this up.

            Martin Kouba added a comment - - edited

            I think the spec should also explicitly define that all explicit bean archives result in bean-discovery-mode="all" behaviour (that's the way I understand it...).

            This is already covered in section 12.4 "Bean discovery".

            Martin Kouba added a comment - - edited I think the spec should also explicitly define that all explicit bean archives result in bean-discovery-mode="all" behaviour (that's the way I understand it...). This is already covered in section 12.4 "Bean discovery".

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

                Created:
                Updated:
                Resolved: