tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filip Hanik - Dev" <devli...@hanik.com>
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;
    context.invokeNext(request,response);
    int afterCount = request.getContext().getManager().findSessions().length;
}
----- Original Message -----
From: "Ronald Klop" <ronald-mailinglist@base.nl>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
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 <ronald-mailinglist@base.nl> wrote:


Hello,

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?

Ronald.


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?

Ronald.



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


Mime
View raw message