[cdi-dev] [JBoss JIRA] Updated: (CDI-140) improve passivation capable bean validation for @Dependent scoped beans in 6.6.4

Pete Muir (JIRA) jira-events at lists.jboss.org
Sun Sep 18 09:23:26 EDT 2011

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

Pete Muir updated CDI-140:

    Fix Version/s: 1.1 (Confirmed)
                       (was: 1.1 (Proposed))

> improve passivation capable bean validation for @Dependent scoped beans in 6.6.4
> --------------------------------------------------------------------------------
>                 Key: CDI-140
>                 URL: https://issues.jboss.org/browse/CDI-140
>             Project: CDI Specification Issues
>          Issue Type: Clarification
>          Components: Resolution
>    Affects Versions: 1.0
>            Reporter: Mark Struberg
>             Fix For: 1.1 (Confirmed)
> Currently section 6.6.4 defines that @Dependent scoped beans which get injected into a bean of a passivating scope must be Serializable. 
> "If a producer method or field of scope @Dependent returns an unserializable object for injection into an injection point that requires a passivation capable dependency, the container must throw an Illegal- ProductException"
> The question is how to interpret "that requires a passivation capable dependency".
> It would e.g. be perfectly fine if the @Dependent bean is _not_ Serializable *if* the injectionpoint will be serialized via a writeObject or Externalizable#writeExternal. 
> Proposal: to explicitly add a check for Modifier.TRANSIENT and writeObject(ObjectOutputStream) and Externalizable#writeExternal(ObjectOutput)
> This is very important for @Dependent scoped producers of legacy classes because there is otherwise no way to inject such classes at all.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the cdi-dev mailing list