Did you try to change the order in your filterChain,
beginning first by the threadPool and then your codec ?
Also for your threadPool (I suppose you use Mina 1.X),
your example show no threadpool in the ExecutorFilter.
I would suggest you to do as :
executor = Executors.newCachedThreadPool();
socketAcceptor.getFilterChain().addLast("threadPool", new
ExecutorFilter(executor));
socketAcceptor.getFilterChain().addLast("xmpp", new ProtocolCodecFilter(new
XMPPCodecFactory()));
And don't forget to do after unbind()
executor.shutdown();
Frederic
notz wrote :
>
> i currently use the mina framework with an jabber server. all users get
> connected trough a connection manager that holds only 5 connections to the
> server. on the server i have added on the SockectAcceptor an ExecuteFilter
> like this:
>
> socketAcceptor = new
> SocketAcceptor(Runtime.getRuntime().availableProcessors(),
> Executors.newCachedThreadPool());
> socketAcceptor.getDefaultConfig().setThreadModel(ThreadModel.MANUAL);
> socketAcceptor.getFilterChain().addFirst("xmpp", new ProtocolCodecFilter(new
> XMPPCodecFactory()));
> socketAcceptor.getFilterChain().addLast("threadPool", new ExecutorFilter());
>
> my problem: if one IoHandler.messageReceived() is blocking for a longer time
> - the hole underlying connection is blocking and no new thread is used to
> process the next message. is that not the reason why i added an
> ExecutorFilter?
>
> i never get more active threads in my ExecutorFilter - ThreadPool than
> connections to the server.
>
> thanks for any advice, what i did wrong.
> notz
> --
> View this message in context:
>
http://www.nabble.com/Problem-with-ExecutorFilter-and-IoHandler-tp14293759s16868p14293759.html
> Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
>
>