Hi,

I am using Mina (1.6) for a use case similar to the HttpProtocolHandler example delivered with the release. There the I/O logic needs to be executed in a separate "worker" thread (You *MUST* execute stream I/O logic in a separate thread).

I tried to avoid this specifying a thread pool as execution filter in the filter chain,

DefaultIoFilterChainBuilder filterChainBuilder = _acceptor.getDefaultConfig().getFilterChain(); filterChainBuilder.addLast("threadPool", new ExecutorFilter(Executors.newCachedThreadPool()));

but this does not seem to have the same purpose.
The worker are used to be able to begin reading the input stream (wrapper) on the server, while the client is still writing to the buffer. Did I understand right?
Can the workers in HttpProtocolHandler be avoided at all?

Thanks and best regards
sandro



Reply via email to