[cdi-dev] Clarify scopes and serialization
Antonio Goncalves
antonio.goncalves at gmail.com
Sun Feb 1 07:36:20 EST 2015
Hi all,
I was reading the CDI 1.2 spec and couldn't clearly find the way
serialization and scopes work. The only explicit sentence I found was :
*1.3.1. JSF example*
*The @SessionScoped annotation defined in Section 2.4.1, “Built-in scope
types” is a scope*
*type that specifies the lifecycle of instances of Login. Managed beans
with this scope must be*
*serializable.*
The Weld documentation is a bit more explicit :
*5.2. Built-in scopes*
*Managed beans with scope @SessionScoped or @ConversationScoped must be
serializable, since the container passivates the HTTP session from time to
time.*
And in the Java EE Tutorial we find (
http://docs.oracle.com/javaee/6/tutorial/doc/gjbbk.html) :
*Beans that use session, application, or conversation scope must be
serializable*, but beans that use request scope do not have to be
serializable.
This even made be doubt about the application scope ?!?
Any way, could we clarify this in the CDI spec ?
--
Antonio Goncalves
Software architect, Java Champion and Pluralsight author
Web site <http://www.antoniogoncalves.org> | Twitter
<http://twitter.com/agoncal> | LinkedIn <http://www.linkedin.com/in/agoncal> |
Pluralsight
<http://pluralsight.com/training/Authors/Details/antonio-goncalves> | Paris
JUG <http://www.parisjug.org> | Devoxx France <http://www.devoxx.fr>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20150201/eb2c612c/attachment.html
More information about the cdi-dev
mailing list