Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 85991 invoked from network); 15 Nov 2002 20:43:03 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 15 Nov 2002 20:43:03 -0000 Received: (qmail 22535 invoked by uid 97); 15 Nov 2002 20:43:58 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 22518 invoked by uid 97); 15 Nov 2002 20:43:57 -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 22485 invoked by uid 98); 15 Nov 2002 20:43:57 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) From: TFohrer@t-online.de (Torsten Fohrer) Reply-To: tfohrer@t-online.de To: "Tomcat Developers List" Subject: [PATCH] Setting TagHandlerPool size as InitParameter for jasper servlet Date: Fri, 15 Nov 2002 21:45:47 +0100 User-Agent: KMail/1.4.7 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_7zV19NFs3phStFt" Message-Id: <200211152145.47730.tfohrer@t-online.de> X-Sender: 320014434200-0001@t-dialin.net X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --Boundary-00=_7zV19NFs3phStFt Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit Content-Disposition: inline PATCH Content: Adding handling of init parameter "tagPoolSize" Changing Generator to use tagPoolSize for initialize TagHandlerPool This should, hopefully, be correctly formatted. Torsten Fohrer --Boundary-00=_7zV19NFs3phStFt Content-Type: text/x-diff; charset="us-ascii"; name="JasperTagPoolSize.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="JasperTagPoolSize.patch" Index: resources/messages.properties =================================================================== RCS file: /home/cvspublic/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties,v retrieving revision 1.58 diff -u -w -b -r1.58 messages.properties --- resources/messages.properties 8 Nov 2002 19:55:47 -0000 1.58 +++ resources/messages.properties 15 Nov 2002 20:36:19 -0000 @@ -121,6 +121,7 @@ jsp.warning.keepgen=Warning: Invalid value for the initParam keepgenerated. Will use the default value of \"false\" jsp.warning.largeFile=Warning: Invalid value for the initParam largeFile. Will use the default value of \"true\" jsp.warning.enablePooling=Warning: Invalid value for the initParam enablePooling. Will use the default value of \"true\" +jsp.warning.tagpoolsize=Warning: Invalid value for the initParam tagpoolsize. Will use the default value of \"5\" jsp.warning.mappedFile=Warning: Invalid value for the initParam mappedFile. Will use the default value of \"false\" jsp.warning.sendErrToClient=Warning: Invalid value for the initParam sendErrToClient. Will use the default value of \"false\" jsp.warning.classDebugInfo=Warning: Invalid value for the initParam classdebuginfo. Will use the default value of \"false\" Index: EmbededServletOptions.java =================================================================== RCS file: /home/cvspublic/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/EmbededServletOptions.java,v retrieving revision 1.11 diff -u -w -b -r1.11 EmbededServletOptions.java --- EmbededServletOptions.java 22 Oct 2002 22:23:14 -0000 1.11 +++ EmbededServletOptions.java 15 Nov 2002 20:36:19 -0000 @@ -108,6 +108,11 @@ private boolean poolingEnabled = true; /** + * Size of the tag handler pool. + */ + private boolean tagPoolSize = 5; + + /** * Do you want support for "mapped" files? This will generate * servlet that has a print statement per line of the JSP file. * This seems like a really nice feature to have for debugging. @@ -201,6 +206,10 @@ return poolingEnabled; } + public int getTagPoolSize() { + return tagPoolSize; + } + /** * Are we supporting HTML mapped servlets? */ @@ -336,6 +345,21 @@ Logger.WARNING); } + String tagPoolSize = config.getInitParameter("tagPoolSize"); + if (checkInterval != null) { + try { + this.tagPoolSize = Integer.parseInt( tagPoolSize ); + if (this.checkInterval <= 0) { + this.checkInterval = 5; + Constants.message("jsp.warning.tagpoolsize", + Logger.WARNING); + } + } catch(NumberFormatException ex) { + Constants.message ("jsp.warning.tagpoolsize", Logger.WARNING); + } + } + + String mapFile = config.getInitParameter("mappedfile"); if (mapFile != null) { if (mapFile.equalsIgnoreCase("true")) @@ -366,7 +390,7 @@ String checkInterval = config.getInitParameter("checkInterval"); if (checkInterval != null) { try { - this.checkInterval = new Integer(checkInterval).intValue(); + this.checkInterval = Integer.parseInt(checkInterval); if (this.checkInterval == 0) { this.checkInterval = 300; Constants.message("jsp.warning.checkInterval", Index: Options.java =================================================================== RCS file: /home/cvspublic/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/Options.java,v retrieving revision 1.8 diff -u -w -b -r1.8 Options.java --- Options.java 20 Aug 2002 03:52:18 -0000 1.8 +++ Options.java 15 Nov 2002 20:36:20 -0000 @@ -94,6 +94,11 @@ public boolean isPoolingEnabled(); /** + * Size of the tag handler pool. + */ + public int getTagPoolSize(); + + /** * Are we supporting HTML mapped servlets? */ public boolean getMappedFile(); Index: compiler/Generator.java =================================================================== RCS file: /home/cvspublic/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v retrieving revision 1.126 diff -u -w -b -r1.126 Generator.java --- compiler/Generator.java 15 Nov 2002 19:41:28 -0000 1.126 +++ compiler/Generator.java 15 Nov 2002 20:36:22 -0000 @@ -659,7 +659,9 @@ out.pushIndent(); for (int i=0; i For additional commands, e-mail: --Boundary-00=_7zV19NFs3phStFt--