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

remove overly strict Serialization requirements for @Inject method and ct parameters

    Details

      Description

      Section 6.6.4 declares that:

      > If a producer method declares a passivating scope and:
      > ..
      > * has a parameter that does not resolve to a passivation capable
      > dependency,
      > then the container automatically detects the problem and
      > treats it as a deployment problem.

      Something like

      @Produces @SessionScoped @AutoAuthenticated
      public User getCurrentUser(MyConfig mc) {
      return ...

      (MyConfig is not Serializable and gets produced as @ApplicationScoped) would not be allowed.

      The same restriction currently applies to parameters of @Inject methods and constructors:
      >If a managed bean which declares a passivating scope:
      > has a ... , bean constructor parameter or initializer method parameter
      > that does not resolve to a passivation capable dependency, ...

      This maybe comes from simple @Inject setters which set the given method parameters 1:1 into class members. But for all other cases this restriction is just way too rigid.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            pmuir Pete Muir added a comment -

            Mark, do you fancy taking this issue - should be pretty straightforward but we need to make sure we clear any references to this in the spec up.

            Show
            pmuir Pete Muir added a comment - Mark, do you fancy taking this issue - should be pretty straightforward but we need to make sure we clear any references to this in the spec up.
            Hide
            struberg Mark Struberg added a comment -

            CDI-140 CDI-141 and CDI-153 all touch the same paragraph and logical area. Should probably handled together

            Show
            struberg Mark Struberg added a comment - CDI-140 CDI-141 and CDI-153 all touch the same paragraph and logical area. Should probably handled together
            Hide
            struberg Mark Struberg added a comment -

            Pete, I think this is also already fixed by our changes to CDI-140 and CDI-153. I set it to fixed in 1.1 (Confirmed), please reopen if you think it's not!

            Show
            struberg Mark Struberg added a comment - Pete, I think this is also already fixed by our changes to CDI-140 and CDI-153 . I set it to fixed in 1.1 (Confirmed), please reopen if you think it's not!
            Hide
            struberg Mark Struberg added a comment -

            This can only get completely resolved once we define how injected @Dependent beans should get handled.

            Show
            struberg Mark Struberg added a comment - This can only get completely resolved once we define how injected @Dependent beans should get handled.
            Hide
            pmuir Pete Muir added a comment -

            This is covered by CDI-228

            Show
            pmuir Pete Muir added a comment - This is covered by CDI-228

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development