4 Replies Latest reply on Aug 3, 2011 8:36 AM by Venkatesh Balaji

    is this a good use for jboss cache

    robert walker Newbie

      I have a setup where we have 8 jboss clusters/nodes, but they are not setup

      to communicate with each other, just more of a load balancing setup with apache.


      I have a pojo in my webapp that keeps track of each logged on user FOR THAT NODE,

      i.e. for the cluster the user is logged on to


      but when a user activates a link on the client "Show logged on users" I want to show ALL the users from each of the 8 nodes,

      so really the pojo from each node concatenated, showing my a summation of all the pojo's lists.


      I was thinking the jboss cache could help me here


      any thoughts, I am really green to this and reading about it now over on




        • 1. Re: is this a good use for jboss cache
          Galder Zamarreño Master

          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.

          • 2. Re: is this a good use for jboss cache
            robert walker Newbie

            excellent points and great idea about the showing all logged on users and ones logged onto a particular node



            • 3. Re: is this a good use for jboss cache
              Venkatesh Balaji Newbie

              hi robert,


              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.




              • 4. Re: is this a good use for jboss cache
                Venkatesh Balaji Newbie

                Hi Robert,


                Just for an update, we have implemented this and working perfectly for last one year!