diff --git a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyAcceptor.java b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyAcceptor.java index d135209ff0..47f64c0755 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyAcceptor.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/remoting/impl/netty/NettyAcceptor.java @@ -96,6 +96,8 @@ public class NettyAcceptor implements Acceptor // Disable resource leak detection for performance reasons by default ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.DISABLED); } + //just for debug + private final String protocolsString; private final String name; @@ -206,6 +208,8 @@ public class NettyAcceptor implements Acceptor this.protocolHandler = new ProtocolHandler(protocolMap, this, configuration, scheduledThreadPool); + this.protocolsString = getProtocols(protocolMap); + host = ConfigurationHelper.getStringProperty(TransportConstants.HOST_PROP_NAME, TransportConstants.DEFAULT_HOST, configuration); @@ -478,7 +482,7 @@ public class NettyAcceptor implements Acceptor TimeUnit.MILLISECONDS); } - ActiveMQServerLogger.LOGGER.startedNettyAcceptor(TransportConstants.NETTY_VERSION, host, port); + ActiveMQServerLogger.LOGGER.startedNettyAcceptor(TransportConstants.NETTY_VERSION, host, port, protocolsString); } } @@ -666,6 +670,23 @@ public class NettyAcceptor implements Acceptor return new ActiveMQServerChannelHandler(channelGroup, handler, new Listener()); } + private static String getProtocols(Map protocolManager) + { + StringBuilder sb = new StringBuilder(); + if (protocolManager != null) + { + Set strings = protocolManager.keySet(); + for (String string : strings) + { + if (sb.length() > 0) + { + sb.append(","); + } + sb.append(string); + } + } + return sb.toString(); + } // Inner classes ----------------------------------------------------------------------------- private final class ActiveMQServerChannelHandler extends ActiveMQChannelHandler implements ConnectionCreator diff --git a/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQServerLogger.java b/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQServerLogger.java index 7d6889dc60..bb6a269fbd 100644 --- a/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQServerLogger.java +++ b/activemq-server/src/main/java/org/apache/activemq/core/server/ActiveMQServerLogger.java @@ -167,8 +167,8 @@ public interface ActiveMQServerLogger extends BasicLogger void journalUnreferencedMessage(Long messageID); @LogMessage(level = Logger.Level.INFO) - @Message(id = 221020, value = "Started Netty Acceptor version {0} {1}:{2,number,#}", format = Message.Format.MESSAGE_FORMAT) - void startedNettyAcceptor(String id, String host, Integer port); + @Message(id = 221020, value = "Started Netty Acceptor version {0} {1}:{2,number,#} for protocols [{3}]", format = Message.Format.MESSAGE_FORMAT) + void startedNettyAcceptor(String id, String host, Integer port, String enabledProtocols); @LogMessage(level = Logger.Level.INFO) @Message(id = 221021, value = "failed to remove connection", format = Message.Format.MESSAGE_FORMAT)