mirror of https://github.com/apache/activemq.git
suppress the stack trace output for the error and just log a warning that the URI path is not valid for binding to a local port. Output the full exception stack trace if debug logging is turned on. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1074948 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
56f8e368d5
commit
72a0fd1a43
|
@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com (logging improvement modifications)
|
* @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com (logging improvement modifications)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class TcpTransportFactory extends TransportFactory {
|
public class TcpTransportFactory extends TransportFactory {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(TcpTransportFactory.class);
|
private static final Logger LOG = LoggerFactory.getLogger(TcpTransportFactory.class);
|
||||||
|
@ -68,7 +68,7 @@ public class TcpTransportFactory extends TransportFactory {
|
||||||
/**
|
/**
|
||||||
* Allows subclasses of TcpTransportFactory to create custom instances of
|
* Allows subclasses of TcpTransportFactory to create custom instances of
|
||||||
* TcpTransportServer.
|
* TcpTransportServer.
|
||||||
*
|
*
|
||||||
* @param location
|
* @param location
|
||||||
* @param serverSocketFactory
|
* @param serverSocketFactory
|
||||||
* @return
|
* @return
|
||||||
|
@ -86,7 +86,7 @@ public class TcpTransportFactory extends TransportFactory {
|
||||||
|
|
||||||
Map<String, Object> socketOptions = IntrospectionSupport.extractProperties(options, "socket.");
|
Map<String, Object> socketOptions = IntrospectionSupport.extractProperties(options, "socket.");
|
||||||
tcpTransport.setSocketOptions(socketOptions);
|
tcpTransport.setSocketOptions(socketOptions);
|
||||||
|
|
||||||
if (tcpTransport.isTrace()) {
|
if (tcpTransport.isTrace()) {
|
||||||
try {
|
try {
|
||||||
transport = TransportLoggerFactory.getInstance().createTransportLogger(transport, tcpTransport.getLogWriterName(),
|
transport = TransportLoggerFactory.getInstance().createTransportLogger(transport, tcpTransport.getLogWriterName(),
|
||||||
|
@ -101,7 +101,7 @@ public class TcpTransportFactory extends TransportFactory {
|
||||||
transport = new InactivityMonitor(transport, format);
|
transport = new InactivityMonitor(transport, format);
|
||||||
IntrospectionSupport.setProperties(transport, options);
|
IntrospectionSupport.setProperties(transport, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Only need the WireFormatNegotiator if using openwire
|
// Only need the WireFormatNegotiator if using openwire
|
||||||
if (format instanceof OpenWireFormat) {
|
if (format instanceof OpenWireFormat) {
|
||||||
|
@ -129,7 +129,10 @@ public class TcpTransportFactory extends TransportFactory {
|
||||||
String localString = location.getScheme() + ":/" + path;
|
String localString = location.getScheme() + ":/" + path;
|
||||||
localLocation = new URI(localString);
|
localLocation = new URI(localString);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.warn("path isn't a valid local location for TcpTransport to use", e);
|
LOG.warn("path isn't a valid local location for TcpTransport to use", e.getMessage());
|
||||||
|
if(LOG.isDebugEnabled()) {
|
||||||
|
LOG.debug("Failure detail", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SocketFactory socketFactory = createSocketFactory();
|
SocketFactory socketFactory = createSocketFactory();
|
||||||
|
@ -139,7 +142,7 @@ public class TcpTransportFactory extends TransportFactory {
|
||||||
/**
|
/**
|
||||||
* Allows subclasses of TcpTransportFactory to provide a create custom
|
* Allows subclasses of TcpTransportFactory to provide a create custom
|
||||||
* TcpTransport intances.
|
* TcpTransport intances.
|
||||||
*
|
*
|
||||||
* @param location
|
* @param location
|
||||||
* @param wf
|
* @param wf
|
||||||
* @param socketFactory
|
* @param socketFactory
|
||||||
|
|
Loading…
Reference in New Issue