MyFaces CODI
  1. MyFaces CODI
  2. EXTCDI-140

explicitely annotate @Dependent scoped beans and make them non-final

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.2
    • Fix Version/s: 0.9.3
    • Component/s: Core
    • Labels:
      None

      Description

      Currently we have lots of Producers which are not annotated with any scope. That means they will be treated as @Dependent scoped beans by default.
      I suggest to explicitly annotate them either @Dependent or @ApplicationScoped (if no state information is being used) because the automatic pickup as @Dependent has side effects which not all people are aware off.

      I also suggest to not declare any bean as final because this prohibits the CDI container to create a proxy for such classes. This currently doesn't happen with @Dependent scoped beans, but this might get changed in future spec versions (auto serialisation support). It also makes it impossible to @Specializes such producers.

        Activity

        Gerhard Petracek made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Gerhard Petracek made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Mark Struberg made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mark Struberg made changes -
        Field Original Value New Value
        Affects Version/s 0.9.2 [ 12315919 ]
        Fix Version/s 0.9.3 [ 12316038 ]
        Component/s Core [ 12313495 ]
        Mark Struberg created issue -

          People

          • Assignee:
            Mark Struberg
            Reporter:
            Mark Struberg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development