svn commit: r807112 - /tomcat/trunk/test/org/apache/catalina/startup/TestTomcatBase.java

2009-08-24 Thread markt
Author: markt
Date: Mon Aug 24 08:20:12 2009
New Revision: 807112

URL: http://svn.apache.org/viewvc?rev=807112&view=rev
Log:
Add a simple Hello World Servlet that can be used for testing.

Modified:
tomcat/trunk/test/org/apache/catalina/startup/TestTomcatBase.java

Modified: tomcat/trunk/test/org/apache/catalina/startup/TestTomcatBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TestTomcatBase.java?rev=807112&r1=807111&r2=807112&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/startup/TestTomcatBase.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/TestTomcatBase.java Mon Aug 
24 08:20:12 2009
@@ -17,6 +17,13 @@
 package org.apache.catalina.startup;
 
 import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 import junit.framework.TestCase;
 
@@ -62,4 +69,18 @@
 ExpandWar.delete(tempDir);
 }
 
+/**
+ * Simple Hello World servlet for use by test cases
+ */
+public static final class HelloWorldServlet extends HttpServlet {
+
+private static final long serialVersionUID = 1L;
+
+@Override
+protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+throws ServletException, IOException {
+PrintWriter out = resp.getWriter();
+out.print("Hello World");
+}
+}
 }



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



svn commit: r807113 - in /tomcat/trunk/test/org/apache/catalina: connector/TestRequest.java core/ core/TestStandardContext.java startup/SimpleHttpClient.java

2009-08-24 Thread markt
Author: markt
Date: Mon Aug 24 08:22:21 2009
New Revision: 807113

URL: http://svn.apache.org/viewvc?rev=807113&view=rev
Log:
Extract the SimpleHttpClient in to a separate class and move it to a more 
logical package since it will be reused.
Don't override method unnecessarily.

Added:
tomcat/trunk/test/org/apache/catalina/core/
tomcat/trunk/test/org/apache/catalina/core/TestStandardContext.java
tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java
Modified:
tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java

Modified: tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java?rev=807113&r1=807112&r2=807113&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java (original)
+++ tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java Mon Aug 24 
08:22:21 2009
@@ -17,20 +17,9 @@
 
 package org.apache.catalina.connector;
 
-import java.io.BufferedReader;
 import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
-import java.io.Reader;
-import java.io.Writer;
-import java.net.Socket;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
 import java.util.Enumeration;
-import java.util.List;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
@@ -38,6 +27,7 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.catalina.core.StandardContext;
+import org.apache.catalina.startup.SimpleHttpClient;
 import org.apache.catalina.startup.TestTomcatBase;
 import org.apache.catalina.startup.Tomcat;
 
@@ -45,15 +35,6 @@
  * Test case for {...@link Request}. 
  */
 public class TestRequest extends TestTomcatBase {
-@Override
-public void setUp() throws Exception {
-super.setUp();
-}
-
-@Override
-public void tearDown() throws Exception {
-super.tearDown();
-}
 
 /**
  * Test case for https://issues.apache.org/bugzilla/show_bug.cgi?id=37794
@@ -210,131 +191,4 @@
 }
 
 }
-
-/**
- * Simple client for unit testing. It isn't robust, it isn't secure and
- * should not be used as the basis for production code. Its only purpose
- * is to do the bare minimum for the unit tests. 
- */
-private abstract static class SimpleHttpClient {
-public static final String TEMP_DIR =
-System.getProperty("java.io.tmpdir");
-
-public static final String CRLF = "\r\n";
-
-public static final String OK_200 = "HTTP/1.1 200";
-public static final String FAIL_500 = "HTTP/1.1 500";
-
-private Socket socket;
-private Writer writer;
-private BufferedReader reader;
-private int port = 8080;
-
-private String[] request;
-private int requestPause = 1000;
-
-private String responseLine;
-private List responseHeaders = new ArrayList();
-private String responseBody;
-
-public void setPort(int thePort) {
-port = thePort;
-}
-
-public void setRequest(String[] theRequest) {
-request = theRequest;
-}
-
-public void setRequestPause(int theRequestPause) {
-requestPause = theRequestPause;
-}
-
-public String getResponseLine() {
-return responseLine;
-}
-
-public List getResponseHeaders() {
-return responseHeaders;
-}
-
-public String getResponseBody() {
-return responseBody;
-}
-
-public void connect() throws UnknownHostException, IOException {
-socket = new Socket("localhost", port);
-OutputStream os = socket.getOutputStream();
-writer = new OutputStreamWriter(os);
-InputStream is = socket.getInputStream();
-Reader r = new InputStreamReader(is);
-reader = new BufferedReader(r);
-}
-
-public void processRequest() throws IOException, InterruptedException {
-// Send the request
-boolean first = true;
-for (String requestPart : request) {
-if (first) {
-first = false;
-} else {
-Thread.sleep(requestPause);
-}
-writer.write(requestPart);
-writer.flush();
-}
-
-// Read the response
-responseLine = readLine();
-
-// Put the headers into the map
-String line = readLine();
-while (line.length() > 0) {
-responseHeaders.add(line);
-line = readLine();
-  

svn propchange: r807113 - svn:log

2009-08-24 Thread markt
Author: markt
Revision: 807113
Modified property: svn:log

Modified: svn:log at Mon Aug 24 08:26:27 2009
--
--- svn:log (original)
+++ svn:log Mon Aug 24 08:26:27 2009
@@ -1,2 +1,3 @@
 Extract the SimpleHttpClient in to a separate class and move it to a more 
logical package since it will be reused.
 Don't override method unnecessarily.
+Add test case for bug 46243


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



DO NOT REPLY [Bug 38546] Google bot sends invalid If-Modifed-Since Header, Tomcat throws exception

2009-08-24 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=38546


Stefan Bodewig  changed:

   What|Removed |Added

 CC||christer.hol...@corustechno
   ||logies.com


--- Comment #5 from Stefan Bodewig  2009-08-24 06:29:47 PDT 
---
*** Bug 19921 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 47714] Reponse mixed between users

2009-08-24 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47714


sameem.ah...@investec.co.za changed:

   What|Removed |Added

   Priority|P2  |P1


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



Re: Changelog for 5.5.28?

2009-08-24 Thread Ian Soboroff
Not so hard to read.  It would be nice if it were on the website.

46597: Port all cookie handling changes from Tomcat 6.0.x.

looks like the one that got me.  Are these changes documented somewhere?

On Fri, Aug 21, 2009 at 4:58 PM, David Rees wrote:
> This is the 3rd thread on this subject now.
>
> Previous two:
> http://marc.info/?l=tomcat-dev&m=125073164103556&w=2
> http://marc.info/?l=tomcat-user&m=125051750826349&w=2
>
> Here you can download the changelog from SVN, not that easy to read, though:
>
> http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?revision=790321&content-type=text%2Fplain&pathrev=790321
>
> -Dave
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>

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



svn commit: r807284 - in /tomcat/trunk/java/org/apache/tomcat/util: net/AbstractEndpoint.java net/AprEndpoint.java net/BaseEndpoint.java net/JIoEndpoint.java net/NioEndpoint.java threads/ResizableExec

2009-08-24 Thread fhanik
Author: fhanik
Date: Mon Aug 24 15:33:48 2009
New Revision: 807284

URL: http://svn.apache.org/viewvc?rev=807284&view=rev
Log:
First round of refactoring connectors.
Remove the worker based thread pools
Enable local or injected executors
Add in a resizable executors interface to be used in future revisions
start abstracting out and using a base class. There was one, deleted, since its 
not used anywhere


Added:
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java   (with 
props)
tomcat/trunk/java/org/apache/tomcat/util/threads/ResizableExecutor.java   
(with props)
Removed:
tomcat/trunk/java/org/apache/tomcat/util/net/BaseEndpoint.java
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Added: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=807284&view=auto
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java (added)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Mon Aug 
24 15:33:48 2009
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.tomcat.util.res.StringManager;
+/**
+ * 
+ * @author fhanik
+ * @author Mladen Turk
+ * @author Remy Maucherat
+ */
+public abstract class AbstractEndpoint {
+
+// -- Constants
+protected StringManager sm = 
StringManager.getManager("org.apache.tomcat.util.net.res");
+
+/**
+ * The Request attribute key for the cipher suite.
+ */
+public static final String CIPHER_SUITE_KEY = 
"javax.servlet.request.cipher_suite";
+
+/**
+ * The Request attribute key for the key size.
+ */
+public static final String KEY_SIZE_KEY = "javax.servlet.request.key_size";
+
+/**
+ * The Request attribute key for the client certificate chain.
+ */
+public static final String CERTIFICATE_KEY = 
"javax.servlet.request.X509Certificate";
+
+/**
+ * The Request attribute key for the session id.
+ * This one is a Tomcat extension to the Servlet spec.
+ */
+public static final String SESSION_ID_KEY = 
"javax.servlet.request.ssl_session";
+
+/**
+ * The request attribute key for the session manager.
+ * This one is a Tomcat extension to the Servlet spec.
+ */
+public static final String SESSION_MGR = 
"javax.servlet.request.ssl_session_mgr";
+
+}

Propchange: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
--
svn:eol-style = native

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=807284&r1=807283&r2=807284&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Mon Aug 24 
15:33:48 2009
@@ -21,6 +21,8 @@
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.concurrent.Executor;
+import java.util.concurrent.RejectedExecutionException;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -37,6 +39,10 @@
 import org.apache.tomcat.jni.Socket;
 import org.apache.tomcat.jni.Status;
 import org.apache.tomcat.util.res.StringManager;
+import org.apache.tomcat.util.threads.ResizableExecutor;
+import org.apache.tomcat.util.threads.TaskQueue;
+import org.apache.tomcat.util.threads.TaskThreadFactory;
+import org.apache.tomcat.util.threads.ThreadPoolExecutor;
 
 /**
  * APR tailored thread pool, providing the following services:
@@ -53,7 +59,7 @@
  * @author Mladen Turk
  * @author Remy Maucherat
  */
-public class AprEndpoint {

DO NOT REPLY [Bug 47712] NoSuchFieldException when trying to use Tomcat Native library

2009-08-24 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47712



--- Comment #1 from Roy Robinson  2009-08-24 
09:17:08 PDT ---
Description: Blocks use of the native tomcat i/o library (tcnative)
Tomcat version: 5.5.28
Platforms:  PC, Windows and Linux

I found this defect independently; I'd like to confirm it and Nicolas's
analysis. It absolutely prevents using the native library. I'd also recommend
changing the very misleading (i.e., wrong) message that appears when not
operating in DEBUG level. Just moving the getField invocations ahead of the
org.apache.tomcat.jni.SSL code fixes the problem.

Here's the ed script for the path:

91,93d
83a

major = clazz.getField("TCN_MAJOR_VERSION").getInt(null);
minor = clazz.getField("TCN_MINOR_VERSION").getInt(null);
patch = clazz.getField("TCN_PATCH_VERSION").getInt(null);
.


Thanks.

Roy

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 42996] POST with nio connector results in missing variables

2009-08-24 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=42996


Filip Hanik  changed:

   What|Removed |Added

 Status|NEEDINFO|RESOLVED
 Resolution||WORKSFORME


--- Comment #42 from Filip Hanik  2009-08-24 09:22:48 PDT ---
Unable to reproduce the problem.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



svn commit: r807324 - in /tomcat/trunk/java/org/apache: coyote/http11/Http11NioProtocol.java tomcat/util/net/AbstractEndpoint.java tomcat/util/net/AprEndpoint.java tomcat/util/net/JIoEndpoint.java tom

2009-08-24 Thread fhanik
Author: fhanik
Date: Mon Aug 24 18:06:06 2009
New Revision: 807324

URL: http://svn.apache.org/viewvc?rev=807324&view=rev
Log:
Abstract out most commonly used properties

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?rev=807324&r1=807323&r2=807324&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Mon Aug 
24 18:06:06 2009
@@ -261,15 +261,6 @@
 ep.setExecutor(executor);
 }
 
-/**
- * NOOP.
- * @param useexec - Ignored
- * @deprecated Executors are always used for NIO
- */
-public void setUseExecutor(boolean useexec) {
-ep.setUseExecutor(useexec);
-}
-
 public int getMaxThreads() {
 return ep.getMaxThreads();
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=807324&r1=807323&r2=807324&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Mon Aug 
24 18:06:06 2009
@@ -16,7 +16,19 @@
  */
 package org.apache.tomcat.util.net;
 
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.util.concurrent.Executor;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.IntrospectionUtils;
 import org.apache.tomcat.util.res.StringManager;
+import org.apache.tomcat.util.threads.ResizableExecutor;
+import org.apache.tomcat.util.threads.TaskQueue;
+import org.apache.tomcat.util.threads.TaskThreadFactory;
+import org.apache.tomcat.util.threads.ThreadPoolExecutor;
 /**
  * 
  * @author fhanik
@@ -24,6 +36,7 @@
  * @author Remy Maucherat
  */
 public abstract class AbstractEndpoint {
+protected static Log log = LogFactory.getLog(AbstractEndpoint.class);
 
 // -- Constants
 protected StringManager sm = 
StringManager.getManager("org.apache.tomcat.util.net.res");
@@ -54,5 +67,310 @@
  * This one is a Tomcat extension to the Servlet spec.
  */
 public static final String SESSION_MGR = 
"javax.servlet.request.ssl_session_mgr";
+
+// - Fields
+
+
+/**
+ * Running state of the endpoint.
+ */
+protected volatile boolean running = false;
+
+
+/**
+ * Will be set to true whenever the endpoint is paused.
+ */
+protected volatile boolean paused = false;
+
+/**
+ * Track the initialization state of the endpoint.
+ */
+protected boolean initialized = false;
+
+/**
+ * Are we using an internal executor
+ */
+protected volatile boolean internalExecutor = false;
+
+/**
+ * Socket properties
+ */
+protected SocketProperties socketProperties = new SocketProperties();
+public SocketProperties getSocketProperties() {
+return socketProperties;
+}
+
+
+
+
+
+// - 
Properties
+
+/**
+ * External Executor based thread pool.
+ */
+private Executor executor = null;
+public void setExecutor(Executor executor) { 
+this.executor = executor;
+this.internalExecutor = (executor==null);
+}
+public Executor getExecutor() { return executor; }
+
+
+/**
+ * Server socket port.
+ */
+private int port;
+public int getPort() { return port; }
+public void setPort(int port ) { this.port=port; }
+
+
+/**
+ * Address for the server socket.
+ */
+private InetAddress address;
+public InetAddress getAddress() { return address; }
+public void setAddress(InetAddress address) { this.address = address; }
+
+/**
+ * Allows the server developer to specify the backlog that
+ * should be used for server sockets. By default, this value
+ * is 100.
+ */
+private int backlog = 100;
+public void setBacklog(int backlog) { if (backlog > 0) this.backlog = 
backlog; }
+public int getBacklog() { return backlog; }
+
+/**
+ * Keepalive timeout, if lesser or eq

svn commit: r807358 - /tomcat/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java

2009-08-24 Thread fhanik
Author: fhanik
Date: Mon Aug 24 19:58:23 2009
New Revision: 807358

URL: http://svn.apache.org/viewvc?rev=807358&view=rev
Log:
Add in option to resize thread pool

Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java?rev=807358&r1=807357&r2=807358&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java Mon 
Aug 24 19:58:23 2009
@@ -24,11 +24,12 @@
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.LifecycleListener;
 import org.apache.catalina.util.LifecycleSupport;
+import org.apache.tomcat.util.threads.ResizableExecutor;
 import org.apache.tomcat.util.threads.TaskQueue;
 import org.apache.tomcat.util.threads.TaskThreadFactory;
 import org.apache.tomcat.util.threads.ThreadPoolExecutor;
 
-public class StandardThreadExecutor implements Executor {
+public class StandardThreadExecutor implements Executor, ResizableExecutor {
 
 // -- Properties
 /**
@@ -77,6 +78,8 @@
 protected int maxQueueSize = Integer.MAX_VALUE;
 
 private LifecycleSupport lifecycle = new LifecycleSupport(this);
+
+private TaskQueue taskqueue = null;
 // -- Constructors
 public StandardThreadExecutor() {
 //empty constructor for the digester
@@ -87,7 +90,7 @@
 // -- Public Methods
 public void start() throws LifecycleException {
 lifecycle.fireLifecycleEvent(BEFORE_START_EVENT, null);
-TaskQueue taskqueue = new TaskQueue(maxQueueSize);
+taskqueue = new TaskQueue(maxQueueSize);
 TaskThreadFactory tf = new 
TaskThreadFactory(namePrefix,daemon,getThreadPriority());
 lifecycle.fireLifecycleEvent(START_EVENT, null);
 executor = new ThreadPoolExecutor(getMinSpareThreads(), 
getMaxThreads(), maxIdleTime, TimeUnit.MILLISECONDS,taskqueue, tf);
@@ -100,6 +103,7 @@
 lifecycle.fireLifecycleEvent(STOP_EVENT, null);
 if ( executor != null ) executor.shutdownNow();
 executor = null;
+taskqueue = null;
 lifecycle.fireLifecycleEvent(AFTER_STOP_EVENT, null);
 }
 
@@ -249,4 +253,27 @@
 public int getQueueSize() {
 return (executor != null) ? executor.getQueue().size() : -1;
 }
+
+
+
+@Override
+public boolean resizePool(int corePoolSize, int maximumPoolSize) {
+if (executor == null) {
+return false;
+} else {
+executor.setCorePoolSize(corePoolSize);
+executor.setMaximumPoolSize(maximumPoolSize);
+return true;
+}
+}
+
+
+
+@Override
+public boolean resizeQueue(int capacity) {
+return false;
+}
+
+
+
 }



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



Re: Changelog for 5.5.28?

2009-08-24 Thread David Rees
On Mon, Aug 24, 2009 at 6:57 AM, Ian Soboroff wrote:
>        46597: Port all cookie handling changes from Tomcat 6.0.x.
>
> looks like the one that got me.  Are these changes documented somewhere?

There's the bug itself.  There's a patch attached.

https://issues.apache.org/bugzilla/show_bug.cgi?id=46597

-Dave

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