On 4/28/06, Sathish Senathi <[EMAIL PROTECTED]> wrote:

Folks,

I am new to MINA and trying to implement a NIO based socket server and
i was able to compile and test the samples includes ( 0.92 version)
and What i was wondering was how control the Thread Pool max thread
count.

I can't see any samples there. What i want is to limit the no of
threads to say 4 or whatever the users wants.

If somebody give me an example for how to do that that will be great.


Here's an example:

ThreadPoolFilter filter = new ThreadPoolFilter();
filter.setMaximumPoolSize(16); // set the max. number of threads
...
filterChain.addLast("pool", filter);

Please let us know if you need more assitatance.

HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6

Reply via email to