• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to find total active session at the given moment

 
Raghuveer Rawat
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
I want to find total active session at a given moment.
can anyone tell me this.
Thanks
 
qingwu wang
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can use the HttpSessionListener interface to achieve that.
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic