Skip to content

Instantly share code, notes, and snippets.

@errandir
errandir / NettySharableCombinedChannelDuplexHandlerProblemDemonstration.java
Created February 8, 2017 14:12
Netty 4.1.8.Final @sharable CombinedChannelDuplexHandler usage problem demonstration
import io.netty.bootstrap.Bootstrap;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.buffer.ByteBuf;
import io.netty.channel.*;
import io.netty.channel.ChannelHandler.Sharable;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.codec.ByteToMessageCodec;
@errandir
errandir / TestClass.java
Last active September 6, 2019 07:04
testcontainers-java/issues/572
package my.test;
import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;
import com.mysql.jdbc.log.Slf4JLogger;
import org.testcontainers.containers.MySQLContainer;
import javax.sql.DataSource;
import java.sql.SQLException;
public class TestClass {