[jboss-remoting-issues] [JBoss JIRA] Created: (JBREM-1105) DefaultLoadBalancer doesn't use all available server (if there are x servers available it uses x-1 of these)
Mikael Thorman (JIRA)
jira-events at lists.jboss.org
Mon Mar 2 04:40:58 EST 2009
DefaultLoadBalancer doesn't use all available server (if there are x servers available it uses x-1 of these)
------------------------------------------------------------------------------------------------------------
Key: JBREM-1105
URL: https://jira.jboss.org/jira/browse/JBREM-1105
Project: JBoss Remoting
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: transporter
Affects Versions: 2.2.2.SP10
Environment: JBoss EAP 4.3.0, Windows XP, Java 1.6.0_11
Reporter: Mikael Thorman
Invalid use of the Random nextInt function in class: org.jboss.remoting.transporter.DefaultLoadBalancer function: selectServer
Current code:
index = new Random().nextInt(size - 1);
Should be:
index = new Random().nextInt(size);
tested current code with 2 servers and it always chooses the first one until this is shut, first after this it uses the second one.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-remoting-issues
mailing list