Hi, Maarten, thank you for your suggestions. >(1) creating a new CommunicatorServer instance, to stop the server is a bit weird > a) since your SocketAcceptor is already static, you could make the stop > method static as well > b) I would avoid static fields altogether
If I don't use the static fields, how could I get the CommunicatorServer's acceptor instance to call unbindAlll() method? >(4) Are you sure you need the LinkedBlockingQueue ? >You could also opt to do your business logic inside messageReceived() >without an extra thread pool Yes, since I have 9 queues to store the IoSession according to received message's priorities. So I need put them in to different queue. a better way? I have some question, would you give me some help? When I create a MessageConsumer instance, should I use the same thread pool executorService2 already been used in IoFilterChain? Or, need I set up a new thread pool just like the first constructor do? If I set up a new pool, how could I down the pool without static fields when I shutdown the server, or I don't care about it? -- View this message in context: http://www.nabble.com/unbindAll%28%29-would-close-the-IoSession--tf3990073.html#a11335516 Sent from the mina dev mailing list archive at Nabble.com.
