[jboss-user] [Clustering/JBoss] - Load balance policy problem

xyoungli do-not-reply at jboss.com
Tue Jan 9 13:18:21 EST 2007


We have an application where we need to customize JBoss  LoadBalancePolicy. What we have found is that JBoss gives erroneous target information upon restart of server instances in a cluster. Our setup is as follows:

- JBoss version: 4.0.3SP1
- OS: Windows XP
- cluster: 2 server instances 
- custom load balance policy (LBP): a simple class implementing LoadBalancePolicy.  When the count of available targets changes, randomly chooses a target.

Initially, both server instances are started, the printout from our custom LBP is as follows:
        Tue Jan 09 10:46:35 EST 2007 TARGET COUNT: 2
which is good.
Then, I stopped one server instance, and the printout is as follows:
        Tue Jan 09 10:46:57 EST 2007 TARGET COUNT: 1
which is good too. 
Then I started the server instance, and the printout is as follows:
        Tue Jan 09 10:47:57 EST 2007 TARGET COUNT: 2
        Tue Jan 09 10:47:57 EST 2007 TARGET COUNT: 1
        Tue Jan 09 10:48:03 EST 2007 TARGET COUNT: 2
Our LBP's chooseTarget method was called with the right number of targets, and then wrong number of targets(1), and then the right number of targets again. 
Further, after I restarted the server instances several times, the target count started changing back and forth between 1 and 2.

What is wrong? Thanks for your input in advance.


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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999587



More information about the jboss-user mailing list