Hi I have setup a Tomcat cluster using SimpleTcpCluster feature provided by tomcat. While doing this I see that replication is throwing error for some of my classes for not being serializable even if they are not part of the HttpSession, though they are added to the ServletContext. Hence I wanted to know if ServletContext is also replicated in Session replication across Tomcats?
All references in a Session MUST be serializable if the session is to be stored or replicated. ServletContext can NOT be serializable since it is heavily involved with the details of a given servlet engine.
I bet that if you dig into the stack trace from the exception you will find some useful information to isolate where the problem originates.
Joined: Jan 01, 2007
Yes. I figured it out. I have a session attribute which is extended by a couple of classes and these classes had some non-serializable members.