[cdi-dev] [JBoss JIRA] (CDI-195) Clarify serializability requirements for extension-provided metadata

Pete Muir (JIRA) jira-events at lists.jboss.org
Thu Aug 23 17:43:15 EDT 2012


    [ https://issues.jboss.org/browse/CDI-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713460#comment-12713460 ] 

Pete Muir commented on CDI-195:
-------------------------------

I don't see the issue here. If a passivation id is provided for the Bean<?> (and hence it is passivation capable), then the reference to the injected Bean should just serialize that id, and reconnect it on deserialization.
                
> Clarify serializability requirements for extension-provided metadata
> --------------------------------------------------------------------
>
>                 Key: CDI-195
>                 URL: https://issues.jboss.org/browse/CDI-195
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Portable Extensions
>    Affects Versions: 1.0
>            Reporter: Jozef Hartinger
>             Fix For: 1.1 (Proposed)
>
>
> The spec never requires an extension-provided implementation of the Bean, Interceptor, Decorator or InjectionPoint to be serializable. The implementation indicates, whether the underlying bean is passivation capable by implementing PassivationCapable, but the implementation itself does not have to be serializable.
> For both the InjectionPoint bean and Bean metadata bean the spec says: "The built-in implementation must be a passivation capable dependency". However, this is hard to guarantee if an extension provides a non-serializable implementation of a Bean/InjectionPoint interface, e.g. the following code would cause problems at passivation:
> {code:JAVA}
> public class Bar implements Serializable {
>    @Inject
>    private InjectionPoint ip;
> }
> {code}
> If the metadata of the Bar bean (Bean<Bar>) is not serializable, Bar cannot be passivated.

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