JBoss 4.3 release.
JBM Version 1.4
I am not seeing the behavior described below in regard to supportsLoadBalancing and supportsFailover. I would like to use both of these features, but neither is working.
If the supportsLoadBalancing attribute of the connection factory is set to true then consecutive create connection attempts will round robin between available servers. The first node to try is chosen randomly If the supportsFailover attribute of the connection factory is set to true then automatic failover is enabled. This will automatically failover from one server to another, transparently to the user, in case of failure.
I have verified the following:
When I stop one of the nodes I see my exception listener fire. This is the first suprise because I thought the supportsFailover attribute protects me from that. In any case, the exception listener is coded to try and reconnect when there is a problem and it asks for a new connection from the ClusteredConnectionFactory, however it always get refused connections from the down node. I thought it would at least go to the other node every other time.
If you stop one node, the connections to it will automatically fail over to the other node. However, if you register a listener to a connection, you will get notified only if the failover is not successful.
Did you set up your JMS cluster correctly?