public static void main( String[] args ) throws UnknownHostException, IOException
    {
        WriteLog.initLogging();
        try {
            MyBatisManager.initDBFactory("development", "Projects");
            MyBatisManager.initDBFactory("development", "Data");
            RequestProjectsSessionManager.initialize();
            RequestDataSessionManager.initialize();
        } catch (Exception ex) {
            Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
        }
        //число рабочих потоков, максимум памяти на 1 канал, максимальный суммарный размер памяти, время жизни
        //(int corePoolSize, long maxChannelMemorySize, long maxTotalMemorySize, long keepAliveTime, TimeUnit unit) 
        ExecutorService bossExec = new OrderedMemoryAwareThreadPoolExecutor(1, 400000000, 2000000000, 60, TimeUnit.SECONDS);
        ExecutorService ioExec = new OrderedMemoryAwareThreadPoolExecutor(4 /* число рабочих потоков */, 400000000, 2000000000, 60, TimeUnit.SECONDS);
        // Configure the server.
          ServerBootstrap bootstrap = new ServerBootstrap(
                  new NioServerSocketChannelFactory(bossExec, ioExec, 4 /* то же самое число рабочих потоков */));
  
          // Set up the event pipeline factory.
          bootstrap.setPipelineFactory(new ServerPipelineFactory());  
          // Bind and start to accept incoming connections.
          bootstrap.bind(new InetSocketAddress(8080));
    }