tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject How do you access all sessions from a servlet in tomcat 6.0?
Date Tue, 18 Sep 2007 07:07:24 GMT

We have tomcat configured to allow users sessions to stay alive for 12
hours. This is because this is how they like to work, login once at the
start of the day and shutdown at the end of the day.

I have a need to track their actual activity, like a concurrent license
tool, and thought the best way of doing this would be to have a servlet
start a timer at server startup, this servlet could then poll all the
active sessions at a set interval and check the  getLastAccessedtime()
method, building up a view of the actual activity.

Am I going about this in the right way?

If I am how do I access all the currently active sessions from a servlet?
It looks like if I can gain access to the servers engine/context I could
access all sessions via the ManagerBase class but I do not know how to do

Thanks Gary
This e-mail transmission and any attachments to it are intended solely for
the use of the individual or entity to whom it is addressed and may contain
confidential and privileged information.  If you are not the intended
recipient, your use, forwarding, printing, storing, disseminating,
distribution, or copying of this communication is prohibited.  If you
received this communication in error, please notify the sender immediately
by replying to this message and delete it from your computer.

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message