Bug 52558 - CometConnectionManagerValve is adding non-serializable Request[] to Session
Summary: CometConnectionManagerValve is adding non-serializable Request[] to Session
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 8.0.0-RC1
Hardware: Macintosh All
: P2 enhancement (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2012-01-30 10:46 UTC by adam hawkins
Modified: 2013-09-12 11:17 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description adam hawkins 2012-01-30 10:46:47 UTC
CometConnectionManagerValve is adding HttpServletRequest[] to HttpSession which is preventing the Session being serialized in a Clustered setup.

We're resolving this locally using a serializable ConnectionList class with a transient Request[]


public class ConnectionList implements Serializable {
	transient Request[] connectionList = null;
	ConnectionList(Request[] connectionList){
		this.connectionList = connectionList;
	public Request[] get(){
		return connectionList;
Comment 1 Rainer Jung 2012-01-30 10:59:05 UTC
Note that there is an attribute "sessionAttributeFilter" in the cluster manager configuration, that allows to decide which session attributes you want to be replicated. It was introduced in Tomcat 7.0.22.



It is not a direct answer to your observation, but might be enough for a workaround. Therefore I keep this issue in status "New".


Comment 2 Mark Thomas 2013-09-12 11:17:37 UTC
I'd be surprised if anyone was relying on the connection list being stored as an array of requests but in case they are it is safer to use the work=around for 7.0.x and earlier. I have applied a fix based on the suggested new class for Tomcat 8.