-
1. Re: querying ejb proxy stub for available nodes
shoeb1981 Dec 28, 2007 5:34 AM (in response to gogoasa)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. -
2. Re: querying ejb proxy stub for available nodes
gogoasa Jan 1, 2008 9:53 AM (in response to gogoasa)"shoeb1981" wrote:
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. -
3. Re: querying ejb proxy stub for available nodes
brian.stansberry Jan 11, 2008 1:04 PM (in response to gogoasa)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().