This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes how to find total active session at the given moment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to find total active session at the given moment" Watch "how to find total active session at the given moment" New topic
Author

how to find total active session at the given moment

Raghuveer Rawat
Ranch Hand

Joined: Apr 03, 2003
Posts: 102
hi
I want to find total active session at a given moment.
can anyone tell me this.
Thanks


Raghuveer Rawat<br />SCJP2
qingwu wang
Ranch Hand

Joined: Feb 19, 2003
Posts: 147


Thanks...qingwu<br />When I open my eyes,I see your pretty face.
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
you can use the HttpSessionListener interface to achieve that.


I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 860
Sample code that does just that (and more) can be found at http://www.javaperformancetuning.com/tools/jamon/#SampleCode. JAMon is an easy to use (a start() and stop() method) API that measures performance, scalability and counts "things" in general. For example in your case you could count sessions.
steve - http://www.jamonapi.com


http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
 
wood burning stoves
 
subject: how to find total active session at the given moment
 
Similar Threads
Active session count per server
string append
how can i find out informations of currently logon-users
session questions
MXBean question in regards to tomcat