When the secondaryBindPort is default, JBoss Messaging will gets random port for the secondaryBindPort. If it gets same port with JBoss other configured port, IOException will occur.
A customer got following Exception when EJB connect listens. However, same JBoss process listened 3873 port.
XXXXX ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=org.jboss.ejb3.RemotingConnector state=Create java.io.IOException: SocketServerInvoker[xxxx.xxxx.xxxx.xxxx:3873] error creating ServerSocket[xxxx.xxxx.xxxx.xxxx:3873]: Address already in use at org.jboss.remoting.transport.socket.SocketServerInvoker.createServerSockets(SocketServerInvoker.java:370) at org.jboss.remoting.transport.socket.SocketServerInvoker.start(SocketServerInvoker.java:250) at org.jboss.remoting.transport.Connector.start(Connector.java:344) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59) at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
This behavior was reported in the EAP 5.0.1. However, I think same behavior can occur in the EAP 5.2 (EAP latest version) too.