How accurate does "Show logged on users" need to be? If 100% accuracy is not needed, you could use a cache instance configured with REPL_ASYNC so that all logged in data is replicated to all nodes and hence, showing all logged in should be just a matter of querying the entire cache contents of one node. I suspect this logged in caching would require a fair bit of cache writes and since you'd have at least 8 nodes in the cluster, I would not recommend using REPL_SYNC, since it would force you to wait for responses from all nodes.
Now, if you also wanted to be able to present the users that are logged to a particular node, you could make sure that the FQN contains the node name, i.e. /users/node1 and then only query that FQN.
excellent points and great idea about the showing all logged on users and ones logged onto a particular node
i do have similar implementation, once the user has been authenticated with username and password, i want to keep hold some information authenticated/logged on users and session id. Authentication has been done by servlet, can you please explain how did you implemented this approach? get and set data in cache with servlet? can you please share the code to get and set data in jboss cache, i made the setup in jboss and tested the replication with jmx-console, but i dont get any clue on implementing the same programatically.
thanks in advance.
Just for an update, we have implemented this and working perfectly for last one year!