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
This commit is contained in:
Michael Andre Pearce 2017-09-27 06:49:39 +01:00 committed by Justin Bertram
parent 341ecd4d1a
commit b53b3acdb4
6 changed files with 5 additions and 134 deletions

View File

@ -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");
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;

View File

@ -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;

View File

@ -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>