Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 715 invoked from network); 9 Feb 2005 07:39:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 9 Feb 2005 07:39:20 -0000 Received: (qmail 68458 invoked by uid 500); 9 Feb 2005 07:39:10 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 68387 invoked by uid 500); 9 Feb 2005 07:39:10 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 68372 invoked by uid 500); 9 Feb 2005 07:39:10 -0000 Received: (qmail 68368 invoked by uid 99); 9 Feb 2005 07:39:10 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 08 Feb 2005 23:39:09 -0800 Received: (qmail 609 invoked by uid 1526); 9 Feb 2005 07:39:08 -0000 Date: 9 Feb 2005 07:39:08 -0000 Message-ID: <20050209073908.608.qmail@minotaur.apache.org> From: mturk@apache.org To: jakarta-tomcat-connectors-cvs@apache.org Subject: cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N mturk 2005/02/08 23:39:08 Modified: jk/native/apache-2.0 mod_jk.c Log: Move jk_set_worker_def_cache_size to post config hook, so that it is set before the jk configuration is parsed. Revision Changes Path 1.122 +12 -12 jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c Index: mod_jk.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v retrieving revision 1.121 retrieving revision 1.122 diff -u -r1.121 -r1.122 --- mod_jk.c 7 Feb 2005 19:07:38 -0000 1.121 +++ mod_jk.c 9 Feb 2005 07:39:08 -0000 1.122 @@ -2225,7 +2225,6 @@ static void jk_child_init(apr_pool_t * pconf, server_rec * s) { jk_server_conf_t *conf; - int mpm_threads = 1; apr_status_t rv; int rc; @@ -2239,15 +2238,6 @@ JK_TRACE_ENTER(conf->log); - /* Set default connection cache size for worker mpm */ -#if APR_HAS_THREADS -#ifndef AS400 - ap_mpm_query(AP_MPMQ_MAX_THREADS, &mpm_threads); -#endif -#endif - if (mpm_threads > 0) - jk_set_worker_def_cache_size(mpm_threads); - if ((rc = jk_shm_attach(jk_shm_file)) == 0) { if (JK_IS_DEBUG_LEVEL(conf->log)) jk_log(conf->log, JK_LOG_DEBUG, "Attached shm:%s", @@ -2277,10 +2267,11 @@ server_rec * s) { int rc; + int mpm_threads = 1; + /* jk_map_t *init_map = NULL; */ jk_map_t *init_map = conf->worker_properties; - ; if ((rc = jk_shm_open(jk_shm_file)) == 0) { if (JK_IS_DEBUG_LEVEL(conf->log)) jk_log(conf->log, JK_LOG_DEBUG, "Initialized shm:%s", @@ -2292,6 +2283,15 @@ jk_log(conf->log, JK_LOG_ERROR, "Initializing shm:%s errno=%d", jk_shm_name(), rc); + /* Set default connection cache size for worker mpm */ +#if APR_HAS_THREADS +#ifndef AS400 + if (ap_mpm_query(AP_MPMQ_MAX_THREADS, &mpm_threads) != APR_SUCCESS) + mpm_threads = 1; +#endif +#endif + jk_set_worker_def_cache_size(mpm_threads); + if (!uri_worker_map_alloc(&(conf->uw_map), conf->uri_to_context, conf->log)) { --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org