mirror of https://github.com/apache/activemq.git
Fix for AMQ-1339 - Give the connection dispatcher threads names that are easy to associate with the peer.
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@559071 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3a7c673dec
commit
8f6fac7f1b
|
@ -110,7 +110,7 @@ public class TransportConnection implements Service,Connection,Task,CommandVisit
|
||||||
private WireFormatInfo wireFormatInfo;
|
private WireFormatInfo wireFormatInfo;
|
||||||
// Used to do async dispatch.. this should perhaps be pushed down into the transport layer..
|
// Used to do async dispatch.. this should perhaps be pushed down into the transport layer..
|
||||||
protected final List <Command>dispatchQueue=Collections.synchronizedList(new LinkedList<Command>());
|
protected final List <Command>dispatchQueue=Collections.synchronizedList(new LinkedList<Command>());
|
||||||
protected final TaskRunner taskRunner;
|
protected TaskRunner taskRunner;
|
||||||
protected final AtomicReference transportException = new AtomicReference();
|
protected final AtomicReference transportException = new AtomicReference();
|
||||||
private boolean inServiceException=false;
|
private boolean inServiceException=false;
|
||||||
private ConnectionStatistics statistics=new ConnectionStatistics();
|
private ConnectionStatistics statistics=new ConnectionStatistics();
|
||||||
|
@ -137,6 +137,7 @@ public class TransportConnection implements Service,Connection,Task,CommandVisit
|
||||||
private boolean networkConnection;
|
private boolean networkConnection;
|
||||||
private AtomicInteger protocolVersion=new AtomicInteger(CommandTypes.PROTOCOL_VERSION);
|
private AtomicInteger protocolVersion=new AtomicInteger(CommandTypes.PROTOCOL_VERSION);
|
||||||
private DemandForwardingBridge duplexBridge = null;
|
private DemandForwardingBridge duplexBridge = null;
|
||||||
|
final private TaskRunnerFactory taskRunnerFactory;
|
||||||
|
|
||||||
static class ConnectionState extends org.apache.activemq.state.ConnectionState{
|
static class ConnectionState extends org.apache.activemq.state.ConnectionState{
|
||||||
|
|
||||||
|
@ -173,12 +174,7 @@ public class TransportConnection implements Service,Connection,Task,CommandVisit
|
||||||
if(connector!=null){
|
if(connector!=null){
|
||||||
this.statistics.setParent(connector.getStatistics());
|
this.statistics.setParent(connector.getStatistics());
|
||||||
}
|
}
|
||||||
if(taskRunnerFactory!=null){
|
this.taskRunnerFactory=taskRunnerFactory;
|
||||||
taskRunner=taskRunnerFactory.createTaskRunner(this,"ActiveMQ Connection Dispatcher: "
|
|
||||||
+System.identityHashCode(this));
|
|
||||||
}else{
|
|
||||||
taskRunner=null;
|
|
||||||
}
|
|
||||||
connector.setBrokerName(broker.getBrokerName());
|
connector.setBrokerName(broker.getBrokerName());
|
||||||
this.transport=transport;
|
this.transport=transport;
|
||||||
this.transport.setTransportListener(new DefaultTransportListener(){
|
this.transport.setTransportListener(new DefaultTransportListener(){
|
||||||
|
@ -839,6 +835,13 @@ public class TransportConnection implements Service,Connection,Task,CommandVisit
|
||||||
starting=true;
|
starting=true;
|
||||||
try{
|
try{
|
||||||
transport.start();
|
transport.start();
|
||||||
|
|
||||||
|
if (taskRunnerFactory != null) {
|
||||||
|
taskRunner = taskRunnerFactory.createTaskRunner(this, "ActiveMQ Connection Dispatcher: " + getRemoteAddress());
|
||||||
|
} else {
|
||||||
|
taskRunner = null;
|
||||||
|
}
|
||||||
|
|
||||||
active=true;
|
active=true;
|
||||||
this.processDispatch(connector.getBrokerInfo());
|
this.processDispatch(connector.getBrokerInfo());
|
||||||
connector.onStarted(this);
|
connector.onStarted(this);
|
||||||
|
|
Loading…
Reference in New Issue