try {
executor = Executors.newCachedThreadPool();
//acceptor = new SocketAcceptor();
acceptor = new SocketAcceptor(Runtime.getRuntime().availableProcessors() + 1, Executors.newCachedThreadPool());
SocketAcceptorConfig cfg = new SocketAcceptorConfig();
cfg.setThreadModel(ThreadModel.MANUAL);
cfg.setDisconnectOnUnbind(true);
cfg.setReuseAddress(true);
//cfg.getFilterChain().addLast("logger", new LoggingFilter());
cfg.getFilterChain().addLast("codec", new ProtocolCodecFilter(new IFXProtocolCodecFactory(bufferLimit)));
cfg.getFilterChain().addLast("threadPool", new ExecutorFilter(executor));
sessionHandler = new ServerSessionHandler(this, idleTime, bufferSize, messageIDInfo);
acceptor.bind(new InetSocketAddress(port), sessionHandler, cfg);
} catch (IOException e) {
logger.error(channelName+"|No se pudo levantar el puerto "+ port +": "+e.getMessage()+" |");
}