You could maybe implement a LoadBalancingFactory, and set it up on the 
ConnectionFactory


  | public class MyLoadbalancingFactory extends LoadBalancingFactory
  | 
  | {
  |    public LoadBalancingPolicy 
createLoadBalancingPolicy(ConnectionFactoryDelegate[] view)
  |    {
  |       return new MyRoundRobinLoadBalancingPolicy(view);
  |    }
  | 
  | }
  | 




And MyRoundRobinLoadBalancingPolicy:

  | public class MyRoundRobinLoadBalancingPolicy extends 
RoundRobinLoadBalancingPolicy
  | 
  | {
  |    public synchronized void updateView(ConnectionFactoryDelegate[] 
delegates)
  |    {
  |       super.updateView(delegates);
  |    }
  | 
  |    
  | }
  | 


You should be notified on the client when an update happens on the topology.


But if you don't really need a callback, on ClientConnectionFactoryDelegate, 
you will find the getTopology method.

You probably need to access The ClientConnectionFactoryDeleget throught 
JBossConnectionFactory:


(ClientClusteredConnectionFactoryDelegate)(((JBossConnectionFactory)cfFromJNDI).getDelegate).getTopology();

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4183325#4183325

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4183325
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to