tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: CometConnectionManagerValve combined with SimpleTcpCluster
Date Sat, 14 Apr 2012 08:12:29 GMT
On 14.04.2012 02:37, Konstantin Kolinko wrote:
> 2012/4/13 Willem Fibbe - Realworks BV<willem@realworks.nl>:
>> Hi,
>>
>> We have a small cluster of 2 Tomcat-nodes, replicating sessions via
>> SimpleTcpCluster.
>> After we enabled CometConnectionManagerValve in context.xml, sessions
>> weren't replicated anymore and we saw the following exceptions in the tomcat
>> logs:
>>    java.io.WriteAbortedException: writing aborted;
>> java.io.NotSerializableException: org.apache.catalina.connector.Request
>>
>> After digging further, I see that the Valve puts a list of Request-objects
>> on the session that have comet-connections open.
>> When sessions are tried to be replicated, the Request-objects can't be
>> serialized, hence the exception.
>>
>> Is this a bug, maybe? Or should I use something else than SimpleTcpCluster?
>>
>> Sorry, should have mentioned this before, but this was on Tomcat 6.0.35 (Debian).
>>
>
> I think this is a question for the users@ list.

Agreed.

> CometConnectionManagerValve in its current implementation is not
> really compatible with clustering (for the reason that you
> encountered). So do you really need this valve?
>
>
> There was the following new feature in 7.0.22, but it seems that it is
> accessible only programmatically and not through configuration:
> "Allow to overwrite the check for distributability of session
> attributes by session implementations. (rjung)"
>
> I mean, to really make CometConnectionManagerValve work in a cluster
> you have to exclude that non-serializable session attribute from
> replication. Its content makes sense for the current node only.

Since 7.0.22 and 6.0.34 you can configure, which session attributes you 
want to distribute via a regular expression matched against the 
attribute names. By default all attributes are replicated (and thus must 
be serializable).

See "sessionAttributeFilter" in

http://tomcat.apache.org/tomcat-7.0-doc/config/cluster-manager.html#Common_Attributes

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message