activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [01/41] activemq-artemis git commit: ARTEMIS-416 - Netty Acceptor allows transfer of connections when paused [Forced Update!]
Date Mon, 22 Feb 2016 15:56:06 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/refactor-openwire 95f81bb44 -> bf1555342 (forced update)


ARTEMIS-416 - Netty Acceptor allows transfer of connections when paused

Throw an exception if the acceptor is paused or not started

https://issues.apache.org/jira/browse/ARTEMIS-416


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/f6ea511b
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/f6ea511b
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/f6ea511b

Branch: refs/heads/refactor-openwire
Commit: f6ea511b8ada36d2847a16415ea5fef8f3c71665
Parents: 8c6f45b
Author: Andy Taylor <andy.tayls67@gmail.com>
Authored: Mon Feb 22 14:26:59 2016 +0000
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Mon Feb 22 10:47:13 2016 -0500

----------------------------------------------------------------------
 .../activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java  | 3 +++
 .../activemq/artemis/core/server/ActiveMQMessageBundle.java       | 3 +++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f6ea511b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
index 8a0dc2f..efbc1ea 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
@@ -426,6 +426,9 @@ public class NettyAcceptor extends AbstractAcceptor {
     * @param channel A Netty channel created outside this NettyAcceptor.
     */
    public void transfer(Channel channel) {
+      if (paused || eventLoopGroup == null) {
+         throw ActiveMQMessageBundle.BUNDLE.acceptorUnavailable();
+      }
       channel.pipeline().addLast(protocolHandler.getProtocolDecoder());
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f6ea511b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
index a46d240..da1aee4 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
@@ -365,4 +365,7 @@ public interface ActiveMQMessageBundle {
 
    @Message(id = 119115, value = "Colocated Policy hasn't different type live and backup",
format = Message.Format.MESSAGE_FORMAT)
    ActiveMQIllegalStateException liveBackupMismatch();
+
+   @Message(id = 119116, value = "Netty Acceptor unavailable", format = Message.Format.MESSAGE_FORMAT)
+   IllegalStateException acceptorUnavailable();
 }


Mime
View raw message