[jboss-user] [JBoss Messaging] - Re: JBoss callback for JMS Client
clebert.suconic@jboss.com
do-not-reply at jboss.com
Mon Oct 20 14:09:10 EDT 2008
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
More information about the jboss-user
mailing list