NioWorker will not shut itself down as long as there's any unfinished connection. If
it just exits the loop when requested, resources will leak (i.e. some sockets will remain
open.) Therefore, you need to make sure all connections are closed before shutting down
the Executors.
When shutting down the Executors, you must make sure that you are not waiting for the
termination (ExecutorService.awaitTermination()) of the Executors in the worker thread.
It's because you can't wait for the termination of the thread you are running on.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215564#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...