I'm experimentation with Apache Mina and presently have unclear point:

In NioSocketAcceptor acceptor = new NioSocketAcceptor(2) I specify the amount of acceptors. As fa when i understand they don't operate in separate threads. After I attempt to perform lengthy operation in IoHandlerApadter.messageReceived and new connection is made, a free NioAcceptor is working, e.g. code with 2 NioAcceptors work:

public class MyIOHandler extends IoHandlerAdapter {
...........
private static long number = 0;
public void messageReceived(IoSession session, Object message) throws Exception {
   number++;
   if (number == 1) {
     while(true) { }
   }
}
...........
}

the very first NioAcceptor buisy, when new connection needed, the 2nd remaining acceptor gets control

I question why it really works basically only have 1 thread (without any ExecutorFilter)? What's the philosophy behind Mina acceptors? Is code inside IoHandlerAdapter thread safe or I have to perform synchronization?

Thanks