james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: Long-standing ServerConnection bug
Date Sat, 04 Nov 2006 18:55:45 GMT
Stefano Bagnara wrote:

> Noel J. Bergman wrote:
>>> check the limit in addClientConnectionRunner to stop the thread if
>>> the limit has been reached and to restart the listening thread in
>>> removeClientConnectionRunner if we are stopped?
>> No, I'd prefer to avoid a change of that nature.
> Can you explain

It depends upon what you mean.  If you mean stop and restart, then what I
did in the current code does what you want.  We "stop the thread" by calling
wait(), and the client "restarts the listening thread in
removeClientConnectionRunner" by calling notify().  If you mean terminate
and recreate, then ...

Architecturally, JAMES has a single thread per ServerConnection (listening
service) that accepts messages and doles them out to worker threads from the
pool.  Changing that so that the listener thread terminates, and is
re-created whenever there is room in the pool would be a signficant change
to the way the system works.  It introduces overhead, seems entirely
unnecessary, and doesn't introduce any simplicity to the architecture.

	--- Noel



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message