The HA-JNDI-Port is always the 1100 (unless configured otherwise). Right?
We have configured different ports since we are running multiple jboss instances on one piece of hardware. Therefore the port is not always 1100.
Suppose you have figured it out by now, but you could always query the 'Port' attribute of the 'jboss:service=HAJNDI' MBean through the local MBeanServer.
I think it's always neccesary to know where the HAJNDI ports and nodes are. You can configure clients to connect with a list of HAJNDI services. If one fails, the client try to continue with the next.
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces java.naming.provider.url=localhost:1100,localhost:1200
For your code, access to the cluster is now transparent.
If you are going to change the cluster, just you'll need to change the
configuration of the client