include local port in transport to string to allow correlation between client and server side transport threads based on their ports.

Appending @local-port so client side: "ActiveMQ Transport: tcp://localhost/127.0.0.1:61616@56811" thread can be correlated with broker
side: "ActiveMQ Transport: tcp:///127.0.0.1:56811@61616" which listens on local 61616

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1376038 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2012-08-22 13:31:20 +00:00
parent 4bace216b9
commit 6c73104152
1 changed files with 1 additions and 1 deletions

View File

@ -189,7 +189,7 @@ public class TcpTransport extends TransportThreadSupport implements Transport, S
*/
@Override
public String toString() {
return "" + (socket.isConnected() ? "tcp://" + socket.getInetAddress() + ":" + socket.getPort()
return "" + (socket.isConnected() ? "tcp://" + socket.getInetAddress() + ":" + socket.getPort() + "@" + socket.getLocalPort()
: (localLocation != null ? localLocation : remoteLocation)) ;
}