tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r697366 - /tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
Date Sat, 20 Sep 2008 14:19:36 GMT
Author: mturk
Date: Sat Sep 20 07:19:35 2008
New Revision: 697366

URL: http://svn.apache.org/viewvc?rev=697366&view=rev
Log:
Do not allow --enable-prefork modules to run on threaded servers

Modified:
    tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c

Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?rev=697366&r1=697365&r2=697366&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sat Sep 20 07:19:35 2008
@@ -2887,6 +2887,30 @@
         if (ap_mpm_query(AP_MPMQ_MAX_THREADS, &mpm_threads) != APR_SUCCESS)
             mpm_threads = 1;
     }
+    if (mpm_threads > 1) {
+#if _MT_CODE
+        /* _MT_CODE  */
+        if (JK_IS_DEBUG_LEVEL(conf->log)) {
+#if !defined(WIN32) && !defined(NETWARE)
+#if USE_FLOCK_LK
+            jk_log(conf->log, JK_LOG_DEBUG,
+                   "Using flock() for locking.");
+#else
+            jk_log(conf->log, JK_LOG_DEBUG,
+                   "Using fcntl() for locking.");
+#endif /* USE_FLOCK_LK */
+#else  /* WIN32 */
+            jk_log(conf->log, JK_LOG_DEBUG,
+                   "Not using locking.");
+#endif
+        }
+#else
+        /* !_MT_CODE */
+        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
+                     "Cannot run prefork mod_jk on threaded server.");
+        return JK_FALSE;
+#endif
+    }
     if (JK_IS_DEBUG_LEVEL(conf->log))
         jk_log(conf->log, JK_LOG_DEBUG,
                "Setting default connection pool max size to %d",



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


Mime
View raw message