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

add a bean-discovery-mode 'scoped'

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 2.0 .Final
    • 1.2.Final, 1.1.Final
    • None

      This is for some future CDI release.

      We currently only have 3 bean-discovery-modes

      • none
      • all
      • annotated

      The spec also currently says that ProcessAnnotatedType will only get fired (12.4) for
      • each Java class, interface or enum deployed in an explicit bean archive, and
      • each Java class with a bean defining annotation in an implicit bean archive.
      • each session bean

      Which means that we do not get the ProcessAnnotatedType (PAT) event for any class in an 'annotated' or 'implicit' BDA which does not have a bean defining annotation.

      It might be useful to fire the ProcessAnnotatedType for all classes, but do not pick them up as Beans if they (after PAT) do not have a valid scope. Effectively doing the processing but not make them @Dependent automatically if there is no scope annotation at the end of the PAT processing.

      I'm not yet 100% sure how important this distinction is in practice. Just writing this up to not forget about the idea...

              Unassigned Unassigned
              struberg Mark Struberg (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: