title: How to count number of active sessions in Java EE applications?
body: <p>I am using JAAS for authentication in JBoss. I am using the DatabaseServerLoginModule to perform the authentication.</p>
  
  <p>Now I want to track the number of active session in the application. I tried writing a HttpSessionListener but for some reason it is not getting called on successful login.</p>
  
  <p>Any thoughts on how I can achieve this?</p>