3 Replies Latest reply on Jan 20, 2008 12:44 PM by Jacob Orshalick

    How to reliably count active sessions and connected users ?

    Beaudoin Gaël Newbie


      I'm using seam 2.0.0 and I'd like to cound the active sessions and connected users.

      For session, I'm using two observer methods in an application scoped ejb to count :

      public void increaseUserCount() {
      public void decreaseUserCount() {

      For connected users, I use those two seam security events :

      public void increaseConnectedUserCount() {
      public void decreaseConnectedUserCount() {

      Both solutions aren't ok. For example, sometimes I have a number of -1 for connected users. And for sessions, the number keeps high, so I don't know If a really catch all session ending.

      Do you have / know a better idea ?