tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filip Hanik - Dev" <>
Subject Re: Counting session in a cluster.
Date Tue, 27 Apr 2004 16:59:25 GMT
The spec doesn't require any events to be fired.
So for the SimpleTcpReplicationManager implementation where the full session is replicated
upon replication, no events are fired.

Using the DeltaManager, you should get all the events fired, including when a new session
is created.
However, the most reliable way to count sessions, just create a Valve, then from the valve
get the number of manager, and from the
manager get all the sessions

invoke(Request,Response,ValveContext) {
    int beforeCount = request.getContext().getManager().findSessions().length;
    int afterCount = request.getContext().getManager().findSessions().length;
----- Original Message -----
From: "Ronald Klop" <>
To: "Tomcat Users List" <>
Sent: Tuesday, April 27, 2004 11:52 AM
Subject: Re: Counting session in a cluster.

On Tue Apr 27 18:49:54 CEST 2004 Ronald Klop <> wrote:


Is there a reliable way of counting active sessions in a cluster? I used sessionDidActivate
and sessionCreated and sessionDestroyed,
but the results are not very consistent between the two servers in the cluster.

Any idea's?


Or maybe I just mean. What are the semantics of the various events on sessions in a clustered
environment? Are all events fired at
all servers, for example? Is there some documentation about this?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message