Nodes come and go. I don't if it is possible to come to know about number of nodes in the cluster from client application. However, if you have 10 nodes that are not active all the time, while some are active other might be sleeping, then you can put their names in the client url string separated by a comma, ,AFAIT, they will not be called by the application server
Hope that helps.
Nodes come and go.
Thanks for your answer. Of course I mean the nodes at lookup time, I realize that they may change.
I should be possible, the load balancing and failover logic is in the smart stub, not on the server.
You can call org.jboss.ha.framework.interfaces.ClusteringTargetsRepositorygetFamilyClusterInfo(String) to get the org.jboss.ha.framework.interfaces.FamilyClusterInfo object for the bean. From there you can call FamilyClusterInfo.getTargets() to get back an array list of targets (i.e. objects that allow the proxy to communicate with a cluster node.)
Problem is the targets are not necessarily user-friendly; e.g. if you are using the JRMP invoker (default) the target will be an RMI stub.
Turn on TRACE level logging of org.jboss.ha on the client side; you'll see messages to clue you in on what String to pass to ClusteringTargetsRepositorygetFamilyClusterInfo().