On Nov 7, 2006, at 3:43 AM, Frederic Soulier wrote:
Example:
  Executor executor1 = Executors.newFixedThreadPool(10);
  SocketAcceptor acceptor = new SocketAcceptor(2, executor1);
will setup 2 SocketIoProcessors sharing a thread pool of 10 threads.
If you have more than 10 clients connecting and sending/receiving at the
same time you may have pbms hence why depending on the intent of your
app it may be better to use:

actually, not exactly..

the Executor parameter to the SocketAcceptor merely provides a source for threads. The above example will only use 3 threads from the pool. 1 for accepting, and 2 for the processing of existing connection. (The constructor that takes an Executor was added for people that are integrating MINA into larger systems that want to centralize thread creation for the entire application)

I think you may be thinking of the ExecutorFilter, which does bring the performance implications you mention.

-pete


--
[EMAIL PROTECTED] - http://fotap.org/~osi



Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to