-
1. Re: Component class should be serializable meaning
tmalatinszki Sep 9, 2009 3:45 PM (in response to kenfrommera)It means that Your class should implement Serializable interface.
Just change class header to:public class CurrentUser implements Serializable{ private static final long serialVersionUID = 1L;
and the warning will disappear.
Regards,
Tamas -
2. Re: Component class should be serializable meaning
kenfrommera Sep 9, 2009 3:59 PM (in response to kenfrommera)Yes, but I wan to know why it is required for this component and not required for others.
Is it because this component has @Scope(ScopeType.SESSION)?
-
3. Re: Component class should be serializable meaning
tmalatinszki Sep 9, 2009 4:54 PM (in response to kenfrommera)As far as I know it usually depends on the context where do you want to use Your components. I You want You can ignore all of these warnings, but don't forget, these warnings has reasons.
Check this topic, there are interesting parts about this question...
Regards,
Tamas -
4. Re: Component class should be serializable meaning
esteveolm Nov 20, 2009 3:54 PM (in response to kenfrommera)
Yes, but I wan to know why it is required for this component and not required for others.
Is it because this component has @Scope(ScopeType.SESSION)?Yes it is. If you run your app in a clustered environment, everything in Session context shuold be Serializable,
-
5. Re: Component class should be serializable meaning
ivan.tufegdzic Feb 21, 2011 4:17 AM (in response to kenfrommera)OK I understand that.
But why Gavin's (and/or other Seam) classes not implement Serializable interface (Query, EntityHome,...) ?
These classes can be used as super class for our classes.