public void start() throws Exception {
starting = true;
try {
synchronized (this) {
if (taskRunnerFactory != null) {
taskRunner = taskRunnerFactory.createTaskRunner(this, "ActiveMQ Connection Dispatcher: "
+ getRemoteAddress());
} else {
taskRunner = null;
}
transport.start();
active = true;
dispatchAsync(connector.getBrokerInfo());
connector.onStarted(this);
}
} catch (Exception e) {
stop();
throw e;
} finally {
starting = false;
if (pendingStop) {
LOG.debug("Calling the delayed stop()");
stop();
}
}
}