svn commit: r719549 - /tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java

2008-11-21 Thread markt
Author: markt
Date: Fri Nov 21 01:33:44 2008
New Revision: 719549

URL: http://svn.apache.org/viewvc?rev=719549&view=rev
Log:
Clean up
Replace deprecated method calls

Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=719549&r1=719548&r2=719549&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Fri Nov 
21 01:33:44 2008
@@ -258,9 +258,9 @@
 if (request == null) {
 
 // Create objects
-request = (Request) connector.createRequest();
+request = connector.createRequest();
 request.setCoyoteRequest(req);
-response = (Response) connector.createResponse();
+response = connector.createResponse();
 response.setCoyoteResponse(res);
 
 // Link objects
@@ -319,7 +319,7 @@
 }
 
 } catch (IOException e) {
-;
+// Ignore
 } catch (Throwable t) {
 log.error(sm.getString("coyoteAdapter.service"), t);
 } finally {
@@ -626,7 +626,7 @@
 }
 if (conv != null) {
 try {
-conv.convert(bc, cc);
+conv.convert(bc, cc, cc.getBuffer().length - cc.getEnd());
 uri.setChars(cc.getBuffer(), cc.getStart(), 
  cc.getLength());
 return;



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r719550 - in /tomcat/trunk/java/org/apache/tomcat/util: IntrospectionUtils.java buf/B2CConverter.java buf/MessageBytes.java

2008-11-21 Thread markt
Author: markt
Date: Fri Nov 21 01:36:09 2008
New Revision: 719550

URL: http://svn.apache.org/viewvc?rev=719550&view=rev
Log:
Make private / remove deprecated methods

Modified:
tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java?rev=719550&r1=719549&r2=719550&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java Fri Nov 21 
01:36:09 2008
@@ -470,25 +470,9 @@
 
 /**
  * Replace ${NAME} with the property value
- * 
- * @deprecated Use the explicit method
- */
-public static String replaceProperties(String value, Object getter) {
-if (getter instanceof Hashtable)
-return replaceProperties(value, (Hashtable) getter, null);
-
-if (getter instanceof PropertySource) {
-PropertySource src[] = new PropertySource[] { (PropertySource) 
getter };
-return replaceProperties(value, null, src);
-}
-return value;
-}
-
-/**
- * Replace ${NAME} with the property value
  */
-public static String replaceProperties(String value, Hashtable staticProp,
-PropertySource dynamicProp[]) {
+public static String replaceProperties(String value,
+Hashtable staticProp, PropertySource dynamicProp[]) 
{
 if (value.indexOf("$") < 0) {
 return value;
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java?rev=719550&r1=719549&r2=719550&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java Fri Nov 21 
01:36:09 2008
@@ -67,17 +67,6 @@
 static final int BUFFER_SIZE=8192;
 char result[]=new char[BUFFER_SIZE];
 
-/** Convert a buffer of bytes into a chars
- * @deprecated
- */
-public  void convert( ByteChunk bb, CharChunk cb )
-throws IOException
-{
-// Set the ByteChunk as input to the Intermediate reader
-convert(bb, cb, cb.getBuffer().length - cb.getEnd());
-}
-
-
 public void convert( ByteChunk bb, CharChunk cb, int limit) 
 throws IOException
 {

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java?rev=719550&r1=719549&r2=719550&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java Fri Nov 21 
01:36:09 2008
@@ -68,10 +68,10 @@
 
 /**
  * Creates a new, uninitialized MessageBytes object.
- * @deprecated Use static newInstance() in order to allow
+ * Use static newInstance() in order to allow
  *   future hooks.
  */
-public MessageBytes() {
+private MessageBytes() {
 }
 
 /** Construct a new MessageBytes instance



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r719551 - in /tomcat/trunk: java/org/apache/catalina/startup/ java/org/apache/tomcat/util/digester/ webapps/docs/

2008-11-21 Thread markt
Author: markt
Date: Fri Nov 21 01:45:31 2008
New Revision: 719551

URL: http://svn.apache.org/viewvc?rev=719551&view=rev
Log:
Remove deprecated code in connector (it was this bit that broke the build 
previously).
Modify all classes that overrode deprecated methods to override the new methods.
Add a note to the change log about backwards compatibility or lack thereof.

Modified:
tomcat/trunk/java/org/apache/catalina/startup/ConnectorCreateRule.java
tomcat/trunk/java/org/apache/catalina/startup/SetNextNamingRule.java
tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java
tomcat/trunk/java/org/apache/tomcat/util/digester/AbstractRulesImpl.java
tomcat/trunk/java/org/apache/tomcat/util/digester/CallMethodRule.java
tomcat/trunk/java/org/apache/tomcat/util/digester/CallParamRule.java
tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java
tomcat/trunk/java/org/apache/tomcat/util/digester/FactoryCreateRule.java
tomcat/trunk/java/org/apache/tomcat/util/digester/NodeCreateRule.java
tomcat/trunk/java/org/apache/tomcat/util/digester/ObjectCreateRule.java
tomcat/trunk/java/org/apache/tomcat/util/digester/Rule.java
tomcat/trunk/java/org/apache/tomcat/util/digester/Rules.java
tomcat/trunk/java/org/apache/tomcat/util/digester/SetNextRule.java
tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertiesRule.java
tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertyRule.java
tomcat/trunk/java/org/apache/tomcat/util/digester/SetRootRule.java
tomcat/trunk/java/org/apache/tomcat/util/digester/SetTopRule.java

tomcat/trunk/java/org/apache/tomcat/util/digester/WithDefaultsRulesWrapper.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/startup/ConnectorCreateRule.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ConnectorCreateRule.java?rev=719551&r1=719550&r2=719551&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/ConnectorCreateRule.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ConnectorCreateRule.java Fri 
Nov 21 01:45:31 2008
@@ -44,9 +44,15 @@
 /**
  * Process the beginning of this element.
  *
- * @param attributes The attribute list of this element
+ * @param namespace the namespace URI of the matching element, or an 
+ *   empty string if the parser is not namespace aware or the element has
+ *   no namespace
+ * @param name the local name if the parser is namespace aware, or just 
+ *   the element name otherwise
+ * @param attributes The attribute list for this element
  */
-public void begin(Attributes attributes) throws Exception {
+public void begin(String namespace, String name, Attributes attributes)
+throws Exception {
 Service svc = (Service)digester.peek();
 Executor ex = null;
 if ( attributes.getValue("executor")!=null ) {
@@ -70,8 +76,14 @@
 
 /**
  * Process the end of this element.
+ * 
+ * @param namespace the namespace URI of the matching element, or an 
+ *   empty string if the parser is not namespace aware or the element has
+ *   no namespace
+ * @param name the local name if the parser is namespace aware, or just 
+ *   the element name otherwise
  */
-public void end() throws Exception {
+public void end(String namespace, String name) throws Exception {
 Object top = digester.pop();
 }
 

Modified: tomcat/trunk/java/org/apache/catalina/startup/SetNextNamingRule.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/SetNextNamingRule.java?rev=719551&r1=719550&r2=719551&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/SetNextNamingRule.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/startup/SetNextNamingRule.java Fri 
Nov 21 01:45:31 2008
@@ -80,8 +80,14 @@
 
 /**
  * Process the end of this element.
+ * 
+ * @param namespace the namespace URI of the matching element, or an 
+ *   empty string if the parser is not namespace aware or the element has
+ *   no namespace
+ * @param name the local name if the parser is namespace aware, or just 
+ *   the element name otherwise
  */
-public void end() throws Exception {
+public void end(String namespace, String name) throws Exception {
 
 // Identify the objects to be used
 Object child = digester.peek(0);

Modified: tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java?rev=719551&r1=719550&r2=719551&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/

Re: svn commit: r719551 - in /tomcat/trunk: java/org/apache/catalina/startup/ java/org/apache/tomcat/util/digester/ webapps/docs/

2008-11-21 Thread Mark Thomas
[EMAIL PROTECTED] wrote:
> Remove deprecated code in connector (it was this bit that broke the build 
> previously).
My bad - that is digester. I'll update the comment when I get a chance.

Mark



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46255] New: ThreadDeath must be rethrown if caught

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46255

   Summary: ThreadDeath must be rethrown if caught
   Product: Tomcat 6
   Version: unspecified
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: major
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: [EMAIL PROTECTED]


The following classes catch Throwable, but fail to rethrow ThreadDeath.

org.apache.catalina.ant.jmx.JMXAccessorQueryTask
org.apache.catalina.ant.AbstractCatalinaTask
org.apache.catalina.ant.ValidatorTask
org.apache.catalina.authenticator.FormAuthenticator
org.apache.catalina.connector.Connector
org.apache.catalina.connector.CoyoteAdapter
org.apache.catalina.connector.MapperListener
org.apache.catalina.connector.Request
There are lots of others ... just search for "catch (Throwable"

or search for "catch (Error" - this only shows one problem, in
org.apache.tomcat.util.net.AprEndpoint#allocatePoller()

ThreadDeath should never be ignored.

org.apache.catalina.core.ApplicationContextFacade#doPrivileged() rethrows all
throwables as RuntimeException; it should not wrap ThreadDeath in this way.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [VOTE] Release build 4.1.39

2008-11-21 Thread Rainer Jung
Mark Thomas schrieb:
> sebb wrote:
>> On 19/11/2008, Mark Thomas <[EMAIL PROTECTED]> wrote:
>>> sebb wrote:
>>>  > I meant where to find the tag directory for the release 4.1.39.
>>>
>>>
>>> It is in your inbox. Look at the svn commit messages.
>> Which all seem to be against trunk, i.e. not a tag.
> 
> I meant the commits to create the tags.

r718561 - r718564:

tomcat/container/tags/tc4.1.x/TOMCAT_4_1_39/
  copied from r718560,
  tomcat/container/branches/tc4.1.x/
tomcat/connectors/tags/tc4.1.x/TOMCAT_4_1_39/
  copied from r718561,
  tomcat/connectors/trunk/
tomcat/jasper/tags/tc4.1.x/TOMCAT_4_1_39/
  copied from r718562,
  tomcat/jasper/branches/tc4.1.x/
tomcat/servletapi/tags/servlet2.3-jsp1.2-tc4.x/TOMCAT_4_1_39/
  copied from r718563,
  tomcat/servletapi/branches/servlet2.3-jsp1.2-tc4.x/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46258] New: BUILDING.txt has incorrect download location

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46258

   Summary: BUILDING.txt has incorrect download location
   Product: Tomcat 4
   Version: Unknown
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: [EMAIL PROTECTED]


http://tomcat.apache.org/tomcat-4.1-doc/BUILDING.txt says to get BeanUtils from

http://jakarta.apache.org/site/downloads/downloads_commons-beanutils.cgi

However, that should now be:

http://commons.apache.org/downloads/download_beanutils.cgi

Similarly for other Commons jars such as:
http://jakarta.apache.org/site/downloads/downloads_commons-collections.cgi
http://jakarta.apache.org/site/downloads/downloads_commons-digester.cgi
http://jakarta.apache.org/site/downloads/downloads_commons-fileupload.cgi
http://jakarta.apache.org/site/downloads/downloads_commons-logging.cgi
http://jakarta.apache.org/site/downloads/downloads_commons-modeler.cgi


Also, Step 1 says to download JDK 1.4, yet several subsequent steps mention
jars that are only needed for JDK 1.3. 

These redundant steps could be removed - or at least it would help if the
phrase

"* This is optional with JDK 1.4 or later."

were listed as the first bullet point.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r719602 - in /tomcat/trunk/java/org/apache: catalina/core/StandardThreadExecutor.java tomcat/util/net/AprEndpoint.java tomcat/util/net/JIoEndpoint.java tomcat/util/net/NioEndpoint.java

2008-11-21 Thread markt
Author: markt
Date: Fri Nov 21 07:46:12 2008
New Revision: 719602

URL: http://svn.apache.org/viewvc?rev=719602&view=rev
Log:
Make size of all threads pools dynamically configurable

Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java?rev=719602&r1=719601&r2=719602&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java Fri 
Nov 21 07:46:12 2008
@@ -130,14 +130,23 @@
 
 public void setMaxIdleTime(int maxIdleTime) {
 this.maxIdleTime = maxIdleTime;
+if (executor != null) {
+executor.setKeepAliveTime(maxIdleTime, TimeUnit.MILLISECONDS);
+}
 }
 
 public void setMaxThreads(int maxThreads) {
 this.maxThreads = maxThreads;
+if (executor != null) {
+executor.setMaximumPoolSize(maxThreads);
+}
 }
 
 public void setMinSpareThreads(int minSpareThreads) {
 this.minSpareThreads = minSpareThreads;
+if (executor != null) {
+executor.setCorePoolSize(minSpareThreads);
+}
 }
 
 public void setName(String name) {

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=719602&r1=719601&r2=719602&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Fri Nov 21 
07:46:12 2008
@@ -36,6 +36,7 @@
 import org.apache.tomcat.jni.SSLSocket;
 import org.apache.tomcat.jni.Socket;
 import org.apache.tomcat.jni.Status;
+import org.apache.tomcat.util.net.JIoEndpoint.Worker;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
@@ -179,7 +180,14 @@
  * Maximum amount of worker threads.
  */
 protected int maxThreads = 200;
-public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; }
+public void setMaxThreads(int maxThreads) {
+this.maxThreads = maxThreads;
+if (running) {
+synchronized(workers) {
+workers.resize(maxThreads);
+}
+}
+}
 public int getMaxThreads() { return maxThreads; }
 
 
@@ -1883,12 +1891,18 @@
 }
 
 /** 
- * Put the object into the queue.
+ * Put the object into the queue. If the queue is full (for example if
+ * the queue has been reduced in size) the object will be dropped.
  * 
- * @param   object  the object to be appended to the queue (first 
element). 
+ * @param   object  the object to be appended to the queue (first
+ *  element).
  */
 public void push(Worker worker) {
-workers[end++] = worker;
+if (end < workers.length) {
+workers[end++] = worker;
+} else {
+curThreads--;
+}
 }
 
 /**
@@ -1923,6 +1937,22 @@
 public int size() {
 return (end);
 }
+
+/**
+ * Resize the queue. If there are too many objects in the queue for the
+ * new size, drop the excess.
+ * 
+ * @param newSize
+ */
+public void resize(int newSize) {
+Worker[] newWorkers = new Worker[newSize];
+int len = workers.length;
+if (newSize < len) {
+len = newSize;
+}
+System.arraycopy(workers, 0, newWorkers, 0, len);
+workers = newWorkers;
+}
 }
 
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=719602&r1=719601&r2=719602&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java Fri Nov 21 
07:46:12 2008
@@ -174,7 +174,14 @@
  * Maximum amount of worker threads.
  */
 protected int maxThreads = 200;
-public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; }
+public void setMaxThreads(int maxThreads) {
+this.maxThreads = maxThreads;
+if (running) {
+sync

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

2008-11-21 Thread markt
Author: markt
Date: Fri Nov 21 07:49:35 2008
New Revision: 719605

URL: http://svn.apache.org/viewvc?rev=719605&view=rev
Log:
Propose dynamic tp sizing

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=719605&r1=719604&r2=719605&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Nov 21 07:49:35 2008
@@ -244,3 +244,8 @@
   http://svn.apache.org/viewvc?rev=719129&view=rev
   +1: fhanik
   -1: 
+
+* Make thread pool limits dynamically configurable
+  http://svn.apache.org/viewvc?rev=719602&view=rev
+  +1: markt
+  -1: 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r719626 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2008-11-21 Thread fhanik
Author: fhanik
Date: Fri Nov 21 08:31:45 2008
New Revision: 719626

URL: http://svn.apache.org/viewvc?rev=719626&view=rev
Log:
Fix dynamic thread resizing

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=719626&r1=719625&r2=719626&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Fri Nov 21 
08:31:45 2008
@@ -354,8 +354,14 @@
 public void setMaxThreads(int maxThreads) {
 this.maxThreads = maxThreads;
 if (running) {
-synchronized(workers) {
-workers.resize(maxThreads);
+if (getUseExecutor() && executor!=null) {
+if (executor instanceof ThreadPoolExecutor) {
+
((ThreadPoolExecutor)executor).setMaximumPoolSize(maxThreads);
+}
+}else if (workers!=null){
+synchronized(workers) {
+workers.resize(maxThreads);
+}
 }
 }
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46261] New: Context with %2F in name causes tomcat crash on shutdown

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46261

   Summary: Context with %2F in name causes tomcat crash on shutdown
   Product: Tomcat 6
   Version: 6.0.18
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: [EMAIL PROTECTED]


Context with %2F in name causes tomcat crash on shutdown

Several years ago I worked on integrating tomcat 5.5 into our web application
management infrastructure.  During the process I fixed several tomcat 5.5 bugs,
but apparently never sent the fixes upstream.  Oops.

Our application needs to be deployed to create a URL that looks like this:

/product/customername/servlet

I worked with several people on IRC to get tomcat5.5 to do this.  We had
previously been using the path= parameter in the context xml file element with
tomcat 4.1.  Unfortunately, it appears this feature was removed from tomcat5.5,
and tomcat5.5 does not recurse into subdirectories when reading .xml context
files.  The recommendation on IRC (after several suggestions which would not
work for our environment) was to put %2F in the context xml file's name.  Such
as this

product%2Fcustomername.xml

This does work, however when you try to shutdown tomcat 6.0.18, you will get
this crash:

Nov 9, 2008 10:56:17 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8180
Nov 9, 2008 10:56:18 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Nov 9, 2008 10:56:18 PM org.apache.catalina.startup.HostConfig undeployApps
WARNING: Error while removing context [/product%2Fcustomername]
java.lang.NullPointerException
at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:915)
at
org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1191)
at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1162)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1086)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
at
org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448)
at
org.apache.catalina.core.StandardService.stop(StandardService.java:584)
at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:628)
at
org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:671)
Nov 9, 2008 10:56:18 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8180


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2008-11-21 Thread fhanik
Author: fhanik
Date: Fri Nov 21 08:34:34 2008
New Revision: 719630

URL: http://svn.apache.org/viewvc?rev=719630&view=rev
Log:
update proposal

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=719630&r1=719629&r2=719630&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Nov 21 08:34:34 2008
@@ -247,5 +247,6 @@
 
 * Make thread pool limits dynamically configurable
   http://svn.apache.org/viewvc?rev=719602&view=rev
-  +1: markt
+  http://svn.apache.org/viewvc?rev=719628&view=rev
+  +1: markt, fhanik
   -1: 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46261] Context with %2F in name causes tomcat crash on shutdown

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46261





--- Comment #1 from Joe Kislo <[EMAIL PROTECTED]>  2008-11-21 08:35:26 PST ---
Created an attachment (id=22910)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22910)
Proposed patch


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46261] Context with %2F in name causes tomcat crash on shutdown

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46261





--- Comment #2 from Joe Kislo <[EMAIL PROTECTED]>  2008-11-21 08:36:13 PST ---
I have attached a patch that I have been using to work around this issue. It
modifies findChild to decode the name if the initial lookup fails.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46262] New: Undeploying context with %2F in it does not work

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46262

   Summary: Undeploying context with %2F in it does not work
   Product: Tomcat 6
   Version: 6.0.18
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: [EMAIL PROTECTED]


Undeploying context with %2F in it does not work

This is related to the situation in bug #46261

If you have a context on disk named:

product%2Fcustomername.xml

If you try to undeploy it,you will get this error:

w3m http://localhost:8180/tomcat-manager/undeploy?path=/product/customername

FAIL - Context /product/clustername is defined in server.xml and may not be
undeployed

The error is incorrect.  The context is not defined in server.xml, it's just
that the:

Context context = (Context) host.findChild(path);

Check passes, and the

if (!isDeployed(path)) {

check fails (in ManagerServlet.java), which normally would imply the context
must be deployed in the server.xml, however in this case the isDeployed lookup
is just not working correctly for contexts with %2F in them.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46262] Undeploying context with %2F in it does not work

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46262





--- Comment #1 from Joe Kislo <[EMAIL PROTECTED]>  2008-11-21 08:43:01 PST ---
I do not have a patch for this issue, I work around this issue by doing:

w3m
http://localhost:8180/tomcat-manager/undeploy?path=/product%252Fcustomername

instead, which works.  For this to work, you would have needed to apply the
patch from bug #46261

Although I am fine with this work around, this does highlight that there is
some inconsistency in the internal representation of context URLs in tomcat. 
This workarond and the patch in bug #46261 could be eliminated if somebody
could standardize how the urls should be stored in the various lookup tables in
tomcat.  Unfortunately I am not equipped to say whether the URLs should be
stored as:

/product/customername
/product%2Fcustomername
%2Fproduct%2Fcustomername

Which I believe are the three things I've seen being used in the tomcat code so
far


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46261] Context with %2F in name causes tomcat crash on shutdown

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46261





--- Comment #3 from Mark Thomas <[EMAIL PROTECTED]>  2008-11-21 08:45:56 PST ---
The correct way to do this in 6.0.18 is to use the # character rather than %2F.

%2F should be interpreted literally.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46262] Undeploying context with %2F in it does not work

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46262





--- Comment #2 from Mark Thomas <[EMAIL PROTECTED]>  2008-11-21 08:46:23 PST ---
The correct way to do this in 6.0.18 is to use the # character rather than %2F.

%2F should be interpreted literally.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46263] New: Tomcat reloading of context does not update context path

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46263

   Summary: Tomcat reloading of context does not update context path
   Product: Tomcat 6
   Version: 6.0.18
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: [EMAIL PROTECTED]


Tomcat reloading of context does not update context path

Several years ago I worked on integrating tomcat 5.5 into our web application
management infrastructure.  During the process I fixed several tomcat 5.5 bugs,
but apparently never sent the fixes upstream.  Oops.

Our application environment requires that we be able to upgrade to a newer
version of code for our application without loosing any webrequests.  One major
obstacle was fixed with Bug #43683.  Another obstacle is the changing of the
docBase of the context itself during the reload.

If you are running in autoDeploy="false" mode, and you start a context (EG:
visit the url of one of the servlets), if you update the docBase in the context
xml file on disk, and then reload that context using the tomcat-hostmanager
app:
w3m http://localhost:8180/tomcat-manager/reload?path=/thecontext

The context will reload, however the new docBase will not be respected.  It
will reload the original docBase.

If you tomcat-manager/stop then tomcat-manager/start, your updates will be
respected, but the transfer to the new docBase is not atomic (you will loose
requests).

If you run in autoDeploy="true" mode, the new docBase will be respected,
however the transfer to the new docBase is not atomic (you will loose
requests).


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46263] Tomcat reloading of context does not update context path

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46263





--- Comment #1 from Joe Kislo <[EMAIL PROTECTED]>  2008-11-21 08:48:47 PST ---
The solution I provide is to allow an additional parameter to the /reload
request.  The patch I have provided allows you to supply a 
&war=/path/to/my/new/docPath

parameter, which if supplied, will replace the docpath atomically during the
reload process.

This request could also be fulfilled by actually reloading the context file off
of disk, but I was worried that somebody may change more than just the docPath,
and I do not know the ramifications of other things being changed in the
context file during a reload.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46263] Tomcat reloading of context does not update context path

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46263





--- Comment #2 from Joe Kislo <[EMAIL PROTECTED]>  2008-11-21 08:50:33 PST ---
Created an attachment (id=22911)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22911)
Proposed Patch


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46264

   Summary: Shutting down tomcat with large number of contexts is
slow
   Product: Tomcat 6
   Version: 6.0.18
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: [EMAIL PROTECTED]


Shutting down tomcat with large number of contexts is slow

On some of our sandbox testing environments, we have tomcat loaded with 30-40
contexts, and run a very large heap (2-3GB).  Most of these contexts are large
applications which take anywhere from 5-10 seconds to shutdown each.  Most of
the time spent shutting down each application is not spent using the local app
server CPU, but shutting down remote resources (Announcing the application is
going down over JMS, flushing write buffers, closing DB connections, closing
JMS connections, closing log connections, etc.).  Shutting down tomcat
typically takes minutes, because it shuts down one context at a time.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46264





--- Comment #1 from Joe Kislo <[EMAIL PROTECTED]>  2008-11-21 09:04:01 PST ---
I propose that during the context shutdown, tomcat use multiple threads to
shutdown the contexts in parallel.

I have attached a patch which will fire off:

2 x # of Cores

Threads during the shutdown process and work in a FIFO manner shutting down the
contexts in parallel.  I suspect even when shutting down contexts which are
entirely local in nature (not using resources on remote systems) on a single
CPU machine a parallel shutdown will increase the shutdown speed because of
various waits, sleeps and other things that may be called in the destroy()
method of servlets that can be done in parallel


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46264





--- Comment #2 from Joe Kislo <[EMAIL PROTECTED]>  2008-11-21 09:04:50 PST ---
Created an attachment (id=22912)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22912)
Proposed patch


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46265] New: Missing code in ModuleClassLoader.getResourceParentDelegate()?

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46265

   Summary: Missing code in
ModuleClassLoader.getResourceParentDelegate()?
   Product: Tomcat 4
   Version: Unknown
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connector:Other
AssignedTo: dev@tomcat.apache.org
ReportedBy: [EMAIL PROTECTED]


org.apache.tomcat.util.loader.ModuleClassLoader.getResourceParentDelegate()
looks as though it should have an extra line in it:

if (loader == null) {
loader = getSystemClassLoader();
url = loader.getResource(name); // ** MISSING ** ?
if (url != null) { // ** OTHERWISE THIS IS ALWAYS NULL **
if (DEBUG)
   log("getResource() found by system " +  delegate + " " + name + " "
+ url);
return (url);
}


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn propchange: r719551 - svn:log

2008-11-21 Thread markt
Author: markt
Revision: 719551
Modified property: svn:log

Modified: svn:log at Fri Nov 21 12:25:19 2008
--
--- svn:log (original)
+++ svn:log Fri Nov 21 12:25:19 2008
@@ -1,3 +1,3 @@
-Remove deprecated code in connector (it was this bit that broke the build 
previously).
+Remove deprecated code in digester (it was this bit that broke the build 
previously).
 Modify all classes that overrode deprecated methods to override the new 
methods.
 Add a note to the change log about backwards compatibility or lack thereof.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r719711 - /tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java

2008-11-21 Thread fhanik
Author: fhanik
Date: Fri Nov 21 13:06:44 2008
New Revision: 719711

URL: http://svn.apache.org/viewvc?rev=719711&view=rev
Log:
add async call template, not sure how it will work, but I will know soon
make sure that timewait is a positive value, 0 being the lowest

Modified:

tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java

Modified: 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=719711&r1=719710&r2=719711&view=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
 Fri Nov 21 13:06:44 2008
@@ -27,6 +27,8 @@
 import java.util.Queue;
 import java.util.concurrent.ArrayBlockingQueue;
 import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.Callable;
+import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.juli.logging.Log;
@@ -109,6 +111,11 @@
 init(prop);
 }
 
+
+public Future getConnectionAsync() throws SQLException {
+return null;
+}
+
 /**
  * Borrows a connection from the pool
  * @return Connection - a java.sql.Connection reflection proxy, wrapping 
the underlying object.
@@ -117,6 +124,10 @@
 public Connection getConnection() throws SQLException {
 //check out a connection
 PooledConnection con = (PooledConnection)borrowConnection();
+return setupConnection(con);
+}
+
+protected Connection setupConnection(PooledConnection con) throws 
SQLException {
 JdbcInterceptor handler = con.getHandler();
 if (handler==null) {
 //build the proxy handler
@@ -164,8 +175,9 @@
 s.initCause(x);
 throw s;
 }
-}
 
+}
+
 /**
  * Returns the name of this pool
  * @return String
@@ -394,7 +406,7 @@
 
 //calculate wait time for this iteration
 long maxWait = 
(getPoolProperties().getMaxWait()<=0)?Long.MAX_VALUE:getPoolProperties().getMaxWait();
-long timetowait = Math.max(1, maxWait - 
(System.currentTimeMillis() - now));
+long timetowait = Math.max(0, maxWait - 
(System.currentTimeMillis() - now));
 try {
 //retrieve an existing connection
 con = idle.poll(timetowait, TimeUnit.MILLISECONDS);



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46258] BUILDING.txt has incorrect download location

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46258


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46246] SVN property patches

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46246





--- Comment #4 from Mark Thomas <[EMAIL PROTECTED]>  2008-11-21 13:12:04 PST ---
.bat and .sh should use svn:eol-style:native. Using platform specific settings
makes editing these files on anther platform a right pain.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46246] SVN property patches

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46246


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r719718 - in /tomcat: connectors/trunk/jk/jkstatus/example/ connectors/trunk/jk/native/ connectors/trunk/jk/native/apache-1.3/ connectors/trunk/jk/native/apache-2.0/ connectors/trunk/jk/na

2008-11-21 Thread markt
Author: markt
Date: Fri Nov 21 13:22:24 2008
New Revision: 719718

URL: http://svn.apache.org/viewvc?rev=719718&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46246
Correct properties.
Patch provided by [EMAIL PROTECTED]

Modified:
tomcat/connectors/trunk/jk/jkstatus/example/show.txt   (contents, props 
changed)
tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.apxs.in   (props 
changed)
tomcat/connectors/trunk/jk/native/apache-1.3/Makefile.in   (props changed)
tomcat/connectors/trunk/jk/native/apache-2.0/Makefile.in   (props changed)
tomcat/connectors/trunk/jk/native/common/jk_url.c   (props changed)
tomcat/connectors/trunk/jk/native/common/jk_url.h   (props changed)
tomcat/connectors/trunk/jk/native/configure.in   (props changed)
tomcat/connectors/trunk/jk/native/iis/pcre/RunTest.in   (props changed)

tomcat/connectors/trunk/jni/test/org/apache/tomcat/jni/SocketServerTestBind.java
   (props changed)

tomcat/connectors/trunk/jni/test/org/apache/tomcat/jni/SocketServerTestSuite.java
   (props changed)
tomcat/connectors/trunk/jni/xdocs/build.xml   (props changed)
tomcat/connectors/trunk/jni/xdocs/index.xml   (props changed)
tomcat/connectors/trunk/jni/xdocs/miscellaneous/changelog.xml   (props 
changed)
tomcat/connectors/trunk/jni/xdocs/miscellaneous/project.xml   (props 
changed)
tomcat/connectors/trunk/jni/xdocs/news/2008.xml   (props changed)
tomcat/connectors/trunk/jni/xdocs/news/project.xml   (props changed)
tomcat/connectors/trunk/jni/xdocs/project.xml   (props changed)
tomcat/connectors/trunk/jni/xdocs/style.css   (props changed)
tomcat/connectors/trunk/jni/xdocs/style.xsl   (props changed)

tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/Loader.java   
(props changed)

tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/Module.java   
(props changed)

tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/ModuleClassLoader.java
   (props changed)

tomcat/connectors/trunk/util/loader/org/apache/tomcat/util/loader/Repository.java
   (props changed)

tomcat/container/branches/tc4.1.x/catalina/docs/dev/catalina-analysis1_raster.gif
   (props changed)

tomcat/container/branches/tc4.1.x/catalina/docs/dev/catalina-analysis2_raster.gif
   (props changed)

tomcat/container/branches/tc4.1.x/catalina/docs/dev/catalina-analysis3_raster.gif
   (props changed)

tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/valves/ExtendedAccessLogValve.java
   (props changed)

tomcat/container/branches/tc4.1.x/tester/src/tester/org/apache/tester/Session02.java
   (props changed)

tomcat/container/branches/tc4.1.x/tester/src/tester/org/apache/tester/Session03.java
   (props changed)
tomcat/container/branches/tc4.1.x/tester/web/Encoding01.jsp   (props 
changed)
tomcat/container/branches/tc4.1.x/tester/web/golden/Session05.txt   (props 
changed)

tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/CookieExample.java
   (props changed)

tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/HelloWorldExample.java
   (props changed)

tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/LocalStrings.properties
   (props changed)

tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/RequestHeaderExample.java
   (props changed)

tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/RequestInfoExample.java
   (props changed)

tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/RequestParamExample.java
   (props changed)

tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/SessionExample.java
   (props changed)

tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/cal/Entries.java
   (props changed)

tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/cal/Entry.java
   (props changed)

tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/cal/JspCalendar.java
   (props changed)

tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/cal/TableBean.java
   (props changed)

tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/checkbox/CheckTest.java
   (props changed)

tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/colors/ColorGameBean.java
   (props changed)

tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/error/Smart.java
   (props changed)

tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/sessions/DummyCart.java
   (props changed)
tomcat/container/branches/tc4.1.x/webapps/examples/jsp/cal/Entries.txt   
(props changed)
tomcat/container/branches/tc4.1.x/webapps/examples/jsp/cal/Entry.txt   
(props changed)
tomcat/container/branches/tc4.1.x/webapps/examples/jsp/cal/JspCalendar.txt  
 (props changed)
tomcat/container/branches/tc4.1.x

DO NOT REPLY [Bug 46265] Missing code in ModuleClassLoader.getResourceParentDelegate()?

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46265


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX




--- Comment #1 from Mark Thomas <[EMAIL PROTECTED]>  2008-11-21 13:28:06 PST ---
That entire package is unused.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46246] SVN property patches

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46246





--- Comment #5 from Sebb <[EMAIL PROTECTED]>  2008-11-21 14:03:31 PST ---
(In reply to comment #4)
> .bat and .sh should use svn:eol-style:native. Using platform specific settings
> makes editing these files on anther platform a right pain.
> 

That depends on what tool you use to do the edits.

Eclipse (for example) will happily edit eol=LF on Windows.

If the "wrong" line endings are used, then the scripts have to fixed in order
to generate releases.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 46246] SVN property patches

2008-11-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46246





--- Comment #6 from Mark Thomas <[EMAIL PROTECTED]>  2008-11-21 14:45:29 PST ---
There are also plenty of tools that don't like non-native line-endings .

The build scripts take care of this for the releases.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r719626 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2008-11-21 Thread Mark Thomas
[EMAIL PROTECTED] wrote:
> Author: fhanik
> Date: Fri Nov 21 08:31:45 2008
> New Revision: 719626
> 
> URL: http://svn.apache.org/viewvc?rev=719626&view=rev
> Log:
> Fix dynamic thread resizing

I had assumed that if an executor was used, then the executor mbean would
be used to resize the pool. Also, this is now inconsistent with the
configuration in that setting maxThreads for the connector in server.xml at
startup will not have an affect but setting it via JMX at runtime will.

This is also now inconsistent with the BIO and APT endpoints.

Am I missing something?

Mark

> 
> Modified:
> tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
> 
> Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=719626&r1=719625&r2=719626&view=diff
> ==
> --- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
> +++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Fri Nov 21 
> 08:31:45 2008
> @@ -354,8 +354,14 @@
>  public void setMaxThreads(int maxThreads) {
>  this.maxThreads = maxThreads;
>  if (running) {
> -synchronized(workers) {
> -workers.resize(maxThreads);
> +if (getUseExecutor() && executor!=null) {
> +if (executor instanceof ThreadPoolExecutor) {
> +
> ((ThreadPoolExecutor)executor).setMaximumPoolSize(maxThreads);
> +}
> +}else if (workers!=null){
> +synchronized(workers) {
> +workers.resize(maxThreads);
> +}
>  }
>  }
>  }
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DeltaManager initialization delay

2008-11-21 Thread Peter Rossbach

Hi Jason,

send us your implementation and let us review your stuff :-)

You can also register a ContextListener at DeltaManager.setContainer 
() to control your latch.
Are your sure that session sync message (GET ALL Session) is received  
before first request at second node

is processed?

I think your feature is an extension of the current reveivedQueue usage!

Regards
Peter



Am 20.11.2008 um 22:54 schrieb Jason:

This message is targeted at Filip Hanik, Craig R. McClanahan, Jean- 
Francois
Arcand, Peter Rossbach or anyone with a direct interest in the  
DeltaManager

implementation in Tomcat 6.

A vendor (who will remain nameless) whose product I support for a  
client
recently gave me an idea for a patch to DeltaManager to address  
what the
vendor claims is a Tomcat specific issue related to session  
replication. I'm
wondering if it would be of value to the community or if the  
"problem" it is

trying to remedy is an intentional "feature".

The primary issue is that, according to vendor engineering support,  
the
other application containers the vendor supports deploying their  
product on,
including WebSphere, WebLogic, et al, wait until after local  
applications
have been initialized before processing incoming messages from the  
cluster
that could include deserializing remote sessions and the objects  
therein. I
have not confirmed this by examining the other containers mind you,  
but am
pretty confident that this is an accurate statement in so far that  
vendor's
product works in those environments but does not work in a  
clustered tomcat

environment.

The reason it fails in tomcat is that some of the objects in the  
serialized

session make calls at construction time to the vendor's (archaic)
preferences API's static methods, which are not initialized  
properly until
the web application itself is started. The result is that the first  
node in

the cluster starts up fine, but the 2nd-Nth nodes die a horrible death
trying to deserialize remote sessions populated by the first node.

The workaround we've implemented locally is a simple one: we extend  
the

DeltaManager with a custom class. Therein, we create a latch
(java.util.concurrent.CountDownLatch, to be specific) and save it  
in the
ServletContext. The only overridden method is messageDataReceived 
(), which

uses the latch.await() method to block before calling the original
implementation of the parent messageDataReceived() method.

The vendor's application (or, more properly, the custom extensions  
we've
built on their platform) looks at the ServletContext for a latch  
after the
preferences have been initialized locally, and calls latch.countDown 
(),
allowing any blocked calls to messageDataReceived() to start  
executing as

normally.

Without breaking the current sequence of initializing the session
replication code before local applications that Tomcat developers  
may have
come to expect, it seems like there is a potential solution here  
that might
enable applications like the one I've got to support to choose to  
configure
the session replication to wait to process incoming messages until  
after the

application has started.

I think it would be pretty trivial for me to offer a patch to  
DeltaManager
that created a latch based on a configuration element. One could  
imagine an

automatic mechanism for toggling the latch by the container after the
application initialization, or deferring to the application to  
deactivate.

The question is, does anybody want such functionality besides me? The
corollary is, if being able to choose when session replication  
begins is a

desirable feature, is this the right tactic to implement it?

Sincerely,

 - Jason Lunn

"That's the problem. He's a brilliant lunatic and you can't tell
which way he'll jump --
like his game he's impossible to analyse --
you can't dissect him, predict him --
which of course means he's not a lunatic at all."



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r719626 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2008-11-21 Thread Peter Rossbach

Hi Mark!

The NioEndpoint can have its own executor without sharing and JMX  
stuff :-)

See at start methods:

L 805:
if (getUseExecutor()) {
if ( executor == null ) {
TaskQueue taskqueue = new TaskQueue();
TaskThreadFactory tf = new TaskThreadFactory 
(getName() + "-exec-");
executor = new ThreadPoolExecutor 
(getMinSpareThreads(), getMaxThreads(), 60,  
TimeUnit.SECONDS,taskqueue, tf);
taskqueue.setParent( (ThreadPoolExecutor)  
executor, this);

}


regards
Peter


Am 21.11.2008 um 23:52 schrieb Mark Thomas:


[EMAIL PROTECTED] wrote:

Author: fhanik
Date: Fri Nov 21 08:31:45 2008
New Revision: 719626

URL: http://svn.apache.org/viewvc?rev=719626&view=rev
Log:
Fix dynamic thread resizing


I had assumed that if an executor was used, then the executor mbean  
would

be used to resize the pool. Also, this is now inconsistent with the
configuration in that setting maxThreads for the connector in  
server.xml at
startup will not have an affect but setting it via JMX at runtime  
will.


This is also now inconsistent with the BIO and APT endpoints.

Am I missing something?

Mark



Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/ 
NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/ 
tomcat/util/net/NioEndpoint.java? 
rev=719626&r1=719625&r2=719626&view=diff
= 
=
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java  
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java  
Fri Nov 21 08:31:45 2008

@@ -354,8 +354,14 @@
 public void setMaxThreads(int maxThreads) {
 this.maxThreads = maxThreads;
 if (running) {
-synchronized(workers) {
-workers.resize(maxThreads);
+if (getUseExecutor() && executor!=null) {
+if (executor instanceof ThreadPoolExecutor) {
+((ThreadPoolExecutor) 
executor).setMaximumPoolSize(maxThreads);

+}
+}else if (workers!=null){
+synchronized(workers) {
+workers.resize(maxThreads);
+}
 }
 }
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]