You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Mladen Turk <mt...@apache.org> on 2003/12/03 18:43:27 UTC
RE: [JK2 Enhancement] modify behavior when max_endpoints have been reached
> From: Scott, Sean
>
> I have locally modified the head revision of the jk2 project
> and would like some feedback before submitting the
> enhancements for review.
>
> The change in behavior that we desired was that rather than
> returning an error when the max_connections for the endpoint
> cache were reached, the worker would wait for an endpoint to
> be returned to the cache.
>
> To implement this functionality I modified the
> jk_mutex_thread.c module to include a wait and a notify
> method (using the apr_thread_cond routines). I then modified
> the ajp13 worker to wait (forever) when the max_endpoints are
> reached. I also modified the "jk2_worker_ajp13_done" method
> to "notify" when an endpoint was returned to the cache.
>
-1 on mutex/wait approach.
Using that we would reinvent the wheel.
There is an excellent API in the APR-UTILS that will allow us to do
a non-blocking approach.
Take a look at apr_reslist API.
Since we agreed to use the apr _and_ apr_util as mandatory, take a
look at those. The reslist is meant to be used for such purposes.
MT.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org