and I mean JBossClustering.pdf! :-) ... doh (was reading that at the time...)
I believe what happens is the following:
- The cluster consists of 1 server
- Now 2 additional servers are started
- At this point you invoke a method on MyEjb. At this point the membership (3 servers) is piggybacked on the RMI response to your HA proxy
- Now the proxy know that there are 3 servers available from which to choose
- The HA proxy won't know about the updated membership until it invokes a method on the bean
Yes, Bela got it perfectly right! ;)
The invocation sent to JBoss and the answer that come back are actually wrapped in some kind of "meta-invocation" that is able to carry more information. Consequently, if, and only if, the topology has changed, we send an updated view of the cluster with the result of the invocation. If no call is performed on a node, the client will not get a refreshed view of the cluster.
In the alpha code for SLSB that I did, some asynchronous view-refresh of the cluster topology was done. I think that actual scheme is much better.