git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1213691 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2011-12-13 13:42:37 +00:00
parent 2bfd88e87d
commit cfcd4f7f64
2 changed files with 11 additions and 10 deletions

View File

@ -196,9 +196,9 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
if (!stopping.get()) { if (!stopping.get()) {
transportException.set(e); transportException.set(e);
if (TRANSPORTLOG.isDebugEnabled()) { if (TRANSPORTLOG.isDebugEnabled()) {
TRANSPORTLOG.debug("Transport failed: " + e, e); TRANSPORTLOG.debug(this + " failed: " + e, e);
} else if (TRANSPORTLOG.isWarnEnabled() && !expected(e)) { } else if (TRANSPORTLOG.isWarnEnabled() && !expected(e)) {
TRANSPORTLOG.warn("Transport failed: " + e); TRANSPORTLOG.warn(this + " failed: " + e);
} }
stopAsync(); stopAsync();
} }
@ -1256,7 +1256,7 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
return null; return null;
} }
@SuppressWarnings("unchecked") @SuppressWarnings({ "unchecked", "rawtypes" })
private HashMap<String, String> createMap(Properties properties) { private HashMap<String, String> createMap(Properties properties) {
return new HashMap(properties); return new HashMap(properties);
} }

View File

@ -45,7 +45,7 @@ import org.slf4j.LoggerFactory;
/** /**
* @org.apache.xbean.XBean * @org.apache.xbean.XBean
* *
*/ */
public class TransportConnector implements Connector, BrokerServiceAware { public class TransportConnector implements Connector, BrokerServiceAware {
@ -130,7 +130,7 @@ public class TransportConnector implements Connector, BrokerServiceAware {
} }
/** /**
* *
* @deprecated use the {@link #setBrokerService(BrokerService)} method * @deprecated use the {@link #setBrokerService(BrokerService)} method
* instead. * instead.
*/ */
@ -168,7 +168,7 @@ public class TransportConnector implements Connector, BrokerServiceAware {
* {@link TransportServer} configured via the * {@link TransportServer} configured via the
* {@link #setServer(TransportServer)} method. This value is used to lazy * {@link #setServer(TransportServer)} method. This value is used to lazy
* create a {@link TransportServer} instance * create a {@link TransportServer} instance
* *
* @param uri * @param uri
*/ */
public void setUri(URI uri) { public void setUri(URI uri) {
@ -218,8 +218,9 @@ public class TransportConnector implements Connector, BrokerServiceAware {
Connection connection = createConnection(transport); Connection connection = createConnection(transport);
connection.start(); connection.start();
} catch (Exception e) { } catch (Exception e) {
String remoteHost = transport.getRemoteAddress();
ServiceSupport.dispose(transport); ServiceSupport.dispose(transport);
onAcceptError(e); onAcceptError(e, remoteHost);
} }
} }
}); });
@ -526,7 +527,7 @@ public class TransportConnector implements Connector, BrokerServiceAware {
public void setRebalanceClusterClients(boolean rebalanceClusterClients) { public void setRebalanceClusterClients(boolean rebalanceClusterClients) {
this.rebalanceClusterClients = rebalanceClusterClients; this.rebalanceClusterClients = rebalanceClusterClients;
} }
/** /**
* @return the updateClusterClientsOnRemove * @return the updateClusterClientsOnRemove
*/ */
@ -540,7 +541,7 @@ public class TransportConnector implements Connector, BrokerServiceAware {
public void setUpdateClusterClientsOnRemove(boolean updateClusterClientsOnRemove) { public void setUpdateClusterClientsOnRemove(boolean updateClusterClientsOnRemove) {
this.updateClusterClientsOnRemove = updateClusterClientsOnRemove; this.updateClusterClientsOnRemove = updateClusterClientsOnRemove;
} }
/** /**
* @return the updateClusterFilter * @return the updateClusterFilter
*/ */
@ -572,4 +573,4 @@ public class TransportConnector implements Connector, BrokerServiceAware {
public void setAuditNetworkProducers(boolean auditNetworkProducers) { public void setAuditNetworkProducers(boolean auditNetworkProducers) {
this.auditNetworkProducers = auditNetworkProducers; this.auditNetworkProducers = auditNetworkProducers;
} }
} }