4 Replies Latest reply on Sep 12, 2012 10:18 AM by Ajay Arora

    Custom Communication between Cluster Nodes

    Ajay Arora Newbie

      Hi All,


      I've a requirement in my project (we are still on Jboss 4.0.3) where we've some DB data cached per application server to speed up some calculations. All is working fine but when I run my application in cluster mode and someone goes to the admin part using one of the cluster node and change the data into the DB I can make a call on that local node/ server to refresh the cache but how to trigger the same on other node(s) in the cluster at the same time so that every other node should also refresh the data.


      I thought about it and sharing one option which I feel should work. I want to know if this is good option or there are more robust and easier alternatives available without any side effects.


      Option 1: 

      A. Create a remote object with a method like 'refreshCache' and bind it to the JNDI global namespace of each node when it starts up.

      B.  When data is modified on any of the node then using partition service and currentview method get all the servers name in that cluster.

      C. After getting the names inspect the JNDI tree for each server for that remoteobject.

      D. Fire this 'refreshCache' method.


      I yet to try this solution but looks like it handle my requirement.


      Looking forward to hear your thoughts and thanks for any help in advance