Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 94561 invoked from network); 15 Jun 2003 08:17:46 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 15 Jun 2003 08:17:46 -0000 Received: (qmail 23075 invoked by uid 97); 15 Jun 2003 08:20:14 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@nagoya.betaversion.org Received: (qmail 23068 invoked from network); 15 Jun 2003 08:20:14 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 15 Jun 2003 08:20:14 -0000 Received: (qmail 93740 invoked by uid 500); 15 Jun 2003 08:17:38 -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 93727 invoked by uid 500); 15 Jun 2003 08:17:38 -0000 Received: (qmail 93724 invoked from network); 15 Jun 2003 08:17:38 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 15 Jun 2003 08:17:38 -0000 Received: (qmail 71485 invoked by uid 1135); 15 Jun 2003 08:17:37 -0000 Date: 15 Jun 2003 08:17:37 -0000 Message-ID: <20030615081737.71484.qmail@icarus.apache.org> From: remm@apache.org To: jakarta-tomcat-catalina-cvs@apache.org Subject: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets DefaultServlet.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N remm 2003/06/15 01:17:37 Modified: catalina/src/share/org/apache/catalina/servlets DefaultServlet.java Log: - Using a thread local doesn't seem worthwhile, as corectness requires the resource info be recycled at the end of processing (otherwise, the context cannot be garbage collected when undeploying). Revision Changes Path 1.11 +6 -27 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java Index: DefaultServlet.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- DefaultServlet.java 1 May 2003 11:29:16 -0000 1.10 +++ DefaultServlet.java 15 Jun 2003 08:17:37 -0000 1.11 @@ -193,12 +193,6 @@ protected static URLEncoder urlEncoder; - /** - * Thread local resource info. - */ - protected ThreadLocal localResourceInfo = new ThreadLocal(); - - // ----------------------------------------------------- Static Initializer @@ -247,9 +241,6 @@ * Finalize this servlet. */ public void destroy() { - - ; // No actions necessary - } @@ -590,13 +581,7 @@ // Input stream for temp. content file used to support partial PUT FileInputStream contentFileInStream = null; - ResourceInfo resourceInfo = (ResourceInfo) localResourceInfo.get(); - if (resourceInfo == null) { - resourceInfo = new ResourceInfo(path, resources); - localResourceInfo.set(resourceInfo); - } else { - resourceInfo.set(path, resources); - } + ResourceInfo resourceInfo = new ResourceInfo(path, resources); Range range = parseContentRange(req, resp); InputStream resourceInputStream = null; @@ -920,13 +905,7 @@ // Retrieve the Catalina context and Resources implementation DirContext resources = getResources(); - ResourceInfo resourceInfo = (ResourceInfo) localResourceInfo.get(); - if (resourceInfo == null) { - resourceInfo = new ResourceInfo(path, resources); - localResourceInfo.set(resourceInfo); - } else { - resourceInfo.set(path, resources); - } + ResourceInfo resourceInfo = new ResourceInfo(path, resources); if (!resourceInfo.exists) { response.sendError(HttpServletResponse.SC_NOT_FOUND, --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org