9 Replies Latest reply: Sep 24, 2009 4:46 PM by Brian Stansberry RSS

Load Balancing in Jboss 5.1 , not able to test it !

Leonardo Battagli Newbie

Hi all !
this is the first time for me posting here !

Let's describe the situation:

I have configured in the same machine (changing all the ports in bindings-jboss-beans.xml) a two node cluster.
I have configured both the 'ClusteredConnectionFactory' and the 'ClusteredPullConnectionFactory' with failover and load balancing.
I have set the LoadBalancingFactory = org.jboss.jms.client.plugin.RoundRobinLoadBalancingFactory

Then in the queue configuration I've added my queue definition with clustered sets to 'true'
I have modified my code adding @Clustered annotation in the MDBs.

Both the two nodes starts up correctly and the cluster is up and running.

I had also set up a client application , running on Tomcat, which simply connect to the ConnectionFactory using the partition name (DefaultPartition).

Here are my result trying to test the load balancing and failover :

1.
Nodo1 up and running (HAJNDI port 1100, JNDI port 1099)
Nodo2 up and running (HAJNDI port 1103, JNDI port 1097)
Client application up and running (Tomcat)

2.
A web-app on tomcat connect and send a Jms message

3.
The Jms message has been consumed on Nodo2

4.
All the subsequent Jms messages sent by the client are forwarded to Node2 (Not a single message has been forward to Node1!)

5.
Nodo2 has been Stopped

5.
All the subsequent Jms messages sent by the client are NOW forwarded to Node1 (Node1 is now the only node being part of the cluster)

6.
Nodo2 has been Restarted

7.
All the subsequent Jms messages sent by the client are NOW AGAIN forwarded to Node1 (Not a single message has been forwarded to the reborn Node2!)

Results:

I understand that failover is working !
But the load balancing it is not !

Anyone can help me find out how to test this load balancing feature ?!?

thks in advance
Leonardo