Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Session Listener  RSS feed

 
Liming Xu
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm implementing SessionListener for counting active users.
I have two context pointing to two different applications, and I want to share the two listner class cross context. How do I do that?
I use Tomcat 4.1
Thanks.
 
Nicolas Brasseur
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Consider using the "Singleton" design pattern to implement a kind of counter class used in your listener.
This should help
Nicolas
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ling,
This link might be helpful:
reference to internal tomcat object - get # of sessions
Cheers
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!