This content has been marked as final.
Show 2 replies
-
1. Re: JBoss callback for JMS Client
clebert.suconic Oct 20, 2008 2:09 PM (in response to bfach)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();
-
2. Re: JBoss callback for JMS Client
bfach Oct 23, 2008 11:44 AM (in response to bfach)Hey,
I am wondering if this could be a feature for JBM 2? This would allow the JMS Client to know when a new server has entered the cluster.