webtier@glassfish.java.net

Re: JSF 2.0: View scoped data should be Serializable?

From: <forums_at_java.net>
Date: Wed, 4 Jun 2014 12:19:16 -0500 (CDT)

Are there any specific guidelines on when and how beans should be serialized?
  From my understanding, it is recommended for session scoped beans to be
serialized for reasons such as to support distributed sessions. If the
application isn't distributed, would session scoped beans still need to be
serialized for other reasons? For view scoped beans, the Errata C032 mentions
that they "may" need to be serialized. Could you please elaborate on when/why
about the scenarios in which serialization would be required so as to help us
decide which beans to serialize in our application? I am confused about how
deserialization works. Would JSF lifecycle still take care of initializing
the bean; would @PostConstruct annotations still work during deserialization
or do we rely on other mechanisms for initialization after deserialization
(e.g., no-arg constructor?)

--
[Message sent by forum member 'deepakpn']
View Post: http://forums.java.net/node/697003