This is semi-jboss related. I noticed on the site that it keeps track of who is online. How do you know when a user has left. I will assume, you keep track of when the user logs on(session is new) and then when the session times out, send an indicator? Is it more complicated than that.
Check the listeners in the javax.servlet.http package.