You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2017/09/28 18:57:14 UTC

[1/2] activemq-artemis git commit: This closes #1556

Repository: activemq-artemis
Updated Branches:
  refs/heads/master 341ecd4d1 -> d6a4b4349


This closes #1556


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

Branch: refs/heads/master
Commit: d6a4b43492a2232f5e3fb2c34e9ddcebc9de76e7
Parents: 341ecd4 b53b3ac
Author: Justin Bertram <jb...@apache.org>
Authored: Thu Sep 28 13:51:00 2017 -0500
Committer: Justin Bertram <jb...@apache.org>
Committed: Thu Sep 28 13:51:00 2017 -0500

----------------------------------------------------------------------
 .../org/apache/activemq/artemis/utils/Env.java  | 31 ------------
 .../artemis/core/remoting/impl/netty/Epoll.java | 51 --------------------
 .../core/remoting/impl/netty/KQueue.java        | 51 --------------------
 .../remoting/impl/netty/NettyConnector.java     |  2 +
 .../core/remoting/impl/netty/NettyAcceptor.java |  2 +
 pom.xml                                         |  2 +-
 6 files changed, 5 insertions(+), 134 deletions(-)
----------------------------------------------------------------------



[2/2] activemq-artemis git commit: ARTEMIS-1439 Upgrade Netty to 4.1.16

Posted by jb...@apache.org.
ARTEMIS-1439 Upgrade Netty to 4.1.16

Upgrade netty.
Remove tacticle fix for https://issues.apache.org/jira/browse/ARTEMIS-1099
as now fixed/handled upstream in netty from 4.1.16 https://github.com/netty/netty/issues/7150

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

Branch: refs/heads/master
Commit: b53b3acdb42e67fc596535523ba393d76bcff2e7
Parents: 341ecd4
Author: Michael Andre Pearce <Mi...@me.com>
Authored: Wed Sep 27 06:49:39 2017 +0100
Committer: Justin Bertram <jb...@apache.org>
Committed: Thu Sep 28 13:51:00 2017 -0500

----------------------------------------------------------------------
 .../org/apache/activemq/artemis/utils/Env.java  | 31 ------------
 .../artemis/core/remoting/impl/netty/Epoll.java | 51 --------------------
 .../core/remoting/impl/netty/KQueue.java        | 51 --------------------
 .../remoting/impl/netty/NettyConnector.java     |  2 +
 .../core/remoting/impl/netty/NettyAcceptor.java |  2 +
 pom.xml                                         |  2 +-
 6 files changed, 5 insertions(+), 134 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b53b3acd/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Env.java
----------------------------------------------------------------------
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Env.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Env.java
index cd41bef..ed403f8 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Env.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Env.java
@@ -59,11 +59,6 @@ public final class Env {
     */
    private static boolean testEnv = false;
 
-   private static final String OS = System.getProperty("os.name").toLowerCase();
-   private static final boolean IS_LINUX = OS.startsWith("linux");
-   private static final boolean IS_MAC = OS.startsWith("mac");
-   private static final boolean IS_64BIT = checkIs64bit();
-
    private Env() {
 
    }
@@ -84,30 +79,4 @@ public final class Env {
       Env.testEnv = testEnv;
    }
 
-   public static boolean isLinuxOs() {
-      return IS_LINUX == true;
-   }
-
-   public static boolean isMacOs() {
-      return IS_MAC == true;
-   }
-
-   public static boolean is64BitJvm() {
-      return IS_64BIT;
-   }
-
-   private static boolean checkIs64bit() {
-      //check the more used JVMs
-      String systemProp;
-      systemProp = System.getProperty("com.ibm.vm.bitmode");
-      if (systemProp != null) {
-         return "64".equals(systemProp);
-      }
-      systemProp = System.getProperty("sun.arch.data.model");
-      if (systemProp != null) {
-         return "64".equals(systemProp);
-      }
-      systemProp = System.getProperty("java.vm.version");
-      return systemProp != null && systemProp.contains("_64");
-   }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b53b3acd/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/Epoll.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/Epoll.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/Epoll.java
deleted file mode 100644
index 8779a5d..0000000
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/Epoll.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.activemq.artemis.core.remoting.impl.netty;
-
-import org.apache.activemq.artemis.core.client.ActiveMQClientLogger;
-import org.apache.activemq.artemis.utils.Env;
-
-/**
- * Tells if <a href="http://netty.io/wiki/native-transports.html">{@code netty-transport-native-epoll}</a> is supported.
- */
-public final class Epoll {
-
-   private static final boolean IS_EPOLL_AVAILABLE = isEpollAvailable();
-
-   private static boolean isEpollAvailable() {
-      try {
-         if (Env.is64BitJvm() && Env.isLinuxOs()) {
-            return io.netty.channel.epoll.Epoll.isAvailable();
-         } else {
-            return false;
-         }
-      } catch (Throwable e) {
-         ActiveMQClientLogger.LOGGER.unableToCheckEpollAvailability(e);
-         return false;
-      }
-
-   }
-
-   private Epoll() {
-
-   }
-
-   public static boolean isAvailable() {
-      return IS_EPOLL_AVAILABLE;
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b53b3acd/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/KQueue.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/KQueue.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/KQueue.java
deleted file mode 100644
index d2adae3..0000000
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/KQueue.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.activemq.artemis.core.remoting.impl.netty;
-
-import org.apache.activemq.artemis.core.client.ActiveMQClientLogger;
-import org.apache.activemq.artemis.utils.Env;
-
-/**
- * Tells if <a href="http://netty.io/wiki/native-transports.html">{@code netty-transport-native-kqueue}</a> is supported.
- */
-public final class KQueue {
-
-   private static final boolean IS_KQUEUE_AVAILABLE = isKQueueAvailable();
-
-   private static boolean isKQueueAvailable() {
-      try {
-         if (Env.is64BitJvm() && Env.isMacOs()) {
-            return io.netty.channel.kqueue.KQueue.isAvailable();
-         } else {
-            return false;
-         }
-      } catch (Throwable e) {
-         ActiveMQClientLogger.LOGGER.unableToCheckKQueueAvailability(e);
-         return false;
-      }
-
-   }
-
-   private KQueue() {
-
-   }
-
-   public static boolean isAvailable() {
-      return IS_KQUEUE_AVAILABLE;
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b53b3acd/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
index aaf0b08..4452008 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java
@@ -61,10 +61,12 @@ import io.netty.channel.ChannelPromise;
 import io.netty.channel.EventLoopGroup;
 import io.netty.channel.SimpleChannelInboundHandler;
 import io.netty.channel.WriteBufferWaterMark;
+import io.netty.channel.epoll.Epoll;
 import io.netty.channel.epoll.EpollEventLoopGroup;
 import io.netty.channel.epoll.EpollSocketChannel;
 import io.netty.channel.group.ChannelGroup;
 import io.netty.channel.group.DefaultChannelGroup;
+import io.netty.channel.kqueue.KQueue;
 import io.netty.channel.kqueue.KQueueEventLoopGroup;
 import io.netty.channel.kqueue.KQueueSocketChannel;
 import io.netty.channel.nio.NioEventLoopGroup;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b53b3acd/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 b37ad58..88881aa 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
@@ -50,11 +50,13 @@ import io.netty.channel.DefaultEventLoopGroup;
 import io.netty.channel.EventLoopGroup;
 import io.netty.channel.ServerChannel;
 import io.netty.channel.WriteBufferWaterMark;
+import io.netty.channel.epoll.Epoll;
 import io.netty.channel.epoll.EpollEventLoopGroup;
 import io.netty.channel.epoll.EpollServerSocketChannel;
 import io.netty.channel.group.ChannelGroup;
 import io.netty.channel.group.ChannelGroupFuture;
 import io.netty.channel.group.DefaultChannelGroup;
+import io.netty.channel.kqueue.KQueue;
 import io.netty.channel.kqueue.KQueueEventLoopGroup;
 import io.netty.channel.kqueue.KQueueServerSocketChannel;
 import io.netty.channel.local.LocalAddress;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b53b3acd/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 28a9d60..9c9c265 100644
--- a/pom.xml
+++ b/pom.xml
@@ -86,7 +86,7 @@
       <jgroups.version>3.6.13.Final</jgroups.version>
       <maven.assembly.plugin.version>2.4</maven.assembly.plugin.version>
       <mockito.version>2.8.47</mockito.version>
-      <netty.version>4.1.14.Final</netty.version>
+      <netty.version>4.1.16.Final</netty.version>
       <proton.version>0.22.0</proton.version>
       <resteasy.version>3.0.19.Final</resteasy.version>
       <slf4j.version>1.7.21</slf4j.version>