You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dennis Muhlestein <de...@zserve.com> on 2003/04/07 21:14:18 UTC

tomcat-replication session count question

We'd like to display for our users how many other users are using our 
site at any particular time.  An approximation obtained by the number of 
sessions with a particular attribute is close enough.  We are using the 
tomcat-replication provided by Filip (Thanks Filip).

After examining the manager application, we see that we could call from 
the Manager Interface the getSessions() and then call .length but you 
have to have the web context operating with priveleged = true and 
implement the ContainerServlet.

We're wondering, is there any easy way to make a function call and get 
the number of sessions.

We've tried an HttpSession[Attribute]Listener but that solution has 
problems in the clustered environment because each server does not pick 
up any other server's events.


Any Suggestions?

TIA
-Dennis


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


RE: tomcat-replication session count question

Posted by Filip Hanik <ma...@filip.net>.
you used to be able to do that from the servlet spec, but it was taken out
bc of security issues that could cause.
now you would have to hack the source code of tomcat.

Filip

> -----Original Message-----
> From: Dennis Muhlestein [mailto:dennis@zserve.com]
> Sent: Monday, April 07, 2003 12:14 PM
> To: tomcat-user@jakarta.apache.org
> Subject: tomcat-replication session count question
>
>
> We'd like to display for our users how many other users are using our
> site at any particular time.  An approximation obtained by the number of
> sessions with a particular attribute is close enough.  We are using the
> tomcat-replication provided by Filip (Thanks Filip).
>
> After examining the manager application, we see that we could call from
> the Manager Interface the getSessions() and then call .length but you
> have to have the web context operating with priveleged = true and
> implement the ContainerServlet.
>
> We're wondering, is there any easy way to make a function call and get
> the number of sessions.
>
> We've tried an HttpSession[Attribute]Listener but that solution has
> problems in the clustered environment because each server does not pick
> up any other server's events.
>
>
> Any Suggestions?
>
> TIA
> -Dennis
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


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