[cdi-dev] [JBoss JIRA] (CDI-708) Serialization problems in section "1.3.1. JSF example".

Martin Andersson (JIRA) issues at jboss.org
Thu Jun 15 11:35:00 EDT 2017

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

Martin Andersson commented on CDI-708:

Actually, CriteriaQuery is serializable. JPA 2.1, section "6.9 Query Execution":

bq. CriteriaQuery, CriteriaUpdate, and CriteriaDelete objects must be serializable.

> Serialization problems in section "1.3.1. JSF example".
> -------------------------------------------------------
>                 Key: CDI-708
>                 URL: https://issues.jboss.org/browse/CDI-708
>             Project: CDI Specification Issues
>          Issue Type: Bug
>          Components: Concepts
>    Affects Versions: 2.0 .Final
>            Reporter: Martin Andersson
> Section "1.3.1. JSF example" provide an example of a class {{Login}}, that saves in its state an {{EntityManager}} reference and two {{Parameter}} references.
> The JPA specification does not say that a {{Parameter}} instance is serializable.
> This is also true for the {{EntityManager}} reference which is {{@Dependent}} (see section "1.3.3. Java EE component environment example"). JPA does not specify that the {{EntityManager}} is serializable and the EJB specification only specifies serialization semantics for passivation-enabled {{@Stateful}} EJB:s (which encourages the bean provider to not mark an {{EntityManager}} reference as transient, see EJB §4.2.1).

This message was sent by Atlassian JIRA

More information about the cdi-dev mailing list