Hello.

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 : 

@Observer("org.jboss.seam.postCreate.org.jboss.seam.web.session")
  | public void increaseUserCount() {
  |     userCount++;
  | }
  | 
  | @Observer("org.jboss.seam.preDestroyContext.SESSION")
  | public void decreaseUserCount() {
  |     userCount--;
  | }

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

@Observer("org.jboss.seam.security.loginSuccessful")
  | public void increaseConnectedUserCount() {
  |     connectedUserCount++;
  | }
  | 
  | @Observer("org.jboss.seam.security.loggedOut")
  | public void decreaseConnectedUserCount() {
  |     connectedUserCount--;
  | }

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 ?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121298#4121298

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121298
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to