svn commit: r1190177 - in /tomcat/trunk/java/org/apache/catalina/deploy: ContextTransaction.java NamingResources.java

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 06:59:50 2011
New Revision: 1190177

URL: http://svn.apache.org/viewvc?rev=1190177view=rev
Log:
Remove deprecated unused code

Modified:
tomcat/trunk/java/org/apache/catalina/deploy/ContextTransaction.java
tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java

Modified: tomcat/trunk/java/org/apache/catalina/deploy/ContextTransaction.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/ContextTransaction.java?rev=1190177r1=1190176r2=1190177view=diff
==
--- tomcat/trunk/java/org/apache/catalina/deploy/ContextTransaction.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/deploy/ContextTransaction.java Fri 
Oct 28 06:59:50 2011
@@ -86,26 +86,4 @@ public class ContextTransaction implemen
 return (sb.toString());
 
 }
-
-
-//  Package Methods
-
-
-/**
- * The NamingResources with which we are associated (if any).
- */
-@Deprecated
-protected NamingResources resources = null;
-
-@Deprecated
-public NamingResources getNamingResources() {
-return (this.resources);
-}
-
-@Deprecated
-void setNamingResources(NamingResources resources) {
-this.resources = resources;
-}
-
-
 }

Modified: tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java?rev=1190177r1=1190176r2=1190177view=diff
==
--- tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java (original)
+++ tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java Fri Oct 
28 06:59:50 2011
@@ -691,17 +691,6 @@ public class NamingResources extends Lif
 
 
 /**
- * Return true if the name specified already exists.
- */
-@Deprecated
-public boolean exists(String name) {
-
-return (entries.containsKey(name));
-
-}
-
-
-/**
  * Remove any EJB resource reference with the specified name.
  *
  * @param name Name of the EJB resource reference to remove



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



Re: Progress towards mod_jk 1.2.33

2011-10-28 Thread William A. Rowe Jr.
On 10/27/2011 1:10 PM, Mladen Truk wrote:
 On 10/27/2011 07:45 PM, Rainer Jung wrote:

 BTW, I plan to support IIS on XP+ which means
 dropping anything bellow IIS5.1

 I'm OK with dropping support for IIS up until 5.0, e.g. up until Win
 2000 including if that's what you plan. Starting support with XP / IIS
 5.1 is fine IMHO. Haven't seen a Win 2K web server for a long long time.

 
 Exactly. Dropping WIN2K and below.
 It would simplify get_iis_info() and allow to depend on XP API.

Heh... wouldn't it be overtime to drop apache 1.3 support?  You won't
find it in www.apache.org/dist/httpd/


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



Re: Progress towards mod_jk 1.2.33

2011-10-28 Thread William A. Rowe Jr.
On 10/27/2011 1:10 PM, Mladen Truk wrote:
 On 10/27/2011 07:45 PM, Rainer Jung wrote:

 BTW, I plan to support IIS on XP+ which means
 dropping anything bellow IIS5.1

 I'm OK with dropping support for IIS up until 5.0, e.g. up until Win
 2000 including if that's what you plan. Starting support with XP / IIS
 5.1 is fine IMHO. Haven't seen a Win 2K web server for a long long time.
 
 Exactly. Dropping WIN2K and below.
 It would simplify get_iis_info() and allow to depend on XP API.

MS no longer supports XP nor Win 2K server.  Which translates to... anyone
plugging these into a public internet should be disconnected, and certainly
not encouraged to continue any computing exercises.

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



Re: Progress towards mod_jk 1.2.33

2011-10-28 Thread Mark Thomas
On 28/10/2011 08:15, William A. Rowe Jr. wrote:
 On 10/27/2011 1:10 PM, Mladen Truk wrote:
 On 10/27/2011 07:45 PM, Rainer Jung wrote:

 BTW, I plan to support IIS on XP+ which means
 dropping anything bellow IIS5.1

 I'm OK with dropping support for IIS up until 5.0, e.g. up until Win
 2000 including if that's what you plan. Starting support with XP / IIS
 5.1 is fine IMHO. Haven't seen a Win 2K web server for a long long time.

 Exactly. Dropping WIN2K and below.
 It would simplify get_iis_info() and allow to depend on XP API.
 
 MS no longer supports XP nor Win 2K server.  Which translates to... anyone
 plugging these into a public internet should be disconnected, and certainly
 not encouraged to continue any computing exercises.

Wrong. XP 64-bit SP2 and XP 32-bit SP3 are still supported and will be
for several years yet.

Mark

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



Re: Progress towards mod_jk 1.2.33

2011-10-28 Thread William A. Rowe Jr.
On 10/28/2011 2:28 AM, Mark Thomas wrote:
 On 28/10/2011 08:15, William A. Rowe Jr. wrote:
 On 10/27/2011 1:10 PM, Mladen Truk wrote:
 On 10/27/2011 07:45 PM, Rainer Jung wrote:

 BTW, I plan to support IIS on XP+ which means
 dropping anything bellow IIS5.1

 I'm OK with dropping support for IIS up until 5.0, e.g. up until Win
 2000 including if that's what you plan. Starting support with XP / IIS
 5.1 is fine IMHO. Haven't seen a Win 2K web server for a long long time.

 Exactly. Dropping WIN2K and below.
 It would simplify get_iis_info() and allow to depend on XP API.

 MS no longer supports XP nor Win 2K server.  Which translates to... anyone
 plugging these into a public internet should be disconnected, and certainly
 not encouraged to continue any computing exercises.
 
 Wrong. XP 64-bit SP2 and XP 32-bit SP3 are still supported and will be
 for several years yet.

You are correct... April 8, 2014 is the end of support date for XP (then-current
SP flavor).  XP is contemporaneous to 2003, so this shouldn't be a significant
delta to the code.


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



svn commit: r1190185 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/core/ java/org/apache/catalina/startup/ java/org/apache/coyote/ java/org/apache/tomcat/util/threads/ test/or

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 07:37:34 2011
New Revision: 1190185

URL: http://svn.apache.org/viewvc?rev=1190185view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46264
Implement threaded start/stop for containers

Removed:

tomcat/trunk/java/org/apache/tomcat/util/threads/DedicatedThreadExecutor.java

tomcat/trunk/test/org/apache/tomcat/util/threads/DedicatedThreadExecutorTest.java
Modified:
tomcat/trunk/java/org/apache/catalina/Container.java
tomcat/trunk/java/org/apache/catalina/Host.java
tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java
tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/java/org/apache/catalina/core/StandardHost.java
tomcat/trunk/java/org/apache/catalina/core/mbeans-descriptors.xml
tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java
tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties
tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java
tomcat/trunk/webapps/docs/config/engine.xml
tomcat/trunk/webapps/docs/config/host.xml

Modified: tomcat/trunk/java/org/apache/catalina/Container.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Container.java?rev=1190185r1=1190184r2=1190185view=diff
==
--- tomcat/trunk/java/org/apache/catalina/Container.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Container.java Fri Oct 28 07:37:34 
2011
@@ -461,4 +461,21 @@ public interface Container extends Lifec
  * that the request/response still appears in the correct access logs.
  */
 public AccessLog getAccessLog();
+
+
+/**
+ * Returns the number of threads available for starting and stopping any
+ * children associated with this container. This allows start/stop calls to
+ * children to be processed in parallel.
+ */
+public int getStartStopThreads();
+
+
+/**
+ * Sets the number of threads available for starting and stopping any
+ * children associated with this container. This allows start/stop calls to
+ * children to be processed in parallel.
+ * @param   startStopThreadsThe new number of threads to be used
+ */
+public void setStartStopThreads(int startStopThreads);
 }

Modified: tomcat/trunk/java/org/apache/catalina/Host.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Host.java?rev=1190185r1=1190184r2=1190185view=diff
==
--- tomcat/trunk/java/org/apache/catalina/Host.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Host.java Fri Oct 28 07:37:34 2011
@@ -17,6 +17,7 @@
 package org.apache.catalina;
 
 import java.io.File;
+import java.util.concurrent.ExecutorService;
 import java.util.regex.Pattern;
 
 
@@ -180,9 +181,16 @@ public interface Host extends Container 
 public void setDeployIgnore(String deployIgnore);
 
 
-// - Public Methods
+/**
+ * Return the executor that is used for starting and stopping contexts. 
This
+ * is primarily for use by components deploying contexts that want to do
+ * this in a multi-threaded manner.
+ */
+public ExecutorService getStartStopExecutor();
 
 
+// - Public Methods
+
 /**
  * Add an alias name that should be mapped to this same Host.
  *

Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=1190185r1=1190184r2=1190185view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Fri Oct 28 
07:37:34 2011
@@ -26,6 +26,13 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Iterator;
+import java.util.List;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.Callable;
+import java.util.concurrent.Future;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
 
 import javax.management.ObjectName;
 import javax.naming.directory.DirContext;
@@ -273,8 +280,55 @@ public abstract class ContainerBase exte
 protected volatile AccessLog accessLog = null;
 private volatile boolean accessLogScanComplete = false;
 
+
+/**
+ * The number of threads available to process start and stop events for any
+ * children associated with this container.
+ */
+private int startStopThreads = 1;
+

svn commit: r1190186 - /tomcat/tc6.0.x/trunk/STATUS.txt

2011-10-28 Thread kfujino
Author: kfujino
Date: Fri Oct 28 07:39:28 2011
New Revision: 1190186

URL: http://svn.apache.org/viewvc?rev=1190186view=rev
Log:
vote

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1190186r1=1190185r2=1190186view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Oct 28 07:39:28 2011
@@ -82,20 +82,20 @@ PATCHES PROPOSED TO BACKPORT:
 * In GenericPrincipal, SerializablePrincipal:
   Do not sort lists that have only one element
   http://svn.apache.org/viewvc?view=revisionrevision=1178684
-  +1: kkolinko, markt
+  +1: kkolinko, markt, kfujino
   -1:
 
 * Http keep-alive thread needs to have the context class loader fixed even if 
it
   isn't running
   http://svn.apache.org/viewvc?rev=1187381view=rev
-  +1: markt, kkolinko
+  +1: markt, kkolinko, kfujino
   -1:
 
 * Fix duplicate resetDeltaRequest() call in DeltaSession.setId(String).
   It occurs via super.setId(id) calling overridden DeltaSession.setId(id, 
true).
   http://svn.apache.org/viewvc?rev=1189386view=rev
   (r1189393 in TC7)
-  +1: kkolinko
+  +1: kkolinko, kfujino
   -1:
 
 * Make configuration issue for RemoteAddrValve, RemoteHostValve result



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



[jira] [Commented] (MTOMCAT-81) mvn tomcat:run does not work with spring tomcat classloader

2011-10-28 Thread Olivier Lamy (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/MTOMCAT-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13138146#comment-13138146
 ] 

Olivier Lamy commented on MTOMCAT-81:
-

how is declared your dependency on spring-tomcat-weaver or 
spring-instrument-tomcat ?

 mvn tomcat:run does not work with spring tomcat classloader
 ---

 Key: MTOMCAT-81
 URL: https://issues.apache.org/jira/browse/MTOMCAT-81
 Project: Apache Tomcat Maven Plugin
  Issue Type: Bug
Affects Versions: 1.1
 Environment: Ubuntu 10.10
Reporter: Jothi Shankar Kumar
Priority: Blocker
 Fix For: backlog


 I have been trying for weeks to get the mvn tomcat:run work for my Spring 
 based project. I use the spring-tomcat-weaver.jar for doing the class loading 
 in Tomcat. When I run my project using mvn tomcat:run command it gives me a 
 class not found. Below is a stack trace of what I get:
 SEVERE: LifecycleException 
 java.lang.ClassNotFoundException: 
 org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader
   at 
 org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
   at 
 org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
   at 
 org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:169)
   at 
 org.apache.catalina.loader.WebappLoader.createClassLoader(WebappLoader.java:801)
   at org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:661)
   at 
 org.apache.catalina.core.StandardContext.start(StandardContext.java:4504)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at 
 org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
   at org.apache.catalina.startup.Embedded.start(Embedded.java:825)
   at 
 org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer(AbstractRunMojo.java:558)
   at 
 org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java:255)
   at 
 org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
   at 
 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
   at 
 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
   at 
 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
   at 
 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
   at 
 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
   at 
 org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
   at 
 org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
   at org.apache.maven.cli.MavenCli.execute(MavenCli.java:451)
   at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:188)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:134)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at 
 org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
   at 
 org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
   at 
 org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
   at 
 org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (MTOMCAT-103) Executable War fails to run with a NullPointerException

2011-10-28 Thread Olivier Lamy (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/MTOMCAT-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13138150#comment-13138150
 ] 

Olivier Lamy commented on MTOMCAT-103:
--

does the file smapi-1.0-war-exec.jar contains the war file smapi-1.0.war ?
As it looks to not be here: how do you configure the mojo in your pom ?

 Executable War fails to run with a NullPointerException
 ---

 Key: MTOMCAT-103
 URL: https://issues.apache.org/jira/browse/MTOMCAT-103
 Project: Apache Tomcat Maven Plugin
  Issue Type: Bug
  Components: tomcat7
Affects Versions: 2.0
 Environment: Mac OSX (tried on windows 7 as well)
Reporter: Keith Corbin
Assignee: Olivier Lamy
Priority: Critical
 Fix For: 2.0


 Running the package goal with maven with the tomcat7 plugin configured the 
 generated executable war fails to run.  The error is:
 $ java -jar ./smapi-1.0-war-exec.jar -debug
 populateWebAppWarPerContext warValue:/smapi-1.0.war|/smapi-1.0
 populateWebAppWarPerContext contextValue/warFileName:/smapi-1.0//smapi-1.0.war
 webappWarPerContext entry key/value: /smapi-1.0//smapi-1.0.war
 Exception in thread main java.lang.NullPointerException
   at 
 org.apache.tomcat.maven.runner.Tomcat7Runner.expand(Tomcat7Runner.java:406)
   at 
 org.apache.tomcat.maven.runner.Tomcat7Runner.extract(Tomcat7Runner.java:309)
   at 
 org.apache.tomcat.maven.runner.Tomcat7Runner.run(Tomcat7Runner.java:98)
   at 
 org.apache.tomcat.maven.runner.Tomcat7RunnerCli.main(Tomcat7RunnerCli.java:144)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



svn commit: r1190189 - /tomcat/tc6.0.x/trunk/STATUS.txt

2011-10-28 Thread kfujino
Author: kfujino
Date: Fri Oct 28 07:58:26 2011
New Revision: 1190189

URL: http://svn.apache.org/viewvc?rev=1190189view=rev
Log:
vote

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1190189r1=1190188r2=1190189view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Oct 28 07:58:26 2011
@@ -104,14 +104,14 @@ PATCHES PROPOSED TO BACKPORT:
   RemoteIpValve via JMX are thread-safe.
   
http://people.apache.org/~kkolinko/patches/2011-10-26_tc6_RequestFilterValve_v3.patch
   It is based on valves part of r1189256 and r1187027. (r1189258, r1187029 in 
TC7)
-  +1: kkolinko
+  +1: kkolinko, kfujino
   -1:
 
 * Make configuration issue for CsrfPreventionFilter result
   in the failure of the filter rather than just a warning message.
   
http://people.apache.org/~kkolinko/patches/2011-10-26_tc6_CsrfPreventionFilter.patch
   It is based on the filters part of r1189256 (r1189258 in TC7)
-  +1: kkolinko
+  +1: kkolinko, kfujino
   -1:
 
 * Improve performance of parameter processing.



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



svn commit: r1190192 - /tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 08:01:05 2011
New Revision: 1190192

URL: http://svn.apache.org/viewvc?rev=1190192view=rev
Log:
Revert accidental commit

Modified:
tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1190192r1=1190191r2=1190192view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java Fri Oct 28 
08:01:05 2011
@@ -493,12 +493,6 @@ public abstract class AbstractProtocol i
 SocketStatus status) {
 P processor = connections.remove(socket.getSocket());
 
-if (getLog().isDebugEnabled()) {
-getLog().debug(process() entry  +
-Socket: [ + logHashcode(socket.getSocket()) + ],  +
-Processor [ + logHashcode(processor) + ]);
-}
-
 socket.setAsync(false);
 
 try {
@@ -509,51 +503,20 @@ public abstract class AbstractProtocol i
 processor = createProcessor();
 }
 
-if (getLog().isDebugEnabled()) {
-getLog().debug(process() gotProcessor  +
-Socket: [ + logHashcode(socket.getSocket()) + 
],  +
-Processor [ + logHashcode(processor) + ]);
-}
-
 initSsl(socket, processor);
 
 SocketState state = SocketState.CLOSED;
 do {
 if (processor.isAsync() || state == SocketState.ASYNC_END) 
{
 state = processor.asyncDispatch(status);
-if (getLog().isDebugEnabled()) {
-getLog().debug(process() asyncDispatch  +
-Socket: [ + 
logHashcode(socket.getSocket()) + ],  +
-Processor: [ + logHashcode(processor) + 
],  +
-State: [ + state.toString() + ]);
-}
 } else if (processor.isComet()) {
 state = processor.event(status);
-if (getLog().isDebugEnabled()) {
-getLog().debug(process() event  +
-Socket: [ + 
logHashcode(socket.getSocket()) + ],  +
-Processor: [ + logHashcode(processor) + 
],  +
-State: [ + state.toString() + ]);
-}
 } else {
 state = processor.process(socket);
-if (getLog().isDebugEnabled()) {
-getLog().debug(process() process  +
-Socket: [ + 
logHashcode(socket.getSocket()) + ],  +
-Processor: [ + logHashcode(processor) + 
],  +
-State: [ + state.toString() + ]);
-}
 }
 
 if (state != SocketState.CLOSED  processor.isAsync()) {
 state = processor.asyncPostProcess();
-if (getLog().isDebugEnabled()) {
-getLog().debug(process() asyncPostProcess  +
-Socket: [ + 
logHashcode(socket.getSocket()) + ],  +
-Processor: [ + logHashcode(processor) + 
],  +
-State: [ + state.toString() + ]);
-}
-
 }
 } while (state == SocketState.ASYNC_END);
 
@@ -599,14 +562,6 @@ public abstract class AbstractProtocol i
 return SocketState.CLOSED;
 }
 
-private String logHashcode (Object o) {
-if (o == null) {
-return null;
-} else {
-return Integer.toString(o.hashCode());
-}
-}
-
 protected abstract P createProcessor();
 protected abstract void initSsl(SocketWrapperS socket, P processor);
 protected abstract void longPoll(SocketWrapperS socket, P processor);



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



svn commit: r1190194 - /tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 08:04:39 2011
New Revision: 1190194

URL: http://svn.apache.org/viewvc?rev=1190194view=rev
Log:
Update for bz46264

Modified:
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1190194r1=1190193r2=1190194view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Oct 28 08:04:39 2011
@@ -146,6 +146,12 @@
 Also add an option to limit the maximum number of parameters processed
 per request. This defaults to 1. (markt)
   /add
+  add
+Add the ability to start and stop containers (primarily Contexts) using
+a thread pool rather than a single thread. This can significantly
+improve start and stop time. Based on patches by Joe Kislo and Felix
+Schumacher. (markt)
+  /add
 /changelog
   /subsection
   subsection name=Coyote



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



DO NOT REPLY [Bug 46264] Shutting down tomcat with large number of contexts is slow

2011-10-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46264

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #28 from Mark Thomas ma...@apache.org 2011-10-28 08:02:48 UTC ---
This has been implemented in trunk and 7.0.x and will be included in 7.0.23
onwards.

-- 
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



buildbot failure in ASF Buildbot on tomcat-trunk

2011-10-28 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/2429

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1190185
Blamelist: markt

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





Re: Progress towards mod_jk 1.2.33

2011-10-28 Thread Rainer Jung
On 28.10.2011 09:13, William A. Rowe Jr. wrote:
 On 10/27/2011 1:10 PM, Mladen Truk wrote:
 On 10/27/2011 07:45 PM, Rainer Jung wrote:

 BTW, I plan to support IIS on XP+ which means
 dropping anything bellow IIS5.1

 I'm OK with dropping support for IIS up until 5.0, e.g. up until Win
 2000 including if that's what you plan. Starting support with XP / IIS
 5.1 is fine IMHO. Haven't seen a Win 2K web server for a long long time.


 Exactly. Dropping WIN2K and below.
 It would simplify get_iis_info() and allow to depend on XP API.
 
 Heh... wouldn't it be overtime to drop apache 1.3 support?  You won't
 find it in www.apache.org/dist/httpd/

Until now it was just a matter of a simple merge. The web server
specific code is very small, and is very close between 1.3 and 2.x. For
me it would make more hastle keeping the situation documented than just
copying in the code (and yes, testing every now and then).

The real problem is that we are still on jk 1.2.x. Once we really start
a new major release branch we will drop a lot of thos elegacy supported
systems (at least that was the result of a discussion several years ago).

Regards,

Rainer


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



[Tomcat Wiki] Update of TomcatAtApacheConNA2011 by JeanFredericClere

2011-10-28 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Tomcat Wiki for change 
notification.

The TomcatAtApacheConNA2011 page has been changed by JeanFredericClere:
http://wiki.apache.org/tomcat/TomcatAtApacheConNA2011?action=diffrev1=9rev2=10

  = Training  Session Schedule =
  The official schedule has been posted...
  
- http://na.apachecon.com/c/acna2010/schedule/2010/11/05
+ http://na11.apachecon.com/talk/by_track/1408
  
- There is a full day track of sessions on Friday, and two days of Tomcat 
training classes available on Monday  Tuesday
- 
- = BOF / MeetUp - Thursday 4th =
+ = BOF / MeetUp - Thursday 10th =
- There will be a Tomcat !MeetUp on Thursday the 4th at 8PM in Atlanta rooms E 
 F. '''This event is open to anyone who wants to come, even if you are not 
registered for the conference.'''
+ There will be a Tomcat !MeetUp on Thursday the 10th at 8PM in Vacouver in 
'''Bayshore Grand Ballroom''' '''Salon E'''. '''This event is open to anyone 
who wants to come, even if you are not registered for the conference.'''
  
  (Draft) Plan for the meetup:
  
+  * Tomcat Quick Status.
   * Servlet 3.0 and Tomcat 7.0
-  * Parallel deployment (may be part of Tomcat 7)
-  * how to become a committer
-  * security
-   * passwords in server.xml
-  * memory leaks on reload
-  * harnessing the power of CATALINA_BASE
   * relative performance of Tomcat connectors against Apache httpd
   * [Add the topic you want to present]
  

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



Re: buildbot failure in ASF Buildbot on tomcat-trunk

2011-10-28 Thread Konstantin Kolinko
2011/10/28  build...@apache.org:
 The Buildbot has detected a new failure on builder tomcat-trunk while 
 building ASF Buildbot.
 Full details are available at:
  http://ci.apache.org/builders/tomcat-trunk/builds/2429

 Buildbot URL: http://ci.apache.org/

 Buildslave for this Build: bb-vm_ubuntu

 Build Reason: scheduler
 Build Source Stamp: [branch tomcat/trunk] 1190185
 Blamelist: markt

 BUILD FAILED: failed compile_1


Appears to be a NPE failure during Tomcat shutdown, in many tests.

[[[
[junit] Running org.apache.catalina.comet.TestCometProcessor
[junit] Tests run: 6, Failures: 0, Errors: 6, Time elapsed: 0.28 sec
[junit] Oct 28, 2011 7:47:26 AM org.apache.coyote.AbstractProtocol destroy
[junit] INFO: Destroying ProtocolHandler [http-bio-8001]
[junit] Oct 28, 2011 7:47:26 AM
org.apache.catalina.core.ContainerBase removeChild
[junit] SEVERE: ContainerBase.removeChild: destroy:
[junit] org.apache.catalina.LifecycleException: Failed to destroy
component [StandardEngine[Tomcat].StandardHost[localhost]]
[junit] at
org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:296)
[junit] at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1000)
[junit] at
org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1185)
[junit] at
org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
[junit] at
org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:572)
[junit] at
org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
[junit] at
org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:770)
[junit] at
org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
[junit] at org.apache.catalina.startup.Tomcat.destroy(Tomcat.java:355)
[junit] at
org.apache.catalina.startup.TomcatBaseTest.tearDown(TomcatBaseTest.java:211)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:597)
[junit] at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
[junit] at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
[junit] at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
[junit] at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:37)
[junit] at
org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
[junit] at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
[junit] at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
[junit] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
[junit] at 
org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
[junit] at
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
[junit] at 
org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
[junit] at 
org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
[junit] at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
[junit] at 
junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:518)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)
[junit] Caused by: java.lang.NullPointerException
[junit] at
org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1193)
[junit] at
org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:292)
[junit] ... 30 more
(...)
[junit] Test org.apache.catalina.comet.TestCometProcessor FAILED
]]]

...
[junit] Test org.apache.catalina.filters.TestCsrfPreventionFilter FAILED
[junit] Test org.apache.catalina.filters.TestExpiresFilter FAILED
etc.

Best regards,
Konstantin Kolinko

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



svn commit: r1190279 - /tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 12:46:59 2011
New Revision: 1190279

URL: http://svn.apache.org/viewvc?rev=1190279view=rev
Log:
Fix potential NPE

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

Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=1190279r1=1190278r2=1190279view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Fri Oct 28 
12:46:59 2011
@@ -1190,7 +1190,10 @@ public abstract class ContainerBase exte
 parent.removeChild(this);
 }
 
-startStopExecutor.shutdownNow();
+// If init fails, this may be null
+if (startStopExecutor != null) {
+startStopExecutor.shutdownNow();
+}
 
 super.destroyInternal();
 }



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



svn commit: r1190284 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/ContainerBase.java

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 12:50:50 2011
New Revision: 1190284

URL: http://svn.apache.org/viewvc?rev=1190284view=rev
Log:
Fix possible NPE

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ContainerBase.java

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 28 12:50:50 2011
@@ -1 +1 @@
-/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187755,1187
 
775,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185
+/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187755,1187
 
775,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ContainerBase.java
URL: 

Re: svn commit: r1189899 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/connector/ java/org/apache/tomcat/util/buf/ java/org/apache/tomcat/util/http/ webapps/docs/ webapps/docs/config/

2011-10-28 Thread Konstantin Kolinko
2011/10/27  ma...@apache.org:
 Author: markt
 Date: Thu Oct 27 18:02:27 2011
 New Revision: 1189899

 URL: http://svn.apache.org/viewvc?rev=1189899view=rev
 Log:
 Re-factor parameter parsing to improve performance

 Added:
    
 tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/LocalStrings.properties 
   (with props)
 Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Connector.java
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java
    
 tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/mbeans-descriptors.xml
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/buf/StringCache.java
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/Parameters.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
    tomcat/tc7.0.x/trunk/webapps/docs/config/ajp.xml
    tomcat/tc7.0.x/trunk/webapps/docs/config/http.xml


 @@ -97,15 +101,23 @@ public final class ByteChunk implements
         as most standards seem to converge, but the servlet API requires
         8859_1, and this object is used mostly for servlets.
     */
 -    public static final String DEFAULT_CHARACTER_ENCODING=ISO-8859-1;
 +    public static Charset DEFAULT_CHARSET = null;

1. The above public variable must declared as final.

 +    static {
 +        try {
 +            DEFAULT_CHARSET = B2CConverter.getCharset(ISO-8859-1);
 +        } catch (UnsupportedEncodingException e) {
 +            // Should never happen since all JVMs must support ISO-8859-1
 +        }
 +    }

IIRC, it might be done using a helper variable in the static{} block.

   public static final Charset DEFAULT_CHARSET;

   static {
   Charset defaultCharset = null;
   try {
defaultCharset = B2CConverter.getCharset(ISO-8859-1);
} catch (UnsupportedEncodingException e) {
// Should never happen since all JVMs must support ISO-8859-1
}
DEFAULT_CHARSET = defaultCharset;
}


2) In TestParameters.java
in http://svn.apache.org/viewvc?view=revisionrevision=1189876

UEncoder uencoder = new UEncoder();
field can be private final, like the others.

Best regards,
Konstantin Kolinko

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



buildbot success in ASF Buildbot on tomcat-trunk

2011-10-28 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/2431

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1190279
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot





[jira] [Commented] (MTOMCAT-103) Executable War fails to run with a NullPointerException

2011-10-28 Thread Keith Corbin (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/MTOMCAT-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13138384#comment-13138384
 ] 

Keith Corbin commented on MTOMCAT-103:
--

I have unziped the smapi1.0-war-exec.jar file and in it I see the smapi-1.0.war 
file.
I think it is finding the war, other wise I would be seeing the zip file 
exception that I saw when running it from the wrong directory. 

Here is how I have the plugin configured in the pom:
plugin
groupIdorg.apache.tomcat.maven/groupId
artifactIdtomcat7-maven-plugin/artifactId
version2.0-SNAPSHOT/version
executions
  execution
idtomcat-run/id
goals
  goalexec-war-only/goal
/goals
phasepackage/phase
configuration
  path/smapi-1.0/path
/configuration
  /execution
/executions
  /plugin 

 Executable War fails to run with a NullPointerException
 ---

 Key: MTOMCAT-103
 URL: https://issues.apache.org/jira/browse/MTOMCAT-103
 Project: Apache Tomcat Maven Plugin
  Issue Type: Bug
  Components: tomcat7
Affects Versions: 2.0
 Environment: Mac OSX (tried on windows 7 as well)
Reporter: Keith Corbin
Assignee: Olivier Lamy
Priority: Critical
 Fix For: 2.0


 Running the package goal with maven with the tomcat7 plugin configured the 
 generated executable war fails to run.  The error is:
 $ java -jar ./smapi-1.0-war-exec.jar -debug
 populateWebAppWarPerContext warValue:/smapi-1.0.war|/smapi-1.0
 populateWebAppWarPerContext contextValue/warFileName:/smapi-1.0//smapi-1.0.war
 webappWarPerContext entry key/value: /smapi-1.0//smapi-1.0.war
 Exception in thread main java.lang.NullPointerException
   at 
 org.apache.tomcat.maven.runner.Tomcat7Runner.expand(Tomcat7Runner.java:406)
   at 
 org.apache.tomcat.maven.runner.Tomcat7Runner.extract(Tomcat7Runner.java:309)
   at 
 org.apache.tomcat.maven.runner.Tomcat7Runner.run(Tomcat7Runner.java:98)
   at 
 org.apache.tomcat.maven.runner.Tomcat7RunnerCli.main(Tomcat7RunnerCli.java:144)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



svn commit: r1190339 - in /tomcat/trunk: java/org/apache/catalina/core/ java/org/apache/naming/ test/org/apache/naming/resources/ webapps/docs/config/

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 14:14:22 2011
New Revision: 1190339

URL: http://svn.apache.org/viewvc?rev=1190339view=rev
Log:
Merge branch 'bug51744' into trunk

Modified:
tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/java/org/apache/naming/NamingContext.java
tomcat/trunk/test/org/apache/naming/resources/TestNamingContext.java
tomcat/trunk/webapps/docs/config/context.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java?rev=1190339r1=1190338r2=1190339view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java Fri 
Oct 28 14:14:22 2011
@@ -141,6 +141,13 @@ public class NamingContextListener
 
 
 /**
+ * Determines if an attempt to write to a read-only context results in an
+ * exception or if the request is ignored.
+ */
+private boolean exceptionOnFailedWrite = true;
+
+
+/**
  * The string manager for this package.
  */
 protected static final StringManager sm =
@@ -149,6 +156,25 @@ public class NamingContextListener
 
 // - Properties
 
+/**
+ * Returns whether or not an attempt to modify the JNDI context will 
trigger
+ * an exception or if the request will be ignored.
+ */
+public boolean getExceptionOnFailedWrite() {
+return exceptionOnFailedWrite;
+}
+
+
+/**
+ * Controls whether or not an attempt to modify the JNDI context will
+ * trigger an exception or if the request will be ignored.
+ *
+ * @param exceptionOnFailedWriteThe new value
+ */
+public void setExceptionOnFailedWrite(boolean exceptionOnFailedWrite) {
+this.exceptionOnFailedWrite = exceptionOnFailedWrite;
+}
+
 
 /**
  * Return the name property.
@@ -214,6 +240,10 @@ public class NamingContextListener
 log.debug(Bound  + container );
 }
 
+// Configure write when read-only behaviour
+namingContext.setExceptionOnFailedWrite(
+getExceptionOnFailedWrite());
+
 // Setting the context in read/write mode
 ContextAccessController.setWritable(getName(), container);
 

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1190339r1=1190338r2=1190339view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Fri Oct 28 
14:14:22 2011
@@ -834,6 +834,7 @@ public class StandardContext extends Con
 
 private boolean sendRedirectBody = false;
 
+private boolean jndiExceptionOnFailedWrite = true;
 
 // - Context Properties
 
@@ -2429,6 +2430,26 @@ public class StandardContext extends Con
 
 // -- Public Properties
 
+/**
+ * Returns whether or not an attempt to modify the JNDI context will 
trigger
+ * an exception or if the request will be ignored.
+ */
+public boolean getJndiExceptionOnFailedWrite() {
+return jndiExceptionOnFailedWrite;
+}
+
+
+/**
+ * Controls whether or not an attempt to modify the JNDI context will
+ * trigger an exception or if the request will be ignored.
+ *
+ * @param jndiExceptionOnFailedWrite
+ */
+public void setJndiExceptionOnFailedWrite(
+boolean jndiExceptionOnFailedWrite) {
+this.jndiExceptionOnFailedWrite = jndiExceptionOnFailedWrite;
+}
+
 
 /**
  * Return the Locale to character set mapper class for this Context.
@@ -4969,6 +4990,7 @@ public class StandardContext extends Con
 if (getNamingContextListener() == null) {
 NamingContextListener ncl = new NamingContextListener();
 ncl.setName(getNamingContextName());
+ncl.setExceptionOnFailedWrite(getJndiExceptionOnFailedWrite());
 addLifecycleListener(ncl);
 setNamingContextListener(ncl);
 }

Modified: tomcat/trunk/java/org/apache/naming/NamingContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/NamingContext.java?rev=1190339r1=1190338r2=1190339view=diff
==
--- tomcat/trunk/java/org/apache/naming/NamingContext.java (original)
+++ 

svn commit: r1190357 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/ java/org/apache/naming/ test/org/apache/naming/resources/ webapps/docs/ webapps/docs/config/

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 14:32:44 2011
New Revision: 1190357

URL: http://svn.apache.org/viewvc?rev=1190357view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51744
Throw the correct exception if an application attempts to modify the associated 
JNDI context.
Add an option to the StandardContext that allows exception throwing when an 
application attempts to modify the associated JNDI context to be disabled.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/NamingContextListener.java
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/tc7.0.x/trunk/java/org/apache/naming/NamingContext.java
tomcat/tc7.0.x/trunk/test/org/apache/naming/resources/TestNamingContext.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc7.0.x/trunk/webapps/docs/config/context.xml

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 28 14:32:44 2011
@@ -1 +1 @@
-/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187755,1187
 
775,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279
+/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 

svn propchange: r1190339 - svn:log

2011-10-28 Thread markt
Author: markt
Revision: 1190339
Modified property: svn:log

Modified: svn:log at Fri Oct 28 14:34:20 2011
--
--- svn:log (original)
+++ svn:log Fri Oct 28 14:34:20 2011
@@ -1 +1,3 @@
-Merge branch 'bug51744' into trunk
+Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51744
+Throw the correct exception if an application attempts to modify the 
associated JNDI context.
+Add an option to the StandardContext that allows exception throwing when an 
application attempts to modify the associated JNDI context to be disabled.


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



DO NOT REPLY [Bug 51744] JNDI Lookup Error after a Context is closed

2011-10-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51744

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED

--- Comment #13 from Mark Thomas ma...@apache.org 2011-10-28 14:33:29 UTC ---
The correct exception is now thrown and the option to control whether or not an
exception is thrown has been added to the StandardContext.

Both of these changes have been made to trunk and 7.0.x and will be included in
7.0.23 onwards.

-- 
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: r1190371 - in /tomcat/trunk: java/org/apache/tomcat/util/buf/ByteChunk.java test/org/apache/tomcat/util/http/TestParameters.java

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 14:44:05 2011
New Revision: 1190371

URL: http://svn.apache.org/viewvc?rev=1190371view=rev
Log:
Implement review comments from kkolinko

Modified:
tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java
tomcat/trunk/test/org/apache/tomcat/util/http/TestParameters.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java?rev=1190371r1=1190370r2=1190371view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java Fri Oct 28 
14:44:05 2011
@@ -100,14 +100,16 @@ public final class ByteChunk implements 
 as most standards seem to converge, but the servlet API requires
 8859_1, and this object is used mostly for servlets.
 */
-public static Charset DEFAULT_CHARSET = null;
+public static final Charset DEFAULT_CHARSET;
 
 static {
+Charset c = null;
 try {
-DEFAULT_CHARSET = B2CConverter.getCharset(ISO-8859-1);
+c = B2CConverter.getCharset(ISO-8859-1);
 } catch (UnsupportedEncodingException e) {
 // Should never happen since all JVMs must support ISO-8859-1
 }
+DEFAULT_CHARSET = c;
 }
 
 // byte[]

Modified: tomcat/trunk/test/org/apache/tomcat/util/http/TestParameters.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/http/TestParameters.java?rev=1190371r1=1190370r2=1190371view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/http/TestParameters.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/http/TestParameters.java Fri Oct 
28 14:44:05 2011
@@ -126,8 +126,7 @@ public class TestParameters {
 private static class Parameter {
 private final String name;
 private final String[] values;
-
-UEncoder uencoder = new UEncoder();
+private final UEncoder uencoder = new UEncoder();
 
 public Parameter(String name, String... values) {
 this.name = name;



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



DO NOT REPLY [Bug 52091] TagHandlerPool is slow when high concurrently

2011-10-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52091

--- Comment #2 from Mark Thomas ma...@apache.org 2011-10-28 14:43:14 UTC ---
The lock changes look good to me.

The log change needed more careful checked. I have vague recollections of
memory leaks with Jasper and logging and a number of components using
non-static loggers to avoid them. Having checked the initialisation sequence,
the logger is created by the container class loader, not a web app class loader
so that change should be fine to. I'll commit these changes shortly.

-- 
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: r1190372 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/buf/ByteChunk.java test/org/apache/tomcat/util/http/TestParameters.java

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 14:46:39 2011
New Revision: 1190372

URL: http://svn.apache.org/viewvc?rev=1190372view=rev
Log:
Implement review comments from kkolinko

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/TestParameters.java

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 28 14:46:39 2011
@@ -1 +1 @@
-/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187755,1187
 
775,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339
+/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187755,1187
 
775,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371

Modified: 

svn commit: r1190383 - /tomcat/trunk/test/org/apache/tomcat/util/http/TestParametersPerformance.java

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 14:59:12 2011
New Revision: 1190383

URL: http://svn.apache.org/viewvc?rev=1190383view=rev
Log:
Add some tests used to help track down performance issues.

Added:
tomcat/trunk/test/org/apache/tomcat/util/http/TestParametersPerformance.java

Added: 
tomcat/trunk/test/org/apache/tomcat/util/http/TestParametersPerformance.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/http/TestParametersPerformance.java?rev=1190383view=auto
==
--- 
tomcat/trunk/test/org/apache/tomcat/util/http/TestParametersPerformance.java 
(added)
+++ 
tomcat/trunk/test/org/apache/tomcat/util/http/TestParametersPerformance.java 
Fri Oct 28 14:59:12 2011
@@ -0,0 +1,133 @@
+/*
+ *  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.http;
+
+import java.io.UnsupportedEncodingException;
+import java.nio.charset.Charset;
+import java.util.logging.Level;
+import java.util.logging.LogManager;
+
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+
+import org.apache.tomcat.util.buf.B2CConverter;
+
+public class TestParametersPerformance {
+
+@Test
+public void testProcessParametersByteArrayIntInt() {
+LogManager.getLogManager().getLogger().setLevel(Level.OFF);
+doTestProcessParametersMultiple(foo.getBytes());
+}
+
+private void doTestProcessParametersMultiple(byte[] input) {
+System.out.println(doTestProcessParameters(input, 1));
+System.out.println(doTestProcessParameters(input, 2));
+System.out.println(doTestProcessParameters(input, 4));
+System.out.println(doTestProcessParameters(input, 8));
+System.out.println(doTestProcessParameters(input, 16));
+System.out.println(doTestProcessParameters(input, 32));
+System.out.println(doTestProcessParameters(input, 64));
+System.out.println(doTestProcessParameters(input, 128));
+}
+
+private long doTestProcessParameters(byte[] input, int size) {
+assertEquals(input.length, 3);
+
+Parameters p = new Parameters();
+
+byte[] params = createParams(input, size);
+//byte[] input = createParams(8);
+p.setEncoding(ISO-8859-1);
+long start = System.nanoTime();
+p.processParameters(params, 0, params.length);
+return System.nanoTime() - start;
+}
+
+private byte[] createParams(byte[] input, int len) {
+byte[] result = new byte[len * 4 - 1];
+
+for (int i = 0; i  len; i++) {
+result[i * 4] = input[0];
+result[i * 4 + 1] = input[1];
+result[i * 4 + 2] = input[2];
+if (i  len -1) {
+result[i * 4 + 3] = 38;
+}
+}
+return result;
+}
+
+@Test
+public void testCreateString() throws UnsupportedEncodingException {
+B2CConverter.getCharset(ISO-8859-1);
+doCreateStringMultiple(foo);
+}
+
+private void doCreateStringMultiple(String input) {
+System.out.println(doCreateString(input, 10, true));
+System.out.println(doCreateString(input, 100, true));
+System.out.println(doCreateString(input, 1000, true));
+System.out.println(doCreateString(input, 1, true));
+System.out.println(doCreateString(input, 10, true));
+System.out.println(doCreateString(input, 100, true));
+System.out.println(doCreateString(input, 200, true));
+//System.out.println(doCreateString(input, 400, true));
+//System.out.println(doCreateString(input, 800, true));
+System.out.println(doCreateString(input, 10, false));
+System.out.println(doCreateString(input, 100, false));
+System.out.println(doCreateString(input, 1000, false));
+System.out.println(doCreateString(input, 1, false));
+System.out.println(doCreateString(input, 10, false));
+System.out.println(doCreateString(input, 100, false));
+System.out.println(doCreateString(input, 200, false));
+//System.out.println(doCreateString(input, 400, 

svn commit: r1190384 - in /tomcat/trunk/test/org/apache/tomcat/util/http: TestParametersPerformance.java TesterParametersPerformance.java

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 14:59:54 2011
New Revision: 1190384

URL: http://svn.apache.org/viewvc?rev=1190384view=rev
Log:
Review comments from kkolinko

Added:

tomcat/trunk/test/org/apache/tomcat/util/http/TesterParametersPerformance.java
  - copied, changed from r1190383, 
tomcat/trunk/test/org/apache/tomcat/util/http/TestParametersPerformance.java
Removed:
tomcat/trunk/test/org/apache/tomcat/util/http/TestParametersPerformance.java

Copied: 
tomcat/trunk/test/org/apache/tomcat/util/http/TesterParametersPerformance.java 
(from r1190383, 
tomcat/trunk/test/org/apache/tomcat/util/http/TestParametersPerformance.java)
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/http/TesterParametersPerformance.java?p2=tomcat/trunk/test/org/apache/tomcat/util/http/TesterParametersPerformance.javap1=tomcat/trunk/test/org/apache/tomcat/util/http/TestParametersPerformance.javar1=1190383r2=1190384rev=1190384view=diff
==
--- 
tomcat/trunk/test/org/apache/tomcat/util/http/TestParametersPerformance.java 
(original)
+++ 
tomcat/trunk/test/org/apache/tomcat/util/http/TesterParametersPerformance.java 
Fri Oct 28 14:59:54 2011
@@ -26,7 +26,7 @@ import org.junit.Test;
 
 import org.apache.tomcat.util.buf.B2CConverter;
 
-public class TestParametersPerformance {
+public class TesterParametersPerformance {
 
 @Test
 public void testProcessParametersByteArrayIntInt() {



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



svn commit: r1190388 - /tomcat/trunk/java/org/apache/jasper/runtime/TagHandlerPool.java

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 15:07:48 2011
New Revision: 1190388

URL: http://svn.apache.org/viewvc?rev=1190388view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52091
Address performance issues related to log creation TagHandlerPool.
Patch provided by Taiki Sugawara.

Modified:
tomcat/trunk/java/org/apache/jasper/runtime/TagHandlerPool.java

Modified: tomcat/trunk/java/org/apache/jasper/runtime/TagHandlerPool.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/TagHandlerPool.java?rev=1190388r1=1190387r2=1190388view=diff
==
--- tomcat/trunk/java/org/apache/jasper/runtime/TagHandlerPool.java (original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/TagHandlerPool.java Fri Oct 28 
15:07:48 2011
@@ -38,7 +38,7 @@ public class TagHandlerPool {
 public static final String OPTION_TAGPOOL = tagpoolClassName;
 public static final String OPTION_MAXSIZE = tagpoolMaxSize;
 
-private final Log log = LogFactory.getLog(TagHandlerPool.class);
+private static final Log log = LogFactory.getLog(TagHandlerPool.class);
 
 // index of next available tag handler
 private int current;



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



svn commit: r1190389 - /tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 15:11:14 2011
New Revision: 1190389

URL: http://svn.apache.org/viewvc?rev=1190389view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52091
Address performance issues related to lock contention in StandardWrapper
Patch provided by Taiki Sugawara.

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

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java?rev=1190389r1=1190388r2=1190389view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java Fri Oct 28 
15:11:14 2011
@@ -26,6 +26,7 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Stack;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import javax.management.ListenerNotFoundException;
 import javax.management.MBeanNotificationInfo;
@@ -275,6 +276,15 @@ public class StandardWrapper extends Con
  */
 protected static Class?[] classType = new Class[]{ServletConfig.class};
 
+private final ReentrantReadWriteLock parametersLock =
+new ReentrantReadWriteLock();
+
+private final ReentrantReadWriteLock mappingsLock =
+new ReentrantReadWriteLock();
+
+private final ReentrantReadWriteLock referencesLock =
+new ReentrantReadWriteLock();
+
 
 // - Properties
 
@@ -712,8 +722,11 @@ public class StandardWrapper extends Con
 @Override
 public void addInitParameter(String name, String value) {
 
-synchronized (parameters) {
+try {
+parametersLock.writeLock().lock();
 parameters.put(name, value);
+} finally {
+parametersLock.writeLock().unlock();
 }
 fireContainerEvent(addInitParameter, name);
 
@@ -741,8 +754,11 @@ public class StandardWrapper extends Con
 @Override
 public void addMapping(String mapping) {
 
-synchronized (mappings) {
+try {
+mappingsLock.writeLock().lock();
 mappings.add(mapping);
+} finally {
+mappingsLock.writeLock().unlock();
 }
 if(parent.getState().equals(LifecycleState.STARTED))
 fireContainerEvent(ADD_MAPPING_EVENT, mapping);
@@ -760,8 +776,11 @@ public class StandardWrapper extends Con
 @Override
 public void addSecurityReference(String name, String link) {
 
-synchronized (references) {
+try {
+referencesLock.writeLock().lock();
 references.put(name, link);
+} finally {
+referencesLock.writeLock().unlock();
 }
 fireContainerEvent(addSecurityReference, name);
 
@@ -916,8 +935,11 @@ public class StandardWrapper extends Con
 @Override
 public String findInitParameter(String name) {
 
-synchronized (parameters) {
+try {
+parametersLock.readLock().lock();
 return parameters.get(name);
+} finally {
+parametersLock.readLock().unlock();
 }
 
 }
@@ -930,9 +952,12 @@ public class StandardWrapper extends Con
 @Override
 public String[] findInitParameters() {
 
-synchronized (parameters) {
+try {
+parametersLock.readLock().lock();
 String results[] = new String[parameters.size()];
 return parameters.keySet().toArray(results);
+} finally {
+parametersLock.readLock().unlock();
 }
 
 }
@@ -944,8 +969,11 @@ public class StandardWrapper extends Con
 @Override
 public String[] findMappings() {
 
-synchronized (mappings) {
+try {
+mappingsLock.readLock().lock();
 return mappings.toArray(new String[mappings.size()]);
+} finally {
+mappingsLock.readLock().unlock();
 }
 
 }
@@ -960,8 +988,11 @@ public class StandardWrapper extends Con
 @Override
 public String findSecurityReference(String name) {
 
-synchronized (references) {
+try {
+referencesLock.readLock().lock();
 return references.get(name);
+} finally {
+referencesLock.readLock().unlock();
 }
 
 }
@@ -974,9 +1005,12 @@ public class StandardWrapper extends Con
 @Override
 public String[] findSecurityReferences() {
 
-synchronized (references) {
+try {
+referencesLock.readLock().lock();
 String results[] = new String[references.size()];
 return references.keySet().toArray(results);
+} finally {
+referencesLock.readLock().unlock();
 }
 
 }
@@ -1224,8 +1258,11 @@ public 

svn commit: r1190391 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/runtime/TagHandlerPool.java webapps/docs/changelog.xml

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 15:16:07 2011
New Revision: 1190391

URL: http://svn.apache.org/viewvc?rev=1190391view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52091
Address performance issues related to log creation TagHandlerPool.
Patch provided by Taiki Sugawara.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/jasper/runtime/TagHandlerPool.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 28 15:16:07 2011
@@ -1 +1 @@
-/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187755,1187
 
775,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371
+/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187755,1187
 

svn commit: r1190392 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/StandardWrapper.java webapps/docs/changelog.xml

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 15:18:08 2011
New Revision: 1190392

URL: http://svn.apache.org/viewvc?rev=1190392view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52091
Address performance issues related to lock contention in StandardWrapper
Patch provided by Taiki Sugawara.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 28 15:18:08 2011
@@ -1 +1 @@
-/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187755,1187
 
775,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388
+/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187755,1187
 

DO NOT REPLY [Bug 52091] TagHandlerPool is slow when high concurrently

2011-10-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52091

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #3 from Mark Thomas ma...@apache.org 2011-10-28 15:16:39 UTC ---
Many thanks for the patch. It has been applied to trunk and 7.0.x and will be
in 7.0.23 onwards.

-- 
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: r1190405 - /tomcat/trunk/test/org/apache/tomcat/util/http/TesterParametersPerformance.java

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 15:51:24 2011
New Revision: 1190405

URL: http://svn.apache.org/viewvc?rev=1190405view=rev
Log:
Line endings

Modified:

tomcat/trunk/test/org/apache/tomcat/util/http/TesterParametersPerformance.java  
 (contents, props changed)

Modified: 
tomcat/trunk/test/org/apache/tomcat/util/http/TesterParametersPerformance.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/http/TesterParametersPerformance.java?rev=1190405r1=1190404r2=1190405view=diff
==
--- 
tomcat/trunk/test/org/apache/tomcat/util/http/TesterParametersPerformance.java 
(original)
+++ 
tomcat/trunk/test/org/apache/tomcat/util/http/TesterParametersPerformance.java 
Fri Oct 28 15:51:24 2011
@@ -1,133 +1,133 @@
-/*
- *  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.http;
-
-import java.io.UnsupportedEncodingException;
-import java.nio.charset.Charset;
-import java.util.logging.Level;
-import java.util.logging.LogManager;
-
-import static org.junit.Assert.assertEquals;
-import org.junit.Test;
-
-import org.apache.tomcat.util.buf.B2CConverter;
-
-public class TesterParametersPerformance {
-
-@Test
-public void testProcessParametersByteArrayIntInt() {
-LogManager.getLogManager().getLogger().setLevel(Level.OFF);
-doTestProcessParametersMultiple(foo.getBytes());
-}
-
-private void doTestProcessParametersMultiple(byte[] input) {
-System.out.println(doTestProcessParameters(input, 1));
-System.out.println(doTestProcessParameters(input, 2));
-System.out.println(doTestProcessParameters(input, 4));
-System.out.println(doTestProcessParameters(input, 8));
-System.out.println(doTestProcessParameters(input, 16));
-System.out.println(doTestProcessParameters(input, 32));
-System.out.println(doTestProcessParameters(input, 64));
-System.out.println(doTestProcessParameters(input, 128));
-}
-
-private long doTestProcessParameters(byte[] input, int size) {
-assertEquals(input.length, 3);
-
-Parameters p = new Parameters();
-
-byte[] params = createParams(input, size);
-//byte[] input = createParams(8);
-p.setEncoding(ISO-8859-1);
-long start = System.nanoTime();
-p.processParameters(params, 0, params.length);
-return System.nanoTime() - start;
-}
-
-private byte[] createParams(byte[] input, int len) {
-byte[] result = new byte[len * 4 - 1];
-
-for (int i = 0; i  len; i++) {
-result[i * 4] = input[0];
-result[i * 4 + 1] = input[1];
-result[i * 4 + 2] = input[2];
-if (i  len -1) {
-result[i * 4 + 3] = 38;
-}
-}
-return result;
-}
-
-@Test
-public void testCreateString() throws UnsupportedEncodingException {
-B2CConverter.getCharset(ISO-8859-1);
-doCreateStringMultiple(foo);
-}
-
-private void doCreateStringMultiple(String input) {
-System.out.println(doCreateString(input, 10, true));
-System.out.println(doCreateString(input, 100, true));
-System.out.println(doCreateString(input, 1000, true));
-System.out.println(doCreateString(input, 1, true));
-System.out.println(doCreateString(input, 10, true));
-System.out.println(doCreateString(input, 100, true));
-System.out.println(doCreateString(input, 200, true));
-//System.out.println(doCreateString(input, 400, true));
-//System.out.println(doCreateString(input, 800, true));
-System.out.println(doCreateString(input, 10, false));
-System.out.println(doCreateString(input, 100, false));
-System.out.println(doCreateString(input, 1000, false));
-System.out.println(doCreateString(input, 1, false));
-System.out.println(doCreateString(input, 10, false));
-System.out.println(doCreateString(input, 100, false));
-System.out.println(doCreateString(input, 200, false));
-

IDEA settings for Tomcat development?

2011-10-28 Thread Francis Galiegue
Hello list,

I understand some of you use IDEA for developing Tomcat. So do I. Can
you share your project settings (I am thinking in particular about
intention settings, code formatting, copyright etc) so that, when I'm
ready to submit a new patch, this basic stuff do not raise any
concerns?

Have fun,
-- 
Francis Galiegue, fgalie...@gmail.com
It seems obvious [...] that at least some 'business intelligence'
tools invest so much intelligence on the business side that they have
nothing left for generating SQL queries (Stéphane Faroult, in The
Art of SQL, ISBN 0-596-00894-5)

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



Re: IDEA settings for Tomcat development?

2011-10-28 Thread Konstantin Kolinko
2011/10/28 Francis Galiegue fgalie...@gmail.com:
 Hello list,

 I understand some of you use IDEA for developing Tomcat. So do I. Can
 you share your project settings (I am thinking in particular about
 intention settings, code formatting, copyright etc) so that, when I'm
 ready to submit a new patch, this basic stuff do not raise any
 concerns?

Take a look at
http://tomcat.apache.org/getinvolved.html#Coding_Conventions

Most of us use Eclipse IDE. I use Java conventions but changed to
use spaces instead of tabs. I think there would be something like that
in IDEA.

Best regards,
Konstantin Kolinko

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



Re: IDEA settings for Tomcat development?

2011-10-28 Thread Francis Galiegue
On Fri, Oct 28, 2011 at 19:25, Konstantin Kolinko
knst.koli...@gmail.com wrote:
 2011/10/28 Francis Galiegue fgalie...@gmail.com:
 Hello list,

 I understand some of you use IDEA for developing Tomcat. So do I. Can
 you share your project settings (I am thinking in particular about
 intention settings, code formatting, copyright etc) so that, when I'm
 ready to submit a new patch, this basic stuff do not raise any
 concerns?

 Take a look at
 http://tomcat.apache.org/getinvolved.html#Coding_Conventions

 Most of us use Eclipse IDE. I use Java conventions but changed to
 use spaces instead of tabs. I think there would be something like that
 in IDEA.


Yep, I have read this already. I was thinking more about intentions:
IDEA has loads of them which pertain to coding practices, I use my own
set which maybe doesn't fit the taste of core developers (for one, I
do a heavy use of the final keyword, I sometimes create variables
with a broad scope and so on).

I'll start creating a custom profile with coding style only. I was
wondering OTOH whether someone was using, for instance, the checkstyle
plugin, what its settings were and so on...

-- 
Francis Galiegue, fgalie...@gmail.com
It seems obvious [...] that at least some 'business intelligence'
tools invest so much intelligence on the business side that they have
nothing left for generating SQL queries (Stéphane Faroult, in The
Art of SQL, ISBN 0-596-00894-5)

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



Re: IDEA settings for Tomcat development?

2011-10-28 Thread Konstantin Kolinko
2011/10/28 Francis Galiegue fgalie...@gmail.com:
 On Fri, Oct 28, 2011 at 19:25, Konstantin Kolinko
 knst.koli...@gmail.com wrote:
 2011/10/28 Francis Galiegue fgalie...@gmail.com:
 Hello list,

 I understand some of you use IDEA for developing Tomcat. So do I. Can
 you share your project settings (I am thinking in particular about
 intention settings, code formatting, copyright etc) so that, when I'm
 ready to submit a new patch, this basic stuff do not raise any
 concerns?

 Take a look at
 http://tomcat.apache.org/getinvolved.html#Coding_Conventions

 Most of us use Eclipse IDE. I use Java conventions but changed to
 use spaces instead of tabs. I think there would be something like that
 in IDEA.


 Yep, I have read this already. I was thinking more about intentions:
 IDEA has loads of them which pertain to coding practices, I use my own
 set which maybe doesn't fit the taste of core developers (for one, I
 do a heavy use of the final keyword, I sometimes create variables
 with a broad scope and so on).

 I'll start creating a custom profile with coding style only. I was
 wondering OTOH whether someone was using, for instance, the checkstyle
 plugin, what its settings were and so on...


Checkstyle is used at build time. You have to add explicitly add the
following line
to build.properties to enable it:
execute.validate=true

Its settings are in res/checkstyle, but I do not know whether you can
configure your plugin the same way as the build uses it and whether it
is needed.

Another notable Eclipse plugin is Findbugs, with exception rules in res/findbugs

As for the rest - Tomcat code is 10+ years old, and comes from various
contributors. The styles can be different in different places.

Best regards,
Konstantin Kolinko

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



DO NOT REPLY [Bug 52028] Embeded Tomcat using a Connector with a random port (port 0)

2011-10-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52028

--- Comment #1 from Mark Thomas ma...@apache.org 2011-10-28 17:52:55 UTC ---
Created attachment 27861
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=27861
v1 patch for discussion

I have started to look at this and it looks doable. port=0 works for all
connectors for 64-bit Windows.

The problem is with MBean names, JMX MBean registration and logging info.

The port number is not available at the point where the JMX registration
occurs. If bindOnInit=false, the port number may change multiple times during
the life of the connector.

With multiple connectors using port=0 there will be a naming clash as the
connectors need to be registered before the the ports are known.

I see two options.

1. Use auto-1, auto-2 instead of the port number in the JMX names (with a
static, thread-safe counter).

2. Re-register the connector and related components when the port number
changes.

I'm leaning towards one as it is a heck of a lot simpler.

Thoughts?

-- 
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: r1190474 - /tomcat/trunk/java/org/apache/catalina/connector/mbeans-descriptors.xml

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 17:54:38 2011
New Revision: 1190474

URL: http://svn.apache.org/viewvc?rev=1190474view=rev
Log:
This is not AJP specific

Modified:
tomcat/trunk/java/org/apache/catalina/connector/mbeans-descriptors.xml

Modified: tomcat/trunk/java/org/apache/catalina/connector/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/mbeans-descriptors.xml?rev=1190474r1=1190473r2=1190474view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/mbeans-descriptors.xml 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/mbeans-descriptors.xml Fri 
Oct 28 17:54:38 2011
@@ -108,7 +108,7 @@
  type=int/
 
 attribute   name=port
-  description=The port number on which we listen for ajp13 requests
+  description=The port number on which we listen for requests
 type=int/
 
 !-- Common --



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



svn commit: r1190476 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/connector/mbeans-descriptors.xml

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 17:58:47 2011
New Revision: 1190476

URL: http://svn.apache.org/viewvc?rev=1190476view=rev
Log:
This is not AJP specific

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/mbeans-descriptors.xml

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 28 17:58:47 2011
@@ -1 +1 @@
-/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187755,1187
 
775,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389
+/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187755,1187
 
775,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474

Modified: 

svn commit: r1190481 - /tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 18:11:44 2011
New Revision: 1190481

URL: http://svn.apache.org/viewvc?rev=1190481view=rev
Log:
Fix NPE in parameter re-factoring identified by JSP TCK.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java?rev=1190481r1=1190480r2=1190481view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java Fri Oct 28 
18:11:44 2011
@@ -122,6 +122,9 @@ public final class Parameters {
 handleQueryParameters();
 // no facade
 ArrayListString values = paramHashValues.get(name);
+if (values == null) {
+return null;
+}
 return values.toArray(new String[values.size()]);
 }
 



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



svn commit: r1190482 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/http/Parameters.java

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 18:12:54 2011
New Revision: 1190482

URL: http://svn.apache.org/viewvc?rev=1190482view=rev
Log:
Fix NPE in parameter re-factoring identified by JSP TCK.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/Parameters.java

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 28 18:12:54 2011
@@ -1 +1 @@
-/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187755,1187
 
775,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474
+/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 
,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187755,1187
 
775,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474,1190481

Modified: 

Improving problem reporting

2011-10-28 Thread Chris Dailey

PROBLEM DESCRIPTION:

I have an exception (appended below), and I think it would be nice to 
have more information about what is going on.


If I had more context, it would help me find the cause of my problem 
much more quickly.  For example, if the exception indicated what the 
file/resource that was having the problem was, it would speed up 
troubleshooting immensely.


HOW TO REPRODUCE:

In a JAR file contained in WAR file's WEB-INF/lib folder:  Change the 
MANIFEST.MF file in the JAR file.  Put in a line with ONLY 
Class-Path:.  Note there is no space after the period, which is what 
causes the error.  During load of the application, the exception which I 
have appended at the end of this message will show up.


SUGGESTED IMPROVEMENT:

My suggestion would be to modify 
ExtensionValidator.validateApplication(...), around line 195.  This is 
the location that actually knows about what the resource is.  It would 
be nice if the IOException was caught, and information about the 
Resource was added to the exception, probably by wrapping the exception.


Because I have not gone through the overhead of getting a version of 
Tomcat running from source, these changes have not been compiled and 
tested, but I think the suggestion is relatively straight-forward.


Here are the suggested code changes:

First code change - move the definition of resource outside of the 
try/catch:


// Locate the Manifests for all bundled JARs
Resource resource = null; // ADDED
NamingEnumerationBinding ne = null;

Second code change - make the existing declaration of resource just an 
assignment:


resource = (Resource) obj; // MODIFIED
inputStream = resource.streamContent();
Manifest jmanifest = getManifest(inputStream);

Third code change: add a catch clause and re-throw:

} catch (NamingException nex) {
// Jump out of the check for this application because it
// has no resources
} catch (IOException ioex) { // ADDED
throw new IOException(validation problem in  + 
resource.toString(), ioex); // ADDED

} finally {

The problem is that the resource may not have a proper toString().  I 
would suggest changing FileDirContext:898 (inner class=FileResource) to 
have a toString method, something along the lines of:


public String toString() { // ADDED
return file == null ? null : file.toString(); // ADDED
} // ADDED

Finally, here's the exception:

28-Oct-2011 11:03:03 AM org.apache.catalina.core.StandardContext 
startInternal

SEVERE: Error in dependencyCheck
java.io.IOException: invalid header field
at java.util.jar.Attributes.read(Attributes.java:410)
at java.util.jar.Manifest.read(Manifest.java:199)
at java.util.jar.JarInputStream.init(JarInputStream.java:83)
at java.util.jar.JarInputStream.init(JarInputStream.java:60)
at 
org.apache.catalina.util.ExtensionValidator.getManifest(ExtensionValidator.java:394)
at 
org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:195)
at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5037)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
at 
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
at 
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
at 
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
at 
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
at 
org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
at 
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
at org.apache.catalina.startup.Catalina.start(Catalina.java:621)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)

(And if only java.util.jar.Attributes.read reported WHICH attribute had 
the problem, we'd really be in business.)


Regards,
Chris

--
The Time Is The Time!
Daylight Savings Time wastes energy and money


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

svn commit: r1190593 - /tomcat/tc6.0.x/trunk/STATUS.txt

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 21:33:54 2011
New Revision: 1190593

URL: http://svn.apache.org/viewvc?rev=1190593view=rev
Log:
Additional patch

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1190593r1=1190592r2=1190593view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Oct 28 21:33:54 2011
@@ -116,6 +116,7 @@ PATCHES PROPOSED TO BACKPORT:
 
 * Improve performance of parameter processing.
   http://people.apache.org/~markt/patches/2011-10-27-param-perf-tc6-v1.patch
+  http://svn.apache.org/viewvc?rev=1190481view=rev - fixes NPE
   +1: markt
   -1:
 



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



svn commit: r1190595 - /tomcat/tc5.5.x/trunk/STATUS.txt

2011-10-28 Thread markt
Author: markt
Date: Fri Oct 28 21:34:27 2011
New Revision: 1190595

URL: http://svn.apache.org/viewvc?rev=1190595view=rev
Log:
Additional patch

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=1190595r1=1190594r2=1190595view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Fri Oct 28 21:34:27 2011
@@ -70,6 +70,7 @@ PATCHES PROPOSED TO BACKPORT:
 
 * Improve performance of parameter processing
   http://people.apache.org/~markt/patches/2011-10-27-param-perf-tc5-v1.patch
+  http://svn.apache.org/viewvc?rev=1190481view=rev
   +1: markt
   -1:
 



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



DO NOT REPLY [Bug 41227] When the jasper compiler fails to compile a JSP, it doesn't print the name of the file

2011-10-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=41227

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||WORKSFORME

--- Comment #3 from Mark Thomas ma...@apache.org 2011-10-28 21:56:41 UTC ---
With the latest 5.5.x and latest trunk (so I assume 6.0.x and 7.0.x are the
same) an invalid JSP triggers a stack trace that names the broken file and the
point where the error occurs. A JSP the can be converted to a .java file but
then fails to compile reports an error that includes the java class name which
is sufficient to identify the source of the error.

-- 
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: Improving problem reporting

2011-10-28 Thread Konstantin Kolinko
2011/10/28 Chris Dailey mo...@intranet.org:
 PROBLEM DESCRIPTION:

 I have an exception (appended below), and I think it would be nice to have
 more information about what is going on.

 If I had more context, it would help me find the cause of my problem much
 more quickly.  For example, if the exception indicated what the
 file/resource that was having the problem was, it would speed up
 troubleshooting immensely.

 HOW TO REPRODUCE:

 In a JAR file contained in WAR file's WEB-INF/lib folder:  Change the
 MANIFEST.MF file in the JAR file.  Put in a line with ONLY Class-Path:.
  Note there is no space after the period, which is what causes the error.
  During load of the application, the exception which I have appended at the
 end of this message will show up.

 SUGGESTED IMPROVEMENT:

 My suggestion would be to modify
 ExtensionValidator.validateApplication(...), around line 195.  This is the
 location that actually knows about what the resource is.  It would be nice
 if the IOException was caught, and information about the Resource was added
 to the exception, probably by wrapping the exception.

 Because I have not gone through the overhead of getting a version of Tomcat
 running from source, these changes have not been compiled and tested, but I
 think the suggestion is relatively straight-forward.

 Here are the suggested code changes:

 First code change - move the definition of resource outside of the
 try/catch:

        // Locate the Manifests for all bundled JARs
        Resource resource = null; // ADDED
        NamingEnumerationBinding ne = null;

 Second code change - make the existing declaration of resource just an
 assignment:

                resource = (Resource) obj; // MODIFIED
                inputStream = resource.streamContent();
                Manifest jmanifest = getManifest(inputStream);

 Third code change: add a catch clause and re-throw:

        } catch (NamingException nex) {
            // Jump out of the check for this application because it
            // has no resources
        } catch (IOException ioex) { // ADDED
            throw new IOException(validation problem in  +
 resource.toString(), ioex); // ADDED
        } finally {

 The problem is that the resource may not have a proper toString().  I would
 suggest changing FileDirContext:898 (inner class=FileResource) to have a
 toString method, something along the lines of:

        public String toString() { // ADDED
            return file == null ? null : file.toString(); // ADDED
        } // ADDED

 Finally, here's the exception:

 28-Oct-2011 11:03:03 AM org.apache.catalina.core.StandardContext
 startInternal
 SEVERE: Error in dependencyCheck
 java.io.IOException: invalid header field
    at java.util.jar.Attributes.read(Attributes.java:410)
    at java.util.jar.Manifest.read(Manifest.java:199)
    at java.util.jar.JarInputStream.init(JarInputStream.java:83)
    at java.util.jar.JarInputStream.init(JarInputStream.java:60)
    at
 org.apache.catalina.util.ExtensionValidator.getManifest(ExtensionValidator.java:394)
    at
 org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:195)
    at
 org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5037)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
    at
 org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
    at
 org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
    at
 org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
    at
 org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
    at
 org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
    at
 org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:621)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)

 (And if only java.util.jar.Attributes.read reported WHICH attribute had the
 problem, we'd really be in business.)


Not sure about FileResource.toString(), but adding a catch for
IOException looks like doable.

Please file an enhancement issue in Bugzilla.

Best regards,
Konstantin Kolinko


DO NOT REPLY [Bug 45871] Support for salted and digested patches in DataSourceRealm

2011-10-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45871

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE

--- Comment #2 from Mark Thomas ma...@apache.org 2011-10-28 22:14:06 UTC ---
The duplicate has a more complete (covers more realms) and less invasive
(doesn't require an additional column) patch.

*** This bug has been marked as a duplicate of bug 51966 ***

-- 
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 51966] Tomcat does not support ssha hashed passwords in all contexts

2011-10-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51966

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 CC||brand...@alum.mit.edu

--- Comment #6 from Mark Thomas ma...@apache.org 2011-10-28 22:14:06 UTC ---
*** Bug 45871 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



svn commit: r1190634 - /tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

2011-10-28 Thread kkolinko
Author: kkolinko
Date: Fri Oct 28 22:22:59 2011
New Revision: 1190634

URL: http://svn.apache.org/viewvc?rev=1190634view=rev
Log:
Add bug number for r1190194
Add linewrap in a long name

Modified:
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1190634r1=1190633r2=1190634view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Oct 28 22:22:59 2011
@@ -56,6 +56,12 @@
 section name=Tomcat 7.0.23 (markt)
   subsection name=Catalina
 changelog
+  add
+bug46264/bug: Add the ability to start and stop containers
+(primarily Contexts) using a thread pool rather than a single thread.
+This can significantly improve start and stop time. Based on patches
+by Joe Kislo and Felix Schumacher. (markt)
+  /add
   fix
 bug51910/bug: Prevent NPE on connector stop if Comet applications
 are being used without the CometConnectionManagerValve. (markt)
@@ -146,12 +152,6 @@
 Also add an option to limit the maximum number of parameters processed
 per request. This defaults to 1. (markt)
   /add
-  add
-Add the ability to start and stop containers (primarily Contexts) using
-a thread pool rather than a single thread. This can significantly
-improve start and stop time. Based on patches by Joe Kislo and Felix
-Schumacher. (markt)
-  /add
   fix
 bug51744/bug: Throw the correct exception if an application 
attempts
 to modify the associated JNDI context. (markt)
@@ -224,7 +224,8 @@
 Work around a a href=http://bugs.sun.com/view_bug.do?bug_id=6427854;
 known JVM bug/a that is fixed in 1.7.0_01 but still present in
 1.6.0_29 and was triggering intermittent unit test failures for
-
codeorg.apache.catalina.tribes.group.TestGroupChannelMemberArrival.testMemberArrival/code.
+codeorg.apache.catalina.tribes.group.
+TestGroupChannelMemberArrival.testMemberArrival/code.
 The bug affects any components that use NIO although it was more likely
 to be observed in the clustering module than the HTTP or AJP NIO
 connector. (markt) 



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



DO NOT REPLY [Bug 52091] TagHandlerPool is slow when high concurrently

2011-10-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52091

--- Comment #4 from Konstantin Kolinko knst.koli...@gmail.com 2011-10-28 
22:55:06 UTC ---
Created attachment 27862
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=27862
2011-10-29_tc6_52091_StandardWrapper.patch

TC6 patch for StandardWrapper - backport of r1190389

-- 
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: r1190655 - /tomcat/tc6.0.x/trunk/STATUS.txt

2011-10-28 Thread kkolinko
Author: kkolinko
Date: Fri Oct 28 22:58:59 2011
New Revision: 1190655

URL: http://svn.apache.org/viewvc?rev=1190655view=rev
Log:
proposals and add one more patch to Mark's proposal. Not voting yet.

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1190655r1=1190654r2=1190655view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Oct 28 22:58:59 2011
@@ -117,9 +117,26 @@ PATCHES PROPOSED TO BACKPORT:
 * Improve performance of parameter processing.
   http://people.apache.org/~markt/patches/2011-10-27-param-perf-tc6-v1.patch
   http://svn.apache.org/viewvc?rev=1190481view=rev - fixes NPE
+  http://svn.apache.org/viewvc?rev=1190371view=rev - make 
ByteChunk.DEFAULT_CHARSET final
   +1: markt
   -1:
 
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52091
+  Address performance issues related to log creation TagHandlerPool.
+  Patch provided by Taiki Sugawara.
+  http://svn.apache.org/viewvc?rev=1190388view=rev
+  (r1190391 in TC7)
+  +1: kkolinko
+  -1:
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52091
+  Address performance issues related to lock contention in StandardWrapper
+  Patch provided by Taiki Sugawara.
+  https://issues.apache.org/bugzilla/attachment.cgi?id=27862
+  (r1190389 in trunk, r1190392 in TC7)
+  +1: kkolinko
+  -1:
+
 
 PATCHES/ISSUES THAT ARE STALLED
 



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



svn commit: r1190720 - /tomcat/tc5.5.x/trunk/STATUS.txt

2011-10-28 Thread kkolinko
Author: kkolinko
Date: Sat Oct 29 00:55:28 2011
New Revision: 1190720

URL: http://svn.apache.org/viewvc?rev=1190720view=rev
Log:
Add one more patch to Mark's proposal.
Veto and add review comments.

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=1190720r1=1190719r2=1190720view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Sat Oct 29 00:55:28 2011
@@ -70,7 +70,56 @@ PATCHES PROPOSED TO BACKPORT:
 
 * Improve performance of parameter processing
   http://people.apache.org/~markt/patches/2011-10-27-param-perf-tc5-v1.patch
-  http://svn.apache.org/viewvc?rev=1190481view=rev
+  http://svn.apache.org/viewvc?rev=1190481view=rev - fixes NPE
+  http://svn.apache.org/viewvc?rev=1190371view=rev - make 
ByteChunk.DEFAULT_CHARSET final
   +1: markt
-  -1:
+  -1: kkolinko: because of ByteChunk#toStringInternal(), see below.
 
+  kkolinko: In B2CConverter.java
+lines 117-118: restore Javadoc comment to method void convert( ByteChunk 
bb, CharChunk cb, int limit) 
+line 125 - remove // conv.ready() ) { comment. It wasn't in 5.5. Do not 
see why to add it.
+   In ByteChunk.java:
+in toStringInternal():
+  cb.array() returns character array that backs this CharBuffer.
+  I think it can contain extra characters beyond end of decoded string.
+  Thus new String(cb.array()); is wrong.
+  Single-character charsets are simple, because the count of characters
+  is known from the count of bytes. Needs more testing with UTF-8.
+  - thus -1.
+   In Parameters.java:
+private static org.apache.commons.logging.Log log
+  - make static final
+StringManager.getManager(org.apache.tomcat.util.http);
+  - the LocalStrings.properties file from r1189882 is not included in this 
patch.
+(2011-10-27-param-perf-tc6-v1.patch does not have it as well)
+private final Hashtable paramHashValues
+  - Maybe a HashMap can be used instead. I do not expect much improvements
+from that though.
+in #addParameterValues(..)
+  - Replace values = new ArrayList(1);
+withvalues = new ArrayList(newValues.length);
+  - Maybe if (paramHashValues.containsKey(key)) can be replaced
+with testing whether result of (paramHashValues.containsKey(key)) is 
null.
+  - Maybe add tests for this method. In trunk it is called by 
Request.parseParts(), though see below maybe that can be changed.
+in #getParameterValues(String name)
+  - Apply NPE fix from http://svn.apache.org/viewvc?rev=1190481view=rev
+  - Maybe add test case in TestParameters.java for calling 
getParameterValues() for non-existing parameter.
+in #addParam(String, String)
+  - remove efficiency comment above the method?
+  - In trunk: maybe make this method public and call it instead of 
#addParameterValues(..)
+ in Request.parseParts().
+  - Maybe if (paramHashValues.containsKey(key)) can be replaced
+with testing whether result of (paramHashValues.containsKey(key)) is 
null.
+public static final String DEFAULT_ENCODING
+public static final Charset DEFAULT_CHARSET
+  - New fields. They can be made private.
+in #processParameters(..., Charset)
+  - It is a new method. Maybe make it private.
+  - If it remains public, maybe document that charset parameter is not 
null.
+All callers here call Parameters.getCharset(encoding) which returns 
DEFAULT_CHARSET by default.
+in #urlDecode(...)
+  - Maybe call bc.setCharset(charset); before calling 
urlDec.convert(bc);
+in #paramsAsString()
+  - Move sb.append(\n); outside of loop that iterates on values. Those 
are separated by ','.
+In the old code the \n is used to separate different parameter names.
+  - Replace double quotes with single quotes where it is a single 
character ('=', ',', '\n')



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



[Tomcat Wiki] Trivial Update of HowTo by newacct

2011-10-28 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Tomcat Wiki for change 
notification.

The HowTo page has been changed by newacct:
http://wiki.apache.org/tomcat/HowTo?action=diffrev1=114rev2=115

  }
  catch(Exception e)
  {
- out.println(e.toString());
+ out.println(e);
  }
  
  // Restore original STDOUT and STDERR
@@ -986, +986 @@

  
  ArrayListMBeanServer mbservers = 
MBeanServerFactory.findMBeanServer(null);
  System.out.println(** TOMCAT'S LIST OF REGISTERED MBEANSERVERS 
** );
- System.out.println(mbservers.toString());
+ System.out.println(mbservers);
  
  System.out.println(** TRYING TO RETRIEVE MY OWN MBEANSERVER FROM 
ITS AgentId ** );
  ArrayListMBeanServer mbservers_2 = 
MBeanServerFactory.findMBeanServer(myMBServer);
- System.out.println(mbservers_2.toString());
+ System.out.println(mbservers_2);
  
  
  if (mbservers.size()  0) {

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