[cdi-dev] [JBoss JIRA] (CDI-141) remove overly strict Serialization requirements for @Inject method and ct parameters

Mark Struberg (JIRA) jira-events at lists.jboss.org
Wed Jul 18 08:39:07 EDT 2012


     [ https://issues.jboss.org/browse/CDI-141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg reopened CDI-141:
-------------------------------



This can only get completely resolved once we define how injected @Dependent beans should get handled.
                
> remove overly strict Serialization requirements for @Inject method and ct parameters
> ------------------------------------------------------------------------------------
>
>                 Key: CDI-141
>                 URL: https://issues.jboss.org/browse/CDI-141
>             Project: CDI Specification Issues
>          Issue Type: Bug
>          Components: Beans, Resolution
>    Affects Versions: 1.0
>            Reporter: Mark Struberg
>            Assignee: Mark Struberg
>            Priority: Minor
>             Fix For: 1.1.EDR1
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the cdi-dev mailing list