Open davidef opened 1 year ago
Hello @davidef
Thanks for making this PR. I really don't understand the motiviation / goal you had. Could you introduce me to the changes you made, that I understand it before I merge it, as I had no problems so far using @SuppressWarnings("serial")
. Maybe thats just a Java Thing I never had to cope with.
@F0rce sorry for the delay I've missed your reply. Objects in http session are required to be serializable when you replicate http session in a clustered environment. For example our application is running on 3 tomcat instances and usually we have sticky session so clients will always hit the same tomcat server. But when we deploy an update we update the servers one-by-one to prevent any downtime of our app; session will be serialized by the server that is being updated and deserialized on a different active server. Without the class being serializable this will fail. This is the reason because there is a compiler warning. Also when updating the code in the future the serialVersionUID need to be updated when there are changes in the object model to allow the cluster to detect that. Usually this is required if there are chances to class's fields.
All components added into a j2ee HttpSession must to be serializable. This is also needed when using the editor in clustered environments to migrate active sessions between nodes.