[cdi-dev] [JBoss JIRA] (CDI-187) Clarify serializability requirements for interceptors/decorators

Pete Muir (JIRA) jira-events at lists.jboss.org
Tue Aug 21 17:57:15 EDT 2012


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

Pete Muir reassigned CDI-187:
-----------------------------

    Assignee: Pete Muir

    
> Clarify serializability requirements for interceptors/decorators
> ----------------------------------------------------------------
>
>                 Key: CDI-187
>                 URL: https://issues.jboss.org/browse/CDI-187
>             Project: CDI Specification Issues
>          Issue Type: Clarification
>          Components: Contexts, Decorators, Interceptors
>    Affects Versions: 1.1.EDR1
>            Reporter: Jozef Hartinger
>            Assignee: Pete Muir
>             Fix For: 1.1.EDR2
>
>
> The spec says:
> {quote}A managed bean is passivation capable if and only if the bean class is serializable and all interceptors and decorators of
> the bean *are serializable*.{quote}
> The "interceptors and decorators of the bean *are serializable*" part is problematic. While it is fine to examine the defining class in case of standard interceptors/decorators, the question is: How to find out whether an extension-provided interceptor/decorator in serializable? It does not make sense to check the implementation of the Interceptor/Decorator interfaces nor to examine the class returned by Bean.getBeanClass() as that would break the abstraction.
> IMHO, the spec should say that:
> {quote}A managed bean is passivation capable if and only if the bean class is serializable and all interceptors and decorators of
> the bean are *passivation capable*.{quote}
> Where a standard interceptor/decorator would be passivation capable if and only if it implemented the Serializable interface whereas the following section of the spec would handle extension-provided interceptors/decorators.
> {quote}A custom implementation of Bean is passivation capable if it implements the interface PassivationCapable. An imple-
> mentation of Contextual that is not a bean is passivation capable if it implements both PassivationCapable and Serial-
> izable.
> {quote}

--
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