From be3622dd04b6c3723b8603437e2be75579c7fbd3 Mon Sep 17 00:00:00 2001 From: jbertram Date: Mon, 16 Mar 2015 14:01:54 -0500 Subject: [PATCH] Log POODLE WARN just once --- .../activemq/core/remoting/impl/netty/NettyAcceptor.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 3c59a03f81..87e1ab04bc 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 @@ -32,6 +32,7 @@ import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.Channel; @@ -347,6 +348,8 @@ public class NettyAcceptor implements Acceptor context = null; // Unused } + final AtomicBoolean warningPrinted = new AtomicBoolean(false); + ChannelInitializer factory = new ChannelInitializer() { @Override @@ -405,11 +408,15 @@ public class NettyAcceptor implements Acceptor { if (s.equals("SSLv3") || s.equals("SSLv2Hello")) { - ActiveMQServerLogger.LOGGER.disallowedProtocol(s); + if (!warningPrinted.get()) + { + ActiveMQServerLogger.LOGGER.disallowedProtocol(s); + } continue; } set.add(s); } + warningPrinted.set(true); engine.setEnabledProtocols(set.toArray(new String[0])); SslHandler handler = new SslHandler(engine);