DO NOT REPLY [Bug 39681] New: - Redeploy with Tomcat 5.0.30
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=39681. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=39681 Summary: Redeploy with Tomcat 5.0.30 Product: Tomcat 5 Version: 5.0.30 Platform: Other OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Unknown AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] I use Tomcat 5.0.30 under Windows XP. It isn't possible to undeploy an application. I must stop the server and have to remove all jar-files and than I have to restart the. Only than the application is really undeploy. Is there a workaround for Tomcat 5.0.30? I know, for Tomcat 5.5.x I can set the flags antiJARLocking=true and antiResourceLocking=true. Regards -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Connector site
Hi, I am talking about this page: http://tomcat.apache.org/connectors-doc/howto/apache.html (second hit in Google when you search for mod_jk) 1. It says There is actually two version of Apache, 1.3 and 2.0. That's outdated information: http://httpd.apache.org/download.cgi There are now 1.3, 2.0 and 2.2. It should be stated that there is no mod_jk that is compatible with 2.2. 2. The Obtaining mod_jk talks about how to obtain a binary. When I follow the provided links I get through a couple of pages and finally am directed back to this page. Please just provide a link to: http://tomcat.apache.org/download-connectors.cgi as on the Tomcat homepage. 3. The Tomcat Connector site features the Jakarta Logo. But Tomcat is Ex-Jakarta. This confuses your users. Kind regards Ortwin Glück PS. I am not permanently subscribed to this list. -- [web] http://www.odi.ch/ [blog] http://www.odi.ch/weblog/ [pgp] key 0x81CF3416 finger print F2B1 B21F F056 D53E 5D79 A5AF 02BE 70F5 81CF 3416 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r410234 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java
Author: remm Date: Tue May 30 02:58:41 2006 New Revision: 410234 URL: http://svn.apache.org/viewvc?rev=410234view=rev Log: - Add a brain dead executor. - Submitted by Vincenc Beltran Querol. Added: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java (with props) Added: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java?rev=410234view=auto == --- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java (added) +++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java Tue May 30 02:58:41 2006 @@ -0,0 +1,312 @@ +/* + * Copyright 1999-2006 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.tomcat.util.net; + +import java.util.concurrent.Executor; + +public class SimpleThreadPoolExecutor implements Executor { + + +private boolean running = true; + +/** + * Available workers. + */ +protected WorkerStack workers = null; + +/** + * Current worker threads busy count. + */ +protected int curThreadsBusy = 0; + + +/** + * Current worker threads count. + */ +protected int curThreads = 0; + + +/** + * Sequence number used to generate thread names. + */ +protected int sequence = 0; + + +/** + * Maximum amount of worker threads. + */ +protected int maxThreads = 40; +public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; } +public int getMaxThreads() { return maxThreads; } + +/** + * Name of the thread pool, which will be used for naming child threads. + */ +protected String name = TP; +public void setName(String name) { this.name = name; } +public String getName() { return name; } + +public int getCurrentThreadCount() { +return curThreads; +} + +public int getCurrentThreadsBusy() { +return curThreads - workers.size(); +} + +public SimpleThreadPoolExecutor(String name, int maxThreads) { +this.name = name; +this.maxThreads = maxThreads; +workers = new WorkerStack(maxThreads); +} + +public void execute(Runnable job){ +getWorkerThread().assign(job); +} + +// - Worker Inner Class + + +protected class Worker implements Runnable { + +protected Thread thread = null; +protected boolean available = false; +protected Runnable job = null; + + +/** + * Process an incoming TCP/IP connection on the specified socket. Any + * exception that occurs during processing must be logged and swallowed. + * bNOTE/b: This method is called from our Connector's thread. We + * must assign it to our own thread so that multiple simultaneous + * requests can be handled. + * + * @param socket TCP socket to process + */ +synchronized void assign(Runnable job) { + +// Wait for the Processor to get the previous Socket +while (available) { +try { +wait(); +} catch (InterruptedException e) { +} +} + +// Store the newly available Socket and notify our thread +this.job = job; +available = true; +notifyAll(); + +} + + +/** + * Await a newly assigned Socket from our Connector, or codenull/code + * if we are supposed to shut down. + */ +private synchronized Runnable await() { + +// Wait for the Connector to provide a new Socket +while (!available) { +try { +wait(); +} catch (InterruptedException e) { +} +} + +// Notify the Connector that we have received this Socket +Runnable job = this.job; +available = false; +notifyAll(); + +return (job); + +} + +public void shutdown(){ +running = false; +} + +/** + * The background thread that listens for incoming
svn commit: r410238 - in /tomcat/connectors/trunk/jk/xdocs: project.xml style.xsl
Author: jfclere Date: Tue May 30 03:59:35 2006 New Revision: 410238 URL: http://svn.apache.org/viewvc?rev=410238view=rev Log: Arrange definitions so that connectors refers Apache Tomcat instead of Jakarta Tomcat. Modified: tomcat/connectors/trunk/jk/xdocs/project.xml tomcat/connectors/trunk/jk/xdocs/style.xsl Modified: tomcat/connectors/trunk/jk/xdocs/project.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/project.xml?rev=410238r1=410237r2=410238view=diff == --- tomcat/connectors/trunk/jk/xdocs/project.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/project.xml Tue May 30 03:59:35 2006 @@ -1,11 +1,11 @@ ?xml version=1.0 encoding=ISO-8859-1? -project name=Apache Jakarta Tomcat Connector Documentation - Top Level Directory -href=http://jakarta.apache.org/tomcat/; +project name=Apache Tomcat Connector Documentation - Top Level Directory +href=http://tomcat.apache.org/; -titleThe Apache Jakarta Tomcat Connector/title +titleThe Apache Tomcat Connector/title logo href=/images/tomcat.gif - The Apache Jakarta Tomcat Connector + The Apache Tomcat Connector /logo body Modified: tomcat/connectors/trunk/jk/xdocs/style.xsl URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/style.xsl?rev=410238r1=410237r2=410238view=diff == --- tomcat/connectors/trunk/jk/xdocs/style.xsl (original) +++ tomcat/connectors/trunk/jk/xdocs/style.xsl Tue May 30 03:59:35 2006 @@ -14,9 +14,9 @@ !-- Defined parameters (overrideable) -- - xsl:paramname=home-nameselect='The Jakarta Project'/ - xsl:paramname=home-hrefselect='http://jakarta.apache.org/'/ - xsl:paramname=home-logoselect='/images/jakarta-logo.gif'/ + xsl:paramname=home-nameselect='Apache Tomcat'/ + xsl:paramname=home-hrefselect='http://tomcat.apache.org/'/ + xsl:paramname=home-logoselect='/images/tomcat.gif'/ xsl:paramname=printer-logo select='/images/printer.gif'/ xsl:paramname=relative-pathselect='.'/ xsl:paramname=void-image select='/images/void.gif'/ @@ -87,10 +87,12 @@ xsl:value-of select=$relative-path/xsl:value-of select=project/logo/@href/ /xsl:variable - xsl:commentPROJECT LOGO/xsl:comment - a href={$home} -img src={$src} align=right alt={$alt} border=0/ + xsl:commentAPACHE LOGO/xsl:comment + a href=http://www.apache.org/; +img src=http://www.apache.org/images/asf-logo.gif; + align=right alt=Apache Logo border=0/ /a + /xsl:if /td/tr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r410260 - /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ByteMessage.java
Author: fhanik Date: Tue May 30 05:34:03 2006 New Revision: 410260 URL: http://svn.apache.org/viewvc?rev=410260view=rev Log: Avoid NPE Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ByteMessage.java Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ByteMessage.java URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ByteMessage.java?rev=410260r1=410259r2=410260view=diff == --- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ByteMessage.java (original) +++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ByteMessage.java Tue May 30 05:34:03 2006 @@ -1,12 +1,12 @@ /* * Copyright 1999,2004-2005 The Apache Software Foundation. - * + * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,8 +25,8 @@ * A byte message is not serialized and deserialized by the channel * instead it is sent as a byte arraybr * By default Tribes uses java serialization when it receives an object - * to be sent over the wire. Java serialization is not the most - * efficient of serializing data, and Tribes might not even + * to be sent over the wire. Java serialization is not the most + * efficient of serializing data, and Tribes might not even * have access to the correct class loaders to deserialize the object properly. * br * The ByteMessage class is a class where the channel when it receives it will @@ -44,15 +44,15 @@ * Storage for the message to be sent */ private byte[] message; - - + + /** * Creates an empty byte message * Constructor also for deserialization */ public ByteMessage() { } - + /** * Creates a byte message wit h * @param data byte[] - the message contents @@ -60,7 +60,7 @@ public ByteMessage(byte[] data) { message = data; } - + /** * Returns the message contents of this byte message * @return byte[] - message contents, can be null @@ -68,7 +68,7 @@ public byte[] getMessage() { return message; } - + /** * Sets the message contents of this byte message * @param message byte[] @@ -76,7 +76,7 @@ public void setMessage(byte[] message) { this.message = message; } - + /** * @see java.io.Externalizable#readExternal * @param in ObjectInput @@ -87,7 +87,7 @@ message = new byte[length]; in.read(message,0,length); } - + /** * @see java.io.Externalizable#writeExternal * @param out ObjectOutput @@ -95,7 +95,7 @@ */ public void writeExternal(ObjectOutput out) throws IOException { out.writeInt(message!=null?message.length:0); -out.write(message,0,message.length); +if ( message!=null ) out.write(message,0,message.length); } -} \ No newline at end of file +} - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r410298 - /tomcat/connectors/trunk/jk/xdocs/faq.xml
Author: jfclere Date: Tue May 30 08:03:00 2006 New Revision: 410298 URL: http://svn.apache.org/viewvc?rev=410298view=rev Log: Remove the jakarta references. Modified: tomcat/connectors/trunk/jk/xdocs/faq.xml Modified: tomcat/connectors/trunk/jk/xdocs/faq.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/faq.xml?rev=410298r1=410297r2=410298view=diff == --- tomcat/connectors/trunk/jk/xdocs/faq.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/faq.xml Tue May 30 08:03:00 2006 @@ -34,12 +34,12 @@ p The primary mechanism for support is through the JK documentation included in the doc directory. -Documentation is also available on the Apache Jakarta web site devoted to the -a href=http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html; -Jakarta Tomcat Connectors Project/a +Documentation is also available on the Apache Tomcat web site devoted to the +a href=http://tomcat.apache.org/connectors-doc/; +Apache Tomcat Connectors Project/a For additional help, the best resource is the Tomcat Users Discussion list. You should start by searching -a href=http://mail-archives.apache.org/mod_mbox/jakarta-tomcat-user/; +a href=http://mail-archives.apache.org/mod_mbox/tomcat-users/; the mail list archive/a before you post questions to the list. If you are unable to locate the answer to your question in the archive, @@ -55,13 +55,10 @@ subsection name=I can't find JK anywhere. Where is it? p -Now that JK moved to the bjakarta-tomcat-connectors/b repository, -the source for JK can be downloaded from a mirror at the -a href=http://jakarta.apache.org/site/sourceindex.cgi; -Jakarta Source Download/a page and the binaries for JK can -be downloaded from a mirror at the -a href=http://jakarta.apache.org/site/binindex.cgi; -Jakarta Binary Download/a page. +Now that JK moved to the btomcat-connectors/b repository, +the source and the binaries for JK can be downloaded from a mirror at the +a href=http://tomcat.apache.org/download-connectors.cgi; +Tomcat Connectors (mod_jk, mod_jk2) Downloads/a page. /p /subsection - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r410304 - /tomcat/connectors/trunk/jk/xdocs/index.xml
Author: jfclere Date: Tue May 30 08:34:10 2006 New Revision: 410304 URL: http://svn.apache.org/viewvc?rev=410304view=rev Log: Arrange the jakarta that was forgotten there. Modified: tomcat/connectors/trunk/jk/xdocs/index.xml Modified: tomcat/connectors/trunk/jk/xdocs/index.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/index.xml?rev=410304r1=410303r2=410304view=diff == --- tomcat/connectors/trunk/jk/xdocs/index.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/index.xml Tue May 30 08:34:10 2006 @@ -16,7 +16,7 @@ section name=Introduction pThis is the top-level entry point of the documentation bundle for the -strongApache Jakarta Tomcat Connectors/strong +strongApache Tomcat Connectors/strong /p pSelect one of the links from the navigation menu (to the left) to drill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: svn commit: r410234 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java
Remy Maucherat wrote: [EMAIL PROTECTED] wrote: Author: remm Date: Tue May 30 02:58:41 2006 New Revision: 410234 URL: http://svn.apache.org/viewvc?rev=410234view=rev Log: - Add a brain dead executor. - Submitted by Vincenc Beltran Querol. I updated my code to use executors exclusively, but it's certain that there's a problem with that, since the server can no longer access the thread usage statistics, and it's then giving up on self tuning. So I'm not sure I'll update to use executors for now. Rémy Hi Remy, If you are refering to this snippet of code when you say self tuning: int threadRatio = (endpoint.getCurrentThreadsBusy() * 100) / endpoint.getMaxThreads(); if ((threadRatio 33) (threadRatio = 66)) { soTimeout = soTimeout / 2; } else if ((threadRatio 66) (threadRatio = 90)) { soTimeout = soTimeout / 3; keepAliveLeft = 1; } else if (threadRatio 90) { soTimeout = soTimeout / 20; keepAliveLeft = 1; } maybe we can put this functionality inside the Executor implementation (inside beforExecute(...) of ThreadPoolExecutor or assign(...) of SimpleThreadPoolExecutor). We can have access to SocketProcessor socket from the thread pool implementation, and also put KeepAliveLeft inside SocketProcessor. Regards, - Vicenç - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 39684] New: - Test
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=39684. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=39684 Summary: Test Product: Tomcat 6 Version: unspecified Platform: Other OS/Version: other Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r410319 - /tomcat/connectors/trunk/jk/xdocs/howto/apache.xml
Author: jfclere Date: Tue May 30 10:00:16 2006 New Revision: 410319 URL: http://svn.apache.org/viewvc?rev=410319view=rev Log: Arrange the different small updated things. Modified: tomcat/connectors/trunk/jk/xdocs/howto/apache.xml Modified: tomcat/connectors/trunk/jk/xdocs/howto/apache.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/howto/apache.xml?rev=410319r1=410318r2=410319view=diff == --- tomcat/connectors/trunk/jk/xdocs/howto/apache.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/howto/apache.xml Tue May 30 10:00:16 2006 @@ -30,8 +30,8 @@ section name=Introduction p This document explains how to connect Tomcat to the popular open source web server, Apache. -There is actually two version of Apache, 1.3 and 2.0 and both can be used with mod_jk, the Tomcat redirector -module. +There is actually three versions of Apache, 1.3, 2.0 and 2.2 and all can be used with mod_jk, +the Tomcat redirector module. /p p @@ -166,12 +166,12 @@ It is recommended to use the binary version if one is available. If the binary is not available, follow the instructions for building mod_jk from source. The mod_jk source can be downloaded from a mirror -a href=http://jakarta.apache.org/site/sourceindex.cgi; +a href=http://tomcat.apache.org/download-connectors.cgi; here/a /p p -The binaries for mod_jk are now available, for several platforms, in a separate area as the Tomcat Binary Release. +The binaries for mod_jk are now available for several platforms. The binaries are located in subdirectories by platform. /p @@ -186,8 +186,8 @@ p For example JK 1.2.5 can be downloaded from a mirror -a href=http://jakarta.apache.org/site/binindex.cgi; -here/a and contains binary version for a variety of +a href=http://tomcat.apache.org/download-connectors.cgi; +here/a (look for JK 1.2 Binary Releases). The JK 1.2 Binary Releases link contains binary version for a variety of operating systems for both Apache 1.3 and Apache 2. /p @@ -232,14 +232,15 @@ subsection name=Using Tomcat auto-configure p +The auto-configure works only for a single Tomcat running on the same machine where Apache (httpd) is running. The simplest way to configure Apache to use mod_jk is to turn on the Apache auto-configure setting in Tomcat and put the following include directive at the end of your Apache httpd.conf file -(make sure you replace TOMCAT_HOME with the correct path for your Tomcat installation: +(make sure you replace $TOMCAT_HOME with the correct path for your Tomcat installation: /p source #To be added at the end of your httpd.conf -Include /var/tomcat3/conf/jk/mod_jk.conf-auto +Include $TOMCAT_HOME/conf/jk/mod_jk.conf-auto /source p @@ -259,7 +260,7 @@ p Then restart Tomcat and mod_jk.conf should be generated. For more information on this topic, please refer to the API documentation at the -a href=http://jakarta.apache.org/tomcat/tomcat-5.5-doc/catalina/docs/api/org/apache/jk/config/ApacheConfig.html; +a href=http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/jk/config/ApacheConfig.html; Tomcat docs website/a. /p @@ -667,7 +668,7 @@ In case you get source from CVS, ie without an existing configure script, you should have autoconf for configuration and installation. p -To create jakarta-tomcat-connectors's autoconf script, you will need libtool 1.3.3 or higher, +To create tomcat-connectors's autoconf script, you will need libtool 1.3.3 or higher, and autoconf 2.13 or newer. /pp Those tools will not be required if you are just using a package downloaded from apache.org, @@ -685,7 +686,7 @@ subsection name=Using configure to build mod_jk pHere's how to use configure to prepare mod_jk for building, just type: source -./configure [autoconf arguments] [jakarta-tomcat-connectors arguments] +./configure [autoconf arguments] [tomcat-connectors arguments] /source /p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: svn commit: r410234 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java
Few questions: - why is this needed ( i.e. what problem with the ThreadPoolExecutor is it solving ) ? - who is cleaning worker threads ( after a peak ) ? - it would be good to have some comments on the stack - what happens on push() if end == workers.length for example, or why this won't happen - try/catch may be good in worker.run, or you may miss recycle and cleanup - why not just add executor interface to the existing ( and relatively well tested ) thread pool ?? - hooks in TPExecutor are nice and may be useful... I think it would be ok to add this to sandbox for example, but not very sure about adding it to the main tree. Doesn't look very solid Costin On 5/30/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Author: remm Date: Tue May 30 02:58:41 2006 New Revision: 410234 URL: http://svn.apache.org/viewvc?rev=410234view=rev Log: - Add a brain dead executor. - Submitted by Vincenc Beltran Querol. Added: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java (with props) Added: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java?rev=410234view=auto == --- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java (added) +++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java Tue May 30 02:58:41 2006 @@ -0,0 +1,312 @@ +/* + * Copyright 1999-2006 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.tomcat.util.net; + +import java.util.concurrent.Executor; + +public class SimpleThreadPoolExecutor implements Executor { + + +private boolean running = true; + +/** + * Available workers. + */ +protected WorkerStack workers = null; + +/** + * Current worker threads busy count. + */ +protected int curThreadsBusy = 0; + + +/** + * Current worker threads count. + */ +protected int curThreads = 0; + + +/** + * Sequence number used to generate thread names. + */ +protected int sequence = 0; + + +/** + * Maximum amount of worker threads. + */ +protected int maxThreads = 40; +public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; } +public int getMaxThreads() { return maxThreads; } + +/** + * Name of the thread pool, which will be used for naming child threads. + */ +protected String name = TP; +public void setName(String name) { this.name = name; } +public String getName() { return name; } + +public int getCurrentThreadCount() { +return curThreads; +} + +public int getCurrentThreadsBusy() { +return curThreads - workers.size(); +} + +public SimpleThreadPoolExecutor(String name, int maxThreads) { +this.name = name; +this.maxThreads = maxThreads; +workers = new WorkerStack(maxThreads); +} + +public void execute(Runnable job){ +getWorkerThread().assign(job); +} + +// - Worker Inner Class + + +protected class Worker implements Runnable { + +protected Thread thread = null; +protected boolean available = false; +protected Runnable job = null; + + +/** + * Process an incoming TCP/IP connection on the specified socket. Any + * exception that occurs during processing must be logged and swallowed. + * bNOTE/b: This method is called from our Connector's thread. We + * must assign it to our own thread so that multiple simultaneous + * requests can be handled. + * + * @param socket TCP socket to process + */ +synchronized void assign(Runnable job) { + +// Wait for the Processor to get the previous Socket +while (available) { +try { +wait(); +} catch (InterruptedException e) { +} +} + +// Store the newly available Socket and notify our thread +this.job = job; +available = true; +notifyAll(); + +} + + +/** + * Await a newly assigned Socket from our Connector, or codenull/code + * if
Re: Tomcat Connector site
Ortwin Glück wrote: Hi, I am talking about this page: http://tomcat.apache.org/connectors-doc/howto/apache.html (second hit in Google when you search for mod_jk) 1. It says There is actually two version of Apache, 1.3 and 2.0. That's outdated information: http://httpd.apache.org/download.cgi There are now 1.3, 2.0 and 2.2. It should be stated that there is no mod_jk that is compatible with 2.2. 2. The Obtaining mod_jk talks about how to obtain a binary. When I follow the provided links I get through a couple of pages and finally am directed back to this page. Please just provide a link to: http://tomcat.apache.org/download-connectors.cgi as on the Tomcat homepage. 3. The Tomcat Connector site features the Jakarta Logo. But Tomcat is Ex-Jakarta. This confuses your users. I have corrected the xml files, please check them. If all OK I will update the site tomorrow. Cheers Jean-Frederic Kind regards Ortwin Glück PS. I am not permanently subscribed to this list. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: svn commit: r410234 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java
Hi Costin, this commit is related to http://www.mail-archive.com/dev@tomcat.apache.org/msg05414.html Costin Manolache wrote: Few questions: - why is this needed ( i.e. what problem with the ThreadPoolExecutor is it solving ) ? It's only a clean up of existing code. - who is cleaning worker threads ( after a peak ) ? - it would be good to have some comments on the stack - what happens on push() if end == workers.length for example, or why this won't happen - try/catch may be good in worker.run, or you may miss recycle and cleanup - why not just add executor interface to the existing ( and relatively well tested ) thread pool ?? +1. The idea is to have multiple implementations of the Executor interface - Vicenç - hooks in TPExecutor are nice and may be useful... I think it would be ok to add this to sandbox for example, but not very sure about adding it to the main tree. Doesn't look very solid Costin On 5/30/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Author: remm Date: Tue May 30 02:58:41 2006 New Revision: 410234 URL: http://svn.apache.org/viewvc?rev=410234view=rev Log: - Add a brain dead executor. - Submitted by Vincenc Beltran Querol. Added: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java (with props) Added: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java?rev=410234view=auto == --- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java (added) +++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java Tue May 30 02:58:41 2006 @@ -0,0 +1,312 @@ +/* + * Copyright 1999-2006 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.tomcat.util.net; + +import java.util.concurrent.Executor; + +public class SimpleThreadPoolExecutor implements Executor { + + +private boolean running = true; + +/** + * Available workers. + */ +protected WorkerStack workers = null; + +/** + * Current worker threads busy count. + */ +protected int curThreadsBusy = 0; + + +/** + * Current worker threads count. + */ +protected int curThreads = 0; + + +/** + * Sequence number used to generate thread names. + */ +protected int sequence = 0; + + +/** + * Maximum amount of worker threads. + */ +protected int maxThreads = 40; +public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; } +public int getMaxThreads() { return maxThreads; } + +/** + * Name of the thread pool, which will be used for naming child threads. + */ +protected String name = TP; +public void setName(String name) { this.name = name; } +public String getName() { return name; } + +public int getCurrentThreadCount() { +return curThreads; +} + +public int getCurrentThreadsBusy() { +return curThreads - workers.size(); +} + +public SimpleThreadPoolExecutor(String name, int maxThreads) { +this.name = name; +this.maxThreads = maxThreads; +workers = new WorkerStack(maxThreads); +} + +public void execute(Runnable job){ +getWorkerThread().assign(job); +} + +// - Worker Inner Class + + +protected class Worker implements Runnable { + +protected Thread thread = null; +protected boolean available = false; +protected Runnable job = null; + + +/** + * Process an incoming TCP/IP connection on the specified socket. Any + * exception that occurs during processing must be logged and swallowed. + * bNOTE/b: This method is called from our Connector's thread. We + * must assign it to our own thread so that multiple simultaneous + * requests can be handled. + * + * @param socket TCP socket to process + */ +synchronized void assign(Runnable job) { + +// Wait for the Processor to get the previous Socket +while (available) { +try { +wait(); +} catch (InterruptedException e) { +}
Re: svn commit: r410234 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SimpleThreadPoolExecutor.java
Costin Manolache wrote: Few questions: - why is this needed ( i.e. what problem with the ThreadPoolExecutor is it solving ) ? - who is cleaning worker threads ( after a peak ) ? - it would be good to have some comments on the stack - what happens on push() if end == workers.length for example, or why this won't happen - try/catch may be good in worker.run, or you may miss recycle and cleanup - why not just add executor interface to the existing ( and relatively well tested ) thread pool ?? - hooks in TPExecutor are nice and may be useful... I think it would be ok to add this to sandbox for example, but not very sure about adding it to the main tree. Doesn't look very solid After experimenting, I think it's useless. I will use the executor interface for full featured global thread pools. For simpler thread pools, the API does not make sense. Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Binary build procedures
On 5/25/06, Mark Claassen [EMAIL PROTECTED] wrote: I have a question about two optional packages: mx4j and junit. Are they really optional? I realize that some build processes may use junit to test the build, but does it need to in the distribution? Looking at the latest binary, junit doesn't get shipped. Also, what is mx4j used for. If I don't it, can I not use JMX? connectors/jk/java/org/apache/jk/common/JkMX.java is the only class using mx4j. Check its javadoc out to decide if you want to be distributing mx4j in your Tomcat build. Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r410413 - /tomcat/jasper/branches/tc4.1.x/
Author: markt Date: Tue May 30 18:10:50 2006 New Revision: 410413 URL: http://svn.apache.org/viewvc?rev=410413view=rev Log: Update ignore list Modified: tomcat/jasper/branches/tc4.1.x/ (props changed) Propchange: tomcat/jasper/branches/tc4.1.x/ -- --- svn:ignore (added) +++ svn:ignore Tue May 30 18:10:50 2006 @@ -0,0 +1,3 @@ +build +dist +bin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat DBCP modification
-Original Message- From: Henri Yandell [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 30, 2006 4:40 PM To: Tomcat Developers List Subject: Tomcat DBCP modification Just noticed while digging into the Tomcat build that Tomcat pulls the source to dbcp/collections/pool and repackages it under org.apache.tomcat.dbcp after making a source change. I was wondering if this is just done to remove the UnmodifiableList bit, or is it done for size or classloading issues? It's primarily for size. Of course, it needs to be repackaged in order to also allow the user to use the real Commons jars in her webapp. Anything that could be done in Commons to make things easier? Thanks, Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message is intended only for the use of the person(s) listed above as the intended recipient(s), and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not an intended recipient, you may not read, copy, or distribute this message or any attachment. If you received this communication in error, please notify us immediately by e-mail and then delete all copies of this message and any attachments. In addition you should be aware that ordinary (unencrypted) e-mail sent through the Internet is not secure. Do not send confidential or sensitive information, such as social security numbers, account numbers, personal identification numbers and passwords, to us via ordinary (unencrypted) e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]