Hi, Trustin, thx for your reply.

According to your advice, I modify those codes below:

ExecutorService executor1 = Executors.newCachedThreadPool();
SocketAcceptor acceptor = new SocketAcceptor(executor1); 
SocketAcceptorConfig config = (SocketAcceptorConfig)
acceptor.getDefaultConfig();
config.setThreadModel(ThreadModel.MANUAL);
ExecutorService executor2 = Executors.newCachedThreadPool();
config.getFilterChain().addLast("pool", new ExecutorFilter(executor2)); 

It's correct now? But, what the difference between these two pool? Is
executor1 only used by I/O processor? and  executor2 work for the IoFilters
after it in the IoFilterChain, also work for the following IoHandler? 

And other, you said"Adding two executor filter might not work, but please
give it a try." Is that means adding only one thread pool into IoFilterChain
is enough, and the other pools are redundant? en...
http://mina.apache.org/configuring-thread-model.html
http://mina.apache.org/configuring-thread-model.html  said that"You can add
any number of ExecutorFilter anywhere in the IoFilterChain to implement any
kind of thread model". What it do for me if I add multi-pools in the
IoFilterChain?

thx a lot :)


-- 
View this message in context: 
http://www.nabble.com/How-could-I-set-thread-pool-for-IoServices-and-ExecutorFilters--tf3882251.html#a11009495
Sent from the mina dev mailing list archive at Nabble.com.

Reply via email to