Hello,
I am currently developing an app which deploys in a JBoss cluster (JBoss AS 5.0.0), using the defult clustering. However, for one component of the app I need somehow to get a list of all user sessions currently logged into the app across the whole cluster. Any pointers on how to accomplish this would be appreciated.
A few things I've thought of, but ran into issues with:
- I've thought of trying to manually keep as list of all sessions as they're created and then storing the list of sessions using JNDI in a place that can be accessed by all nodes in the cluster. Unforuately the sessions are not Serializable and this JNDI cannot store them--or at least they throw an error saying they're not serializable when I try to do that.
- I've tried looking for where JBoss itself keeps its list (or map) of sessions, but found nothing that is exposed where I can find a reference to it.
- I've thought of trying to extend JBoss' session manager, exposing the list of sessions so I can get a reference to it and then set the config somehow to use the new custom session manager instead of the default one, however, I cannot seem to find the appropriate class to extend and config for JBoss AS 5.0.0 (just 5.1.0).
Any ideas?