This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates 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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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: 861
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: how to find total active session at the given moment