svn:eol-style info for our new committers

2010-12-06 Thread Rainer Jung

There's the useful

http://www.apache.org/dev/svn-eol-style.txt

to configure svn.

It is linked together with other useful info in the version control 
section of


http://www.apache.org/dev/

Regards,

Rainer


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



Re: Automated FindBugs Reportg

2010-12-06 Thread Henri Gomez
I got some news.

Adding Tomcat 5.5 / 7.x to nemo will require some study, since projects will
require some works (build.xml/build.properties).
It's usually faster for Mavenised projects but sadly Tomcat is still ant
based :(

2010/12/6 Henri Gomez henri.go...@gmail.com

 I'll ask them :-)

 Le 5 déc. 2010 à 22:57, Mark Thomas ma...@apache.org a écrit :

  On 05/12/2010 20:50, Henri Gomez wrote:
  We should just ask Sonar Team.
 
  I know them, would you like me to contact them ?
 
  Tomcat 5.5 and 7 ?
 
  That would be great.
 
  I'd request:
  http://svn.apache.org/repos/asf/tomcat/tc5.5.x/trunk/
  http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/
  http://svn.apache.org/repos/asf/tomcat/trunk/
 
  with http://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk/ to be added
  once created.
 
  Cheers,
 
  Mark
 
 
 
  Le 2 déc. 2010 à 23:31, Mark Thomas ma...@apache.org a écrit :
 
  On 02/12/2010 22:07, Henri Gomez wrote:
  FindBugs, Checkstyle and many more QA tests are allready provided by
  Sonar team for Tomcat :-)
 
  http://nemo.sonarsource.org/dashboard/index/50544
 
  Nice. It looks liek that is for Tomcat 6.0.x. How do we get 7.0.x and
  5.5.x added?
 
  Mark
 
  -
  To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: dev-h...@tomcat.apache.org
 
 
  -
  To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: dev-h...@tomcat.apache.org
 
 
 
  -
  To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: dev-h...@tomcat.apache.org
 



svn commit: r1042639 - in /tomcat/trunk/java/org/apache/coyote: AbstractProtocolHandler.java ajp/AbstractAjpProtocol.java http11/AbstractHttp11Protocol.java

2010-12-06 Thread markt
Author: markt
Date: Mon Dec  6 13:36:48 2010
New Revision: 1042639

URL: http://svn.apache.org/viewvc?rev=1042639view=rev
Log:
Re-factoring in support of 
https://issues.apache.org/bugzilla/show_bug.cgi?id=50360
Implement a common base class for ProtocolHandler implementations that will 
handle life-cycle/mbean issues (once more re-factoring has been completed)

Added:
tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java   (with 
props)
Modified:
tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java

Added: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1042639view=auto
==
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (added)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Mon Dec  6 
13:36:48 2010
@@ -0,0 +1,30 @@
+/*
+ *  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.coyote;
+
+import javax.management.MBeanRegistration;
+
+import org.apache.juli.logging.Log;
+
+public abstract class AbstractProtocolHandler implements ProtocolHandler,
+MBeanRegistration {
+
+// Concrete implementations need to provide access to their logger to be
+// used by the abstract classes.
+protected abstract Log getLog();
+
+}

Propchange: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
--
svn:eol-style = native

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java?rev=1042639r1=1042638r2=1042639view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Mon Dec  6 
13:36:48 2010
@@ -22,25 +22,21 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.concurrent.Executor;
 
-import javax.management.MBeanRegistration;
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
+import org.apache.coyote.AbstractProtocolHandler;
 import org.apache.coyote.Adapter;
-import org.apache.coyote.ProtocolHandler;
-import org.apache.juli.logging.Log;
 import org.apache.tomcat.util.modeler.Registry;
 import org.apache.tomcat.util.net.AbstractEndpoint;
 import org.apache.tomcat.util.res.StringManager;
 
-public abstract class AbstractAjpProtocol implements ProtocolHandler, 
MBeanRegistration {
+public abstract class AbstractAjpProtocol extends AbstractProtocolHandler {
 /**
  * The string manager for this package.
  */
 protected static final StringManager sm = 
StringManager.getManager(Constants.Package);
-
-protected abstract Log getLog();
-
+
 protected ObjectName tpOname = null;
 protected ObjectName rgOname = null;
 

Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java?rev=1042639r1=1042638r2=1042639view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java Mon 
Dec  6 13:36:48 2010
@@ -22,26 +22,22 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.concurrent.Executor;
 
-import javax.management.MBeanRegistration;
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
+import org.apache.coyote.AbstractProtocolHandler;
 import org.apache.coyote.Adapter;
-import org.apache.coyote.ProtocolHandler;
-import org.apache.juli.logging.Log;
 import org.apache.tomcat.util.modeler.Registry;
 import org.apache.tomcat.util.net.AbstractEndpoint;
 import 

svn commit: r1042648 - in /tomcat/trunk/java/org/apache/coyote: AbstractProtocolHandler.java ajp/AbstractAjpProtocol.java http11/AbstractHttp11Protocol.java

2010-12-06 Thread markt
Author: markt
Date: Mon Dec  6 14:02:19 2010
New Revision: 1042648

URL: http://svn.apache.org/viewvc?rev=1042648view=rev
Log:
Re-factoring in support of 
https://issues.apache.org/bugzilla/show_bug.cgi?id=50360
Start to pull stuff up into the base class

Modified:
tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1042648r1=1042647r2=1042648view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Mon Dec  6 
14:02:19 2010
@@ -17,14 +17,48 @@
 package org.apache.coyote;
 
 import javax.management.MBeanRegistration;
+import javax.management.ObjectName;
 
 import org.apache.juli.logging.Log;
+import org.apache.tomcat.util.net.AbstractEndpoint;
 
 public abstract class AbstractProtocolHandler implements ProtocolHandler,
 MBeanRegistration {
 
-// Concrete implementations need to provide access to their logger to be
-// used by the abstract classes.
-protected abstract Log getLog();
+/**
+ * Name of MBean for the Global Request Processor.
+ */
+protected ObjectName rgOname = null;
+
+
+/**
+ * Name of MBean for the ThreadPool.
+ */
+protected ObjectName tpOname = null;
+
+
+/**
+ * Endpoint that provides low-level network I/O - must be matched to the
+ * ProtocolHandler implementation (ProtocolHandler using BIO, requires BIO
+ * Endpoint etc.).
+ */
+protected AbstractEndpoint endpoint = null;
 
+
+/**
+ * The adapter provides the link between the ProtocolHandler and the
+ * connector.
+ */
+protected Adapter adapter;
+@Override
+public void setAdapter(Adapter adapter) { this.adapter = adapter; }
+@Override
+public Adapter getAdapter() { return adapter; }
+
+
+/**
+ * Concrete implementations need to provide access to their logger to be
+ * used by the abstract classes.
+ */
+protected abstract Log getLog();
 }

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java?rev=1042648r1=1042647r2=1042648view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Mon Dec  6 
14:02:19 2010
@@ -26,9 +26,7 @@ import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import org.apache.coyote.AbstractProtocolHandler;
-import org.apache.coyote.Adapter;
 import org.apache.tomcat.util.modeler.Registry;
-import org.apache.tomcat.util.net.AbstractEndpoint;
 import org.apache.tomcat.util.res.StringManager;
 
 public abstract class AbstractAjpProtocol extends AbstractProtocolHandler {
@@ -37,16 +35,6 @@ public abstract class AbstractAjpProtoco
  */
 protected static final StringManager sm = 
StringManager.getManager(Constants.Package);
 
-protected ObjectName tpOname = null;
-protected ObjectName rgOname = null;
-
-protected AbstractEndpoint endpoint = null;
-
-/**
- * The adapter, used to call the connector.
- */
-protected Adapter adapter;
-
 protected HashMapString, Object attributes = new HashMapString, 
Object();
 
 /** 
@@ -89,20 +77,6 @@ public abstract class AbstractAjpProtoco
 return (String)getAttribute(name);
 }
 
-/**
- * The adapter, used to call the connector
- */
-@Override
-public void setAdapter(Adapter adapter) {
-this.adapter = adapter;
-}
-
-
-@Override
-public Adapter getAdapter() {
-return adapter;
-}
-
 @Override
 public void pause() throws Exception {
 try {

Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java?rev=1042648r1=1042647r2=1042648view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java Mon 
Dec  6 14:02:19 2010
@@ -26,9 +26,7 @@ import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import org.apache.coyote.AbstractProtocolHandler;
-import org.apache.coyote.Adapter;
 import org.apache.tomcat.util.modeler.Registry;
-import 

svn commit: r1042651 - /tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java

2010-12-06 Thread markt
Author: markt
Date: Mon Dec  6 14:09:14 2010
New Revision: 1042651

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

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?rev=1042651r1=1042650r2=1042651view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Mon Dec  
6 14:09:14 2010
@@ -174,16 +174,6 @@ public class Http11NioProtocol extends A
 }
 
 //  Tcp setup 
-public String getProtocol() {
-return getProperty(protocol);
-}
-
-public void setProtocol( String k ) {
-setSecure(true);
-setAttribute(protocol, k);
-}
-
-
 public int getSocketCloseDelay() {
 return socketCloseDelay;
 }



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



DO NOT REPLY [Bug 50326] Problem with DBCP 1.3 /jdk 6 and oracle spatial

2010-12-06 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50326

Nils Hildebrand nils.hildebr...@bamf.bund.de changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
URL||https://issues.apache.org/j
   ||ira/browse/DBCP-350
 Resolution|INVALID |

--- Comment #5 from Nils Hildebrand nils.hildebr...@bamf.bund.de 2010-12-06 
10:01:29 EST ---
Hi,

I traced the problem further down.
I exchanged DBCP 1.3/Tomcat with DBCB 1.4 Commons - the error remains.
After Downgrade to DBCP 1.2.2 Commons the error is gone.

See https://issues.apache.org/jira/browse/DBCP-350 for the corresponding
bug-report for DBCP.

Until that is resolved the error is inherited by Tomcat 5.5 as well (from
5.5.30 on).

Looking at the bug-tracker for dbcp 1.3.1 there seem to be more
Oracle-DB-related problems - perhaps this is a seldom combination?

So until then - woraround is:
After Upgrade/Installation of Tomcat  5.5.30:
Downgrade to DBCP 1.2.2 if you encounter oracle-db-problems.

I will provide a link in the WiKi for the downgrade procedure after I figured
out how to edit the WiKi.

Kind regards

Nils

-- 
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: r1042670 - in /tomcat/trunk/java/org/apache/coyote: ./ ajp/ http11/

2010-12-06 Thread markt
Author: markt
Date: Mon Dec  6 15:01:34 2010
New Revision: 1042670

URL: http://svn.apache.org/viewvc?rev=1042670view=rev
Log:
Re-factoring in support of 
https://issues.apache.org/bugzilla/show_bug.cgi?id=50360
Start to pull more getters/setters and the generic attribute handling. Note 
that the comments around generic attribute handling are aspirational in some 
cases but subsequent commits should align the behaviour to the comments.

Modified:
tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
tomcat/trunk/java/org/apache/coyote/LocalStrings.properties
tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties
tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings_es.properties
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties
tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_es.properties
tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_fr.properties
tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_ja.properties

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1042670r1=1042669r2=1042670view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Mon Dec  6 
15:01:34 2010
@@ -16,16 +16,28 @@
  */
 package org.apache.coyote;
 
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.concurrent.Executor;
+
 import javax.management.MBeanRegistration;
 import javax.management.ObjectName;
 
 import org.apache.juli.logging.Log;
 import org.apache.tomcat.util.net.AbstractEndpoint;
+import org.apache.tomcat.util.res.StringManager;
 
 public abstract class AbstractProtocolHandler implements ProtocolHandler,
 MBeanRegistration {
 
 /**
+ * The string manager for this package.
+ */
+protected static final StringManager sm =
+StringManager.getManager(Constants.Package);
+
+
+/**
  * Name of MBean for the Global Request Processor.
  */
 protected ObjectName rgOname = null;
@@ -45,6 +57,83 @@ public abstract class AbstractProtocolHa
 protected AbstractEndpoint endpoint = null;
 
 
+// --- Generic property 
handling
+
+/**
+ * Attributes provide a way for configuration to be passed to 
sub-components
+ * without the {...@link ProtocolHandler} being aware of the properties
+ * available on those sub-components. One example of such a sub-component 
is
+ * the {...@link org.apache.tomcat.util.net.ServerSocketFactory}.
+ */
+protected HashMapString, Object attributes =
+new HashMapString, Object();
+
+
+/** 
+ * Generic property setter called when a property for which a specific
+ * setter already exists within the {...@link ProtocolHandler} needs to be
+ * made available to sub-components. The specific setter will call this
+ * method to populate the attributes.
+ */
+@Override
+public void setAttribute(String name, Object value) {
+if (getLog().isTraceEnabled()) {
+getLog().trace(sm.getString(abstractProtocolHandler.setAttribute,
+name, value));
+}
+attributes.put(name, value);
+}
+
+
+/**
+ * Used by sub-components to retrieve configuration information.
+ */
+@Override
+public Object getAttribute(String key) {
+Object value = attributes.get(key);
+if (getLog().isTraceEnabled()) {
+getLog().trace(sm.getString(abstractProtocolHandler.getAttribute,
+key, value));
+}
+return value;
+}
+
+
+/**
+ * Used by sub-components to retrieve configuration information.
+ */
+@Override
+public IteratorString getAttributeNames() {
+return attributes.keySet().iterator();
+}
+
+
+/**
+ * Generic property setter used by the digester. Other code should not need
+ * to use this. The digester will only use this method if it can't find a
+ * more specific setter. That means the property belongs to the Endpoint,
+ * the ServerSocketFactory or some other lower level component. This method
+ * ensures that it is visible to both.
+ */
+public boolean setProperty(String name, String value) {
+setAttribute(name, value);
+return endpoint.setProperty(name, value);
+}
+
+
+/**
+ * Generic property getter used by the digester. Other code should not need
+ * to use this.
+ */
+public String getProperty(String name) {
+// Since all calls to setProperty() will place the property in 

svn commit: r1042681 - in /tomcat/trunk/java/org/apache/coyote: AbstractProtocolHandler.java ajp/AbstractAjpProtocol.java http11/AbstractHttp11Protocol.java

2010-12-06 Thread markt
Author: markt
Date: Mon Dec  6 15:43:52 2010
New Revision: 1042681

URL: http://svn.apache.org/viewvc?rev=1042681view=rev
Log:
Re-factoring in support of 
https://issues.apache.org/bugzilla/show_bug.cgi?id=50360
Pull up more getters/setters.

Modified:
tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1042681r1=1042680r2=1042681view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Mon Dec  6 
15:43:52 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.coyote;
 
+import java.net.InetAddress;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.concurrent.Executor;
@@ -145,6 +146,19 @@ public abstract class AbstractProtocolHa
 public Adapter getAdapter() { return adapter; }
 
 
+/**
+ * The maximum number of idle processors that will be retained in the cache
+ * and re-used with a subsequent request. The default is -1, unlimited,
+ * although in that case there will never be more Processor objects than
+ * there are threads in the associated thread pool.
+ */
+protected int processorCache = -1;
+public int getProcessorCache() { return this.processorCache; }
+public void setProcessorCache(int processorCache) {
+this.processorCache = processorCache;
+}
+
+
 // -- Properties that are passed through to the 
EndPoint
 
 @Override
@@ -190,11 +204,16 @@ public abstract class AbstractProtocolHa
 public void setSoLinger(int soLinger) { endpoint.setSoLinger(soLinger); }
 
 
-//  Properties that are made available as 
attributes
-// -(and passed through to the 
EndPoint)
+// -- Properties that are passed through to the 
EndPoint
+//  and are made available as 
attributes
+
+public InetAddress getAddress() { return endpoint.getAddress(); }
+public void setAddress(InetAddress ia) {
+endpoint.setAddress( ia );
+setAttribute(address,  + ia);
+}
+
 
-
-
 //  Abstract 
methods
 /**
  * Concrete implementations need to provide access to their logger to be

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java?rev=1042681r1=1042680r2=1042681view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Mon Dec  6 
15:43:52 2010
@@ -16,7 +16,6 @@
  */
 package org.apache.coyote.ajp;
 
-import java.net.InetAddress;
 import java.net.URLEncoder;
 
 import javax.management.MBeanServer;
@@ -91,17 +90,6 @@ public abstract class AbstractAjpProtoco
 return (ajp- + encodedAddr + endpoint.getPort());
 }
 
-/**
- * Processor cache.
- */
-protected int processorCache = -1;
-public int getProcessorCache() { return this.processorCache; }
-public void setProcessorCache(int processorCache) { this.processorCache = 
processorCache; }
-
-
-public InetAddress getAddress() { return endpoint.getAddress(); }
-public void setAddress(InetAddress ia) { endpoint.setAddress(ia); }
-
 public int getSoTimeout() { return endpoint.getSoTimeout(); }
 public void setSoTimeout(int soTimeout) { 
endpoint.setSoTimeout(soTimeout); }
 

Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java?rev=1042681r1=1042680r2=1042681view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java Mon 
Dec  6 15:43:52 2010
@@ -16,7 +16,6 @@
  */
 package org.apache.coyote.http11;
 
-import java.net.InetAddress;
 import java.net.URLEncoder;
 
 import javax.management.MBeanServer;
@@ -36,12 +35,6 @@ public abstract class AbstractHttp11Prot
 protected SSLImplementation sslImplementation = null;
 
 
-public InetAddress getAddress() { return endpoint.getAddress(); }
-public void setAddress(InetAddress ia) {
-endpoint.setAddress( ia );
-

svn commit: r1042696 - in /tomcat/trunk/java/org/apache/coyote/ajp: AjpAprProtocol.java AjpProtocol.java Constants.java

2010-12-06 Thread markt
Author: markt
Date: Mon Dec  6 16:04:33 2010
New Revision: 1042696

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

Modified:
tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java
tomcat/trunk/java/org/apache/coyote/ajp/Constants.java

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java?rev=1042696r1=1042695r2=1042696view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java Mon Dec  6 
16:04:33 2010
@@ -60,7 +60,6 @@ public class AjpAprProtocol extends Abst
 cHandler = new AjpConnectionHandler(this);
 setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
 setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
-//setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
 setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
 }
 

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java?rev=1042696r1=1042695r2=1042696view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java Mon Dec  6 
16:04:33 2010
@@ -62,7 +62,6 @@ public class AjpProtocol extends Abstrac
 cHandler = new AjpConnectionHandler(this);
 setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
 setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
-//setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
 setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
 }
 

Modified: tomcat/trunk/java/org/apache/coyote/ajp/Constants.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/Constants.java?rev=1042696r1=1042695r2=1042696view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ajp/Constants.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/Constants.java Mon Dec  6 16:04:33 
2010
@@ -41,7 +41,6 @@ public final class Constants {
 public static final int DEFAULT_CONNECTION_LINGER = -1;
 public static final int DEFAULT_CONNECTION_TIMEOUT = -1;
 public static final int DEFAULT_CONNECTION_UPLOAD_TIMEOUT = 30;
-public static final int DEFAULT_SERVER_SOCKET_TIMEOUT = 0;
 public static final boolean DEFAULT_TCP_NO_DELAY = true;
 
 // Prefix codes for message types from server to container



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



svn commit: r1042706 - in /tomcat/trunk: java/org/apache/catalina/connector/ java/org/apache/coyote/http11/ webapps/docs/config/

2010-12-06 Thread markt
Author: markt
Date: Mon Dec  6 16:26:17 2010
New Revision: 1042706

URL: http://svn.apache.org/viewvc?rev=1042706view=rev
Log:
Fix mix-up of connectionUploadTimeout and connectionTimeout
Use connectionUploadTimeout consistently as attribute name
Document connectionUploadTimeout

Modified:
tomcat/trunk/java/org/apache/catalina/connector/Connector.java
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java
tomcat/trunk/webapps/docs/config/http.xml

Modified: tomcat/trunk/java/org/apache/catalina/connector/Connector.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Connector.java?rev=1042706r1=1042705r2=1042706view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Connector.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Connector.java Mon Dec  6 
16:26:17 2010
@@ -247,7 +247,6 @@ public class Connector extends Lifecycle
  replacements.put(acceptCount, backlog);
  replacements.put(connectionLinger, soLinger);
  replacements.put(connectionTimeout, soTimeout);
- replacements.put(connectionUploadTimeout, timeout);
  replacements.put(randomFile, randomfile);
  replacements.put(rootFile, rootfile);
  replacements.put(sslProtocols, protocols);

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1042706r1=1042705r2=1042706view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Mon 
Dec  6 16:26:17 2010
@@ -181,7 +181,7 @@ public abstract class AbstractHttp11Proc
 /**
  * Maximum timeout on uploads. 5 minutes as in Apache HTTPD server.
  */
-protected int timeout = 30;
+protected int connectionUploadTimeout = 30;
 
 
 /**
@@ -582,15 +582,15 @@ public abstract class AbstractHttp11Proc
 /**
  * Set the upload timeout.
  */
-public void setTimeout( int timeouts ) {
-timeout = timeouts ;
+public void setConnectionUploadTimeout(int timeout) {
+connectionUploadTimeout = timeout ;
 }
 
 /**
  * Get the upload timeout.
  */
-public int getTimeout() {
-return timeout;
+public int getConnectionUploadTimeout() {
+return connectionUploadTimeout;
 }
 
 

Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java?rev=1042706r1=1042705r2=1042706view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java Mon 
Dec  6 16:26:17 2010
@@ -152,14 +152,6 @@ public abstract class AbstractHttp11Prot
 return endpoint.getKeepAliveTimeout();
 }
 
-public int getTimeout() {
-return getSoTimeout();
-}
-
-public void setTimeout( int timeout ) {
-setSoTimeout(timeout);
-}
-
 public int getConnectionTimeout() {
 return getSoTimeout();
 }
@@ -198,14 +190,27 @@ public abstract class AbstractHttp11Prot
 public void setMaxHttpHeaderSize(int valueI) { maxHttpHeaderSize = valueI; 
}
 
 
+/**
+ * Specifies a different (usually  longer) connection timeout during data
+ * upload. 
+ */
+private int connectionUploadTimeout = 30;
+public int getConnectionUploadTimeout() { return connectionUploadTimeout; }
+public void setConnectionUploadTimeout(int i) {
+connectionUploadTimeout = i;
+}
+
+
 // HTTP
 /**
- * If true, the regular socket timeout will be used for the full duration
- * of the connection.
+ * If true, the connectionUploadTimeout will be ignored and the regular
+ * socket timeout will be used for the full duration of the connection.
  */
 private boolean disableUploadTimeout = true;
 public boolean getDisableUploadTimeout() { return disableUploadTimeout; }
-public void setDisableUploadTimeout(boolean isDisabled) { 

svn commit: r1042708 - in /tomcat/trunk: ./ conf/ webapps/

2010-12-06 Thread markt
Author: markt
Date: Mon Dec  6 16:29:25 2010
New Revision: 1042708

URL: http://svn.apache.org/viewvc?rev=1042708view=rev
Log:
Revert svn-ignore property changes made in r1042482

Modified:
tomcat/trunk/   (props changed)
tomcat/trunk/conf/   (props changed)
tomcat/trunk/webapps/   (props changed)

Propchange: tomcat/trunk/
--
--- svn:ignore (original)
+++ svn:ignore Mon Dec  6 16:29:25 2010
@@ -1,9 +1,3 @@
-.settings
-.classpath
-.project
+.*
 output
 build.properties
-.checkstyle
-.pmd
-work
-logs

Propchange: tomcat/trunk/conf/
('svn:ignore' removed)

Propchange: tomcat/trunk/webapps/
('svn:ignore' removed)



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



svn commit: r1042713 - /tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java

2010-12-06 Thread markt
Author: markt
Date: Mon Dec  6 16:37:16 2010
New Revision: 1042713

URL: http://svn.apache.org/viewvc?rev=1042713view=rev
Log:
Fix another mix-up of connectionUploadTimeout and connectionTimeout

Modified:
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java?rev=1042713r1=1042712r2=1042713view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java Mon 
Dec  6 16:37:16 2010
@@ -167,7 +167,6 @@ public abstract class AbstractHttp11Prot
 public void setSoTimeout( int i ) {
 endpoint.setSoTimeout(i);
 setAttribute(soTimeout,  + i);
-setAttribute(timeout,  + i);
 setAttribute(connectionTimeout,  + i);
 }
 



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



svn commit: r1042716 - /tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java

2010-12-06 Thread markt
Author: markt
Date: Mon Dec  6 16:41:06 2010
New Revision: 1042716

URL: http://svn.apache.org/viewvc?rev=1042716view=rev
Log:
Since the address is exposed to sub-components, expose the port as well.

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

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1042716r1=1042715r2=1042716view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Mon Dec  6 
16:41:06 2010
@@ -186,10 +186,6 @@ public abstract class AbstractProtocolHa
 }
 
 
-public int getPort() { return endpoint.getPort(); }
-public void setPort(int port) { endpoint.setPort(port); }
-
-
 public int getBacklog() { return endpoint.getBacklog(); }
 public void setBacklog(int backlog) { endpoint.setBacklog(backlog); }
 
@@ -209,8 +205,15 @@ public abstract class AbstractProtocolHa
 
 public InetAddress getAddress() { return endpoint.getAddress(); }
 public void setAddress(InetAddress ia) {
-endpoint.setAddress( ia );
-setAttribute(address,  + ia);
+endpoint.setAddress(ia);
+setAttribute(address, ia.toString());
+}
+
+
+public int getPort() { return endpoint.getPort(); }
+public void setPort(int port) {
+endpoint.setPort(port);
+setAttribute(port, Integer.toString(port));
 }
 
 



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



Re: svn commit: r1042713 - /tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java

2010-12-06 Thread sebb
On 6 December 2010 16:37,  ma...@apache.org wrote:
 Author: markt
 Date: Mon Dec  6 16:37:16 2010
 New Revision: 1042713

 URL: http://svn.apache.org/viewvc?rev=1042713view=rev
 Log:
 Fix another mix-up of connectionUploadTimeout and connectionTimeout

 Modified:
    tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java

 Modified: 
 tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
 URL: 
 http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java?rev=1042713r1=1042712r2=1042713view=diff
 ==
 --- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
 (original)
 +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
 Mon Dec  6 16:37:16 2010
 @@ -167,7 +167,6 @@ public abstract class AbstractHttp11Prot
     public void setSoTimeout( int i ) {
         endpoint.setSoTimeout(i);
         setAttribute(soTimeout,  + i);
 -        setAttribute(timeout,  + i);
         setAttribute(connectionTimeout,  + i);

Just a thought - could perhaps use String constants for these attributes?
The constants could be given descriptive names and Javadoc.

Might make it easier to find all the usages of the attribute name.
Also, if all the constants were collected in one place, it would be
easier to ensure uniqueness of attribute names.

[Some code checkers can be configured to complain about 'magic
numbers' - I wonder if there is a way to find 'magic strings' such as
these?]

     }




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



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



svn commit: r1042726 - in /tomcat/trunk/java/org/apache: coyote/AbstractProtocolHandler.java coyote/ajp/AbstractAjpProtocol.java coyote/ajp/AjpProtocol.java coyote/http11/AbstractHttp11Protocol.java t

2010-12-06 Thread markt
Author: markt
Date: Mon Dec  6 17:16:53 2010
New Revision: 1042726

URL: http://svn.apache.org/viewvc?rev=1042726view=rev
Log:
Re-factoring in support of 
https://issues.apache.org/bugzilla/show_bug.cgi?id=50360
Pull up timeout getters/setters.
Use -1 consistently for the default value of keepAliveTimeout

Modified:
tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1042726r1=1042725r2=1042726view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Mon Dec  6 
17:16:53 2010
@@ -200,6 +200,13 @@ public abstract class AbstractProtocolHa
 public void setSoLinger(int soLinger) { endpoint.setSoLinger(soLinger); }
 
 
+public int getKeepAliveTimeout() { return endpoint.getKeepAliveTimeout(); }
+public void setKeepAliveTimeout(int keepAliveTimeout) {
+endpoint.setKeepAliveTimeout(keepAliveTimeout);
+}
+
+
+
 // -- Properties that are passed through to the 
EndPoint
 //  and are made available as 
attributes
 
@@ -217,6 +224,34 @@ public abstract class AbstractProtocolHa
 }
 
 
+/*
+ * When Tomcat expects data from the client, this is the time Tomcat will
+ * wait for that data to arrive before closing the connection.
+ */
+public int getConnectionTimeout() {
+// Note that the endpoint uses the alternative name
+return endpoint.getSoTimeout();
+}
+public void setConnectionTimeout(int timeout) {
+// Note that the endpoint uses the alternative name
+endpoint.setSoTimeout(timeout);
+String str = Integer.toString(timeout);
+setAttribute(connectionTimeout, str);
+// Also set the attribute for the alternative name
+setAttribute(soTimeout, str);
+}
+
+/*
+ * Alternative name for connectionTimeout property
+ */
+public int getSoTimeout() {
+return getConnectionTimeout();
+}
+public void setSoTimeout(int timeout) {
+setConnectionTimeout(timeout);
+}
+
+
 //  Abstract 
methods
 /**
  * Concrete implementations need to provide access to their logger to be

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java?rev=1042726r1=1042725r2=1042726view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Mon Dec  6 
17:16:53 2010
@@ -78,7 +78,6 @@ public abstract class AbstractAjpProtoco
 Registry.getRegistry(null, null).unregisterComponent(rgOname);
 }
 
-// *
 public String getName() {
 String encodedAddr = ;
 if (getAddress() != null) {
@@ -90,9 +89,6 @@ public abstract class AbstractAjpProtoco
 return (ajp- + encodedAddr + endpoint.getPort());
 }
 
-public int getSoTimeout() { return endpoint.getSoTimeout(); }
-public void setSoTimeout(int soTimeout) { 
endpoint.setSoTimeout(soTimeout); }
-
 /**
  * Should authentication be done in the native webserver layer, 
  * or in the Servlet container ?
@@ -121,14 +117,6 @@ public abstract class AbstractAjpProtoco
 }
 
 
-/**
- * The number of seconds Tomcat will wait for a subsequent request
- * before closing the connection.
- */
-protected int keepAliveTimeout = -1;
-public int getKeepAliveTimeout() { return keepAliveTimeout; }
-public void setKeepAliveTimeout(int timeout) { keepAliveTimeout = timeout; 
}
-
 //  JMX related methods 
 
 protected String domain;

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java?rev=1042726r1=1042725r2=1042726view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java Mon Dec  6 
17:16:53 2010
@@ -237,7 +237,7 @@ public class AjpProtocol extends Abstrac
 processor.setAdapter(proto.adapter);
 

Re: svn commit: r1042495 - /tomcat/trunk/webapps/docs/changelog.xml

2010-12-06 Thread Sylvain Laurent
Are you using an automatic formatter ? if yes, which one ? Can you share its 
settings?

On 6 déc. 2010, at 01:17, ma...@apache.org wrote:

 Author: markt
 Date: Mon Dec  6 00:17:43 2010
 New Revision: 1042495
 
 URL: http://svn.apache.org/viewvc?rev=1042495view=rev
 Log:
 Line-length
 
 Modified:
tomcat/trunk/webapps/docs/changelog.xml
 
 Modified: tomcat/trunk/webapps/docs/changelog.xml
 URL: 
 http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1042495r1=1042494r2=1042495view=diff
 ==
 --- tomcat/trunk/webapps/docs/changelog.xml (original)
 +++ tomcat/trunk/webapps/docs/changelog.xml Mon Dec  6 00:17:43 2010
 @@ -38,7 +38,9 @@
   /properties
 
 body
 -!-- General, Catalina, Coyote, Jasper, Cluster, Web applications, Extras, 
 Other --
 +!--
 +  General, Catalina, Coyote, Jasper, Cluster, Web applications, Extras, Other
 +--
 section name=Tomcat 7.0.6 (markt)
   subsection name=Catalina
 changelog
 @@ -80,10 +82,10 @@
 generate session IDs. (markt)
   /update
   add
 -bug50282/bug: Load 
 codejavax.security.auth.login.Configuration/code
 -with codeJreMemoryLeakPreventionListener/code to avoid memory 
 leak
 -when stopping a web application that would use JAAS.
 -(slaurent)
 +bug50282/bug: Load
 +codejavax.security.auth.login.Configuration/code with
 +codeJreMemoryLeakPreventionListener/code to avoid memory leak 
 when
 +stopping a web application that would use JAAS. (slaurent)
   /add
   fix
 bug50351/bug: Fix the regression that broke BeanFactory resources
 
 
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: dev-h...@tomcat.apache.org
 


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



svn commit: r1042761 - /tomcat/trunk/build.xml

2010-12-06 Thread markt
Author: markt
Date: Mon Dec  6 19:20:57 2010
New Revision: 1042761

URL: http://svn.apache.org/viewvc?rev=1042761view=rev
Log:
Get the tests running again on the command line

Modified:
tomcat/trunk/build.xml

Modified: tomcat/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1042761r1=1042760r2=1042761view=diff
==
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Mon Dec  6 19:20:57 2010
@@ -994,7 +994,7 @@
includeantruntime=false
   classpath refid=tomcat.test.classpath /
   include name=org/apache/** /
-  include name=javax/servlet/** /
+  include name=javax/** /
 /javac
   /target
 



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



Re: svn:eol-style info for our new committers

2010-12-06 Thread Sylvain Laurent
Thanks, and sorry for the incorrect svn properties and formatting.

I'll try to compile a list of things to take care of for new committers and put 
it into the wiki.

On 6 déc. 2010, at 12:00, Rainer Jung wrote:

 There's the useful
 
 http://www.apache.org/dev/svn-eol-style.txt
 
 to configure svn.
 
 It is linked together with other useful info in the version control section of
 
 http://www.apache.org/dev/
 
 Regards,
 
 Rainer
 
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: dev-h...@tomcat.apache.org
 


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



Re: svn commit: r1042495 - /tomcat/trunk/webapps/docs/changelog.xml

2010-12-06 Thread Mark Thomas
On 06/12/2010 06:28, Sylvain Laurent wrote:
 Are you using an automatic formatter ?

Nope.

 if yes, which one ? Can you share its settings?

Although if I need one I tend to use Eclipse defaults but with spaces
rather than tabs.

Mark

 
 On 6 déc. 2010, at 01:17, ma...@apache.org wrote:
 
 Author: markt
 Date: Mon Dec  6 00:17:43 2010
 New Revision: 1042495

 URL: http://svn.apache.org/viewvc?rev=1042495view=rev
 Log:
 Line-length

 Modified:
tomcat/trunk/webapps/docs/changelog.xml

 Modified: tomcat/trunk/webapps/docs/changelog.xml
 URL: 
 http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1042495r1=1042494r2=1042495view=diff
 ==
 --- tomcat/trunk/webapps/docs/changelog.xml (original)
 +++ tomcat/trunk/webapps/docs/changelog.xml Mon Dec  6 00:17:43 2010
 @@ -38,7 +38,9 @@
   /properties

 body
 -!-- General, Catalina, Coyote, Jasper, Cluster, Web applications, Extras, 
 Other --
 +!--
 +  General, Catalina, Coyote, Jasper, Cluster, Web applications, Extras, 
 Other
 +--
 section name=Tomcat 7.0.6 (markt)
   subsection name=Catalina
 changelog
 @@ -80,10 +82,10 @@
 generate session IDs. (markt)
   /update
   add
 -bug50282/bug: Load 
 codejavax.security.auth.login.Configuration/code
 -with codeJreMemoryLeakPreventionListener/code to avoid memory 
 leak
 -when stopping a web application that would use JAAS.
 -(slaurent)
 +bug50282/bug: Load
 +codejavax.security.auth.login.Configuration/code with
 +codeJreMemoryLeakPreventionListener/code to avoid memory leak 
 when
 +stopping a web application that would use JAAS. (slaurent)
   /add
   fix
 bug50351/bug: Fix the regression that broke BeanFactory resources



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

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


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



svn commit: r1042775 - /tomcat/trunk/webapps/docs/config/http.xml

2010-12-06 Thread kkolinko
Author: kkolinko
Date: Mon Dec  6 20:19:03 2010
New Revision: 1042775

URL: http://svn.apache.org/viewvc?rev=1042775view=rev
Log:
Correct a typo

Modified:
tomcat/trunk/webapps/docs/config/http.xml

Modified: tomcat/trunk/webapps/docs/config/http.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/http.xml?rev=1042775r1=1042774r2=1042775view=diff
==
--- tomcat/trunk/webapps/docs/config/http.xml (original)
+++ tomcat/trunk/webapps/docs/config/http.xml Mon Dec  6 20:19:03 2010
@@ -302,7 +302,7 @@
 
 attribute name=connectionUploadTimeout required=false
   pSpecifies the timeout, in milliseconds, to use while a data upload is
-  in progress. The only takes effect if
+  in progress. This only takes effect if
   strongdisableUploadTimeout/strong is set to codefalse/code.
   /p
 /attribute



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



svn commit: r1042783 - in /tomcat/tc6.0.x/trunk/webapps/docs: changelog.xml logging.xml

2010-12-06 Thread kkolinko
Author: kkolinko
Date: Mon Dec  6 20:38:26 2010
New Revision: 1042783

URL: http://svn.apache.org/viewvc?rev=1042783view=rev
Log:
Port logging documentation updates from TC7.
(Actually, just a copy: there is nothing TC7 specific there yet).

This includes rewritten introductory section,
Christopher Schultz's patch for log4j configuration sample,
and some other earier changes.
CTR

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

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1042783r1=1042782r2=1042783view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Mon Dec  6 20:38:26 2010
@@ -351,6 +351,14 @@
   fix
 CVE-2010-4172: Multiple XSS in Manager application. (markt/kkolinko)
   /fix
+  update
+Improve Tomcat Logging documentation. (kkolinko)
+  /update
+  add
+bug50242/bug: Provide a sample log4j  configuration that more
+closely matches the default JULI configuration. Patch provided by
+Christopher Schultz. (kkolinko)
+  /add
   add
 bug50294/bug: Add more information to documentation regarding 
format
 of configuration files. Patch provided by Luke Meyer. (markt) 

Modified: tomcat/tc6.0.x/trunk/webapps/docs/logging.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/logging.xml?rev=1042783r1=1042782r2=1042783view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/logging.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/logging.xml Mon Dec  6 20:38:26 2010
@@ -36,38 +36,128 @@
 
   section name=Introduction
 p
-  Tomcat uses 
-  a href=http://commons.apache.org/logging;Commons Logging/a
-  throughout its internal code allowing the 
-  developer to choose a logging configuration that suits their needs, e.g
-  java.util.logging or 
-  a href=http://logging.apache.org/log4j;Log4J/a. 
-  Commons Logging provides Tomcat with the ability to log
-  hierarchically across various log levels without needing to rely on a
- particular logging implementation.
+  Logging in Apache Tomcat is implemented with the help of
+  a href=http://commons.apache.org/logging;Apache Commons Logging/a
+  library. That library is a thin wrapper above different logging
+  frameworks. It provides Tomcat with the ability to log
+  hierarchically across various log levels without the need to rely on a
+  particular logging implementation.
 /p
 
 p
-  By default, only java.util.logging is available for the logs generated by
-  the Tomcat internal loggers, as Tomcat uses a package renamed commons
-  logging implementation which is hardcoded to use java.util.logging. Use 
of
-  alternative logging frameworks requires building or downloading the
-  a href=extras.htmlextras/a components which include a full
-  commons-logging implementation. Instructions for configuring the extras
-  components to enable log4j to be used for Tomcat's internal logging may 
be
-  found below.
+  Since Tomcat 6.0, Tomcat uses a private package-renamed implementation of
+  Apache Commons Logging, to allow web applications to use their own
+  independent copies of the original Apache Commons Logging library.
+  In the default distribution this private copy of the library
+  is simplified and hardcoded to use the codejava.util.logging/code 
framework.
 /p
 
 p
-  Tomcat no longer uses codelocalhost_log/code as the runtime
-  exception/stack trace log. These types of error are usually thrown by
-  uncaught exceptions, but are still valuable to the developer. They can 
now
-  be found in the codestdout/code log.
+  To configure Tomcat to use alternative logging frameworks for its 
internal
+  logging, one has to replace the logging library with the one that is 
built
+  with the full implementation. Such library is provided as an a 
href=extras.htmlextras/a
+  component. Instructions on how to configure Tomcat to use Log4j framework
+  for its internal logging may be found below.
+/p
+
+p
+  A web application running on Apache Tomcat can:
+/p
+ul
+  li
+Use logging API provided by the Java Servlets specification,
+codejavax.servlet.ServletContext.log(...)/code
+  /li
+  li
+Use system logging API, codejava.util.logging/code.
+  /li
+  li
+Use any logging framework of its choice.
+  /li
+/ul
+
+p
+  The logging frameworks used by different web applications run 
independently
+  of each other. See a 

svn commit: r1042786 - in /tomcat/trunk/java/org/apache: catalina/core/ catalina/loader/ tomcat/util/threads/

2010-12-06 Thread slaurent
Author: slaurent
Date: Mon Dec  6 20:49:14 2010
New Revision: 1042786

URL: http://svn.apache.org/viewvc?rev=1042786view=rev
Log:
bug 49159: Improve ThreadLocal memory leak clean-up 
https://issues.apache.org/bugzilla/show_bug.cgi?id=49159

Various fixes after review by markt : formatting, use string manager, svn 
props...

Modified:
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/StandardThreadExecutor.java

tomcat/trunk/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java
   (contents, props changed)
tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
tomcat/trunk/java/org/apache/tomcat/util/threads/Constants.java   
(contents, props changed)
tomcat/trunk/java/org/apache/tomcat/util/threads/LocalStrings.properties   
(props changed)
tomcat/trunk/java/org/apache/tomcat/util/threads/TaskQueue.java
tomcat/trunk/java/org/apache/tomcat/util/threads/TaskThread.java   
(contents, props changed)
tomcat/trunk/java/org/apache/tomcat/util/threads/ThreadPoolExecutor.java

Modified: tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties?rev=1042786r1=1042785r2=1042786view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties Mon Dec  
6 20:49:14 2010
@@ -238,6 +238,8 @@ standardWrapper.unavailable=Marking serv
 standardWrapper.unloadException=Servlet {0} threw unload() exception
 standardWrapper.unloading=Cannot allocate servlet {0} because it is being 
unloaded
 standardWrapper.waiting=Waiting for {0} instance(s) to be deallocated
+threadLocalLeakPreventionListener.lifecycleEvent.error=Exception processing 
lifecycle event {0}
+threadLocalLeakPreventionListener.containerEvent.error=Exception processing 
container event {0}
 
 defaultInstanceManager.restrictedServletsResource=Restricted servlets property 
file not found
 defaultInstanceManager.privilegedServlet=Servlet of class {0} is privileged 
and cannot be loaded by this web application

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=1042786r1=1042785r2=1042786view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Mon Dec  6 
20:49:14 2010
@@ -2489,9 +2489,10 @@ public class StandardContext extends Con
 return this.renewThreadsWhenStoppingContext;
 }
 
-public void setRenewThreadsWhenStoppingContext(boolean 
renewThreadsWhenStoppingContext) {
+public void setRenewThreadsWhenStoppingContext(
+boolean renewThreadsWhenStoppingContext) {
 boolean oldRenewThreadsWhenStoppingContext =
-this.renewThreadsWhenStoppingContext;
+this.renewThreadsWhenStoppingContext;
 this.renewThreadsWhenStoppingContext = renewThreadsWhenStoppingContext;
 support.firePropertyChange(renewThreadsWhenStoppingContext,
 oldRenewThreadsWhenStoppingContext,

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=1042786r1=1042785r2=1042786view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardThreadExecutor.java Mon 
Dec  6 20:49:14 2010
@@ -88,7 +88,8 @@ public class StandardThreadExecutor exte
  * renewing all threads at the same time, this delay is observed between 2
  * threads being renewed.
  */
-protected long threadRenewalDelay = 1000L;
+protected long threadRenewalDelay = 
+org.apache.tomcat.util.threads.Constants.DEFAULT_THREAD_RENEWAL_DELAY;
 
 private TaskQueue taskqueue = null;
 // -- Constructors

Modified: 
tomcat/trunk/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java?rev=1042786r1=1042785r2=1042786view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java
 (original)
+++ 
tomcat/trunk/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java
 

Re: svn commit: r1042482 - in /tomcat/trunk: ./ conf/ java/org/apache/catalina/core/ java/org/apache/catalina/loader/ java/org/apache/tomcat/util/threads/ res/confinstall/ webapps/ webapps/docs/ webap

2010-12-06 Thread Sylvain Laurent
I fixed most of your points except one, see below.

On 6 déc. 2010, at 01:09, Mark Thomas wrote:

 On 05/12/2010 22:54, slaur...@apache.org wrote:
 Author: slaurent
 Date: Sun Dec  5 22:54:05 2010
 New Revision: 1042482
 
 URL: http://svn.apache.org/viewvc?rev=1042482view=rev
 
 General comments:
 
 Numerous new lines with length  80 chars.

Actually I had configured eclipse for 80 chars but the default line-wrapping 
settings are such that it does not wrap in several cases...

 ASF policy is to strongly discourage author tags.
fixed

 Your svn client should be configured to set svn:eol-style native on new
 text files.
OK, done for future new files.

 Modified:
tomcat/trunk/   (props changed)
tomcat/trunk/conf/   (props changed)
tomcat/trunk/webapps/(props changed)
 -1 to all these changes.
 a) This is not a Tomcat instance for running. That is created in output.
 b) It reverts a useful change I made earlier today
Sorry, I did not realize there could be changes on directories with SVN. For 
debugging I launch tomcat from the base directory and this creates directories 
likes log, work, etc...
I believe you fixed this.

 Added: 
 tomcat/trunk/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java
 
 +private static final Log log = LogFactory
 +.getLog(ThreadLocalLeakPreventionListener.class);
 That is an odd place for a line-break that I find hard to read. I find
 either of the following easier to read:
 
 private static final Log log =
LogFactory.getLog(ThreadLocalLeakPreventionListener.class);
 
 private static final Log log = LogFactory.getLog(
ThreadLocalLeakPreventionListener.class);
 
 There are multiple instances of this throughout the commit.

Still the default eclipse formatter... We should really provide eclipse 
formatter settings. Formatting code by hand is really a waste of time.

 
 +public void lifecycleEvent(LifecycleEvent event) {
 +try {
 +Lifecycle lifecycle = event.getLifecycle();
 +if (Lifecycle.AFTER_START_EVENT.equals(event.getType())
 + lifecycle instanceof Server) {
 With the operator on the new line it is easy to miss what is going on.
 Generally, Tomcat style is to put the operator on the first line. e.g.
 if (Lifecycle.AFTER_START_EVENT.equals(event.getType()) 
lifecycle instanceof Server) {
 
 There are multiple instances of this throughout the commit.

Still eclipse. But I did not manage to find a setting to change this behavior 
:-(

 
 +} catch (Exception e) {
 +log.error(Exception processing event  + event, e);
 +}
 Error messages really should be using a StringManager.
 There are multiple instances of this throughout the commit.

done.

 +protected void processContainerRemoveChild(Container parent, Container 
 child) {
 +
 +if (log.isDebugEnabled())
 +log.debug(Process removeChild[parent= + parent + ,child=
 ++ child + ]);
 +
 +try {
 +if (child instanceof Context) {
 +Context context = (Context) child;
 +context.removeLifecycleListener(this);
 +} else if (child instanceof Host) {
 +Host host = (Host) child;
 +host.removeContainerListener(this);
 +} else if (child instanceof Engine) {
 +Engine engine = (Engine) child;
 +engine.removeContainerListener(this);
 +}
 Why all this? Just use:
 child.removeLifecycleListener(this);

No, it's not the same. The listener is interested in both LifeCycle events for 
Context, and Container events for Host and Engine. These are not the same 
things.

 Does the fact the Container implements Lifecycle simplify any of the
 other code here?
Can't tell.

 Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
 -private void clearThreadLocalMap(Object map, Field internalTableField)
 +private void checkThreadLocalMapForLeaks(Object map, Field 
 internalTableField)
 throws NoSuchMethodException, IllegalAccessException,
 NoSuchFieldException, InvocationTargetException {
 Not all of those Exceptions are required after this commit.
Fixed.



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



Re: svn commit: r1042482 - in /tomcat/trunk: ./ conf/ java/org/apache/catalina/core/ java/org/apache/catalina/loader/ java/org/apache/tomcat/util/threads/ res/confinstall/ webapps/ webapps/docs/ webap

2010-12-06 Thread Mark Thomas
On 06/12/2010 21:01, Sylvain Laurent wrote:
 I fixed most of your points except one, see below.

 +protected void processContainerRemoveChild(Container parent, Container 
 child) {
 +
 +if (log.isDebugEnabled())
 +log.debug(Process removeChild[parent= + parent + ,child=
 ++ child + ]);
 +
 +try {
 +if (child instanceof Context) {
 +Context context = (Context) child;
 +context.removeLifecycleListener(this);
 +} else if (child instanceof Host) {
 +Host host = (Host) child;
 +host.removeContainerListener(this);
 +} else if (child instanceof Engine) {
 +Engine engine = (Engine) child;
 +engine.removeContainerListener(this);
 +}
 Why all this? Just use:
 child.removeLifecycleListener(this);
 
 No, it's not the same. The listener is interested in both LifeCycle events 
 for Context, and Container events for Host and Engine. These are not the same 
 things.

You can still drop the casts though and just call
child.removeLifecycleListener() and child.removeContainerListener()

Some of the other fixes still look a little odd. I suspect the Eclipse
formatter. I'll highlight those in a separate e-mail.

Mark

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



Re: svn commit: r1042786 - in /tomcat/trunk/java/org/apache: catalina/core/ catalina/loader/ tomcat/util/threads/

2010-12-06 Thread Mark Thomas
On 06/12/2010 20:49, slaur...@apache.org wrote:
 Author: slaurent
 Date: Mon Dec  6 20:49:14 2010
 New Revision: 1042786
 
 URL: http://svn.apache.org/viewvc?rev=1042786view=rev


 @@ -63,7 +72,7 @@ public class ThreadLocalLeakPreventionLi
  try {
  Lifecycle lifecycle = event.getLifecycle();
  if (Lifecycle.AFTER_START_EVENT.equals(event.getType())
 - lifecycle instanceof Server) {
 + lifecycle instanceof Server) {
  // when the server starts, we register ourself as listener 
 for
  // all context
  // as well as container event listener so that we know when 
 new

That indenting is now misleading (it was fine before) and the operator
is still at the beginning of the line.


 -log.error(Exception processing event  + event, e);
 +String msg =
 +sm.getString(
 +threadLocalLeakPreventionListener.lifecycleEvent.error,
 +event);
 +log.error(msg, e);

More auto formatting helpfulness by the look of it. No reason for
String msg = sm.getString(
not to be on one line.

If we can pull some Eclipse settings together to help folks with this
that would be great.

Mark

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



svn commit: r1042798 - in /tomcat/trunk/java/org/apache/catalina: LifecycleException.java connector/Connector.java connector/LocalStrings.properties

2010-12-06 Thread markt
Author: markt
Date: Mon Dec  6 21:25:07 2010
New Revision: 1042798

URL: http://svn.apache.org/viewvc?rev=1042798view=rev
Log:
Include root cause in LifecycleException stack traces

Modified:
tomcat/trunk/java/org/apache/catalina/LifecycleException.java
tomcat/trunk/java/org/apache/catalina/connector/Connector.java
tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties

Modified: tomcat/trunk/java/org/apache/catalina/LifecycleException.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/LifecycleException.java?rev=1042798r1=1042797r2=1042798view=diff
==
--- tomcat/trunk/java/org/apache/catalina/LifecycleException.java (original)
+++ tomcat/trunk/java/org/apache/catalina/LifecycleException.java Mon Dec  6 
21:25:07 2010
@@ -39,9 +39,7 @@ public final class LifecycleException ex
  * Construct a new LifecycleException with no other information.
  */
 public LifecycleException() {
-
-this(null, null);
-
+super();
 }
 
 
@@ -51,9 +49,7 @@ public final class LifecycleException ex
  * @param message Message describing this exception
  */
 public LifecycleException(String message) {
-
-this(message, null);
-
+super(message);
 }
 
 
@@ -63,9 +59,7 @@ public final class LifecycleException ex
  * @param throwable Throwable that caused this exception
  */
 public LifecycleException(Throwable throwable) {
-
-this(null, throwable);
-
+super(throwable);
 }
 
 
@@ -77,72 +71,6 @@ public final class LifecycleException ex
  * @param throwable Throwable that caused this exception
  */
 public LifecycleException(String message, Throwable throwable) {
-
-super();
-this.message = message;
-this.throwable = throwable;
-
+super(message, throwable);
 }
-
-
-//-- Instance Variables
-
-
-/**
- * The error message passed to our constructor (if any)
- */
-protected String message = null;
-
-
-/**
- * The underlying exception or error passed to our constructor (if any)
- */
-protected Throwable throwable = null;
-
-
-//-- Public Methods
-
-
-/**
- * Returns the message associated with this exception, if any.
- */
-@Override
-public String getMessage() {
-
-return (message);
-
-}
-
-
-/**
- * Returns the throwable that caused this exception, if any.
- */
-public Throwable getThrowable() {
-
-return (throwable);
-
-}
-
-
-/**
- * Return a formatted string that describes this exception.
- */
-@Override
-public String toString() {
-
-StringBuilder sb = new StringBuilder(LifecycleException:  );
-if (message != null) {
-sb.append(message);
-if (throwable != null) {
-sb.append(:  );
-}
-}
-if (throwable != null) {
-sb.append(throwable.toString());
-}
-return (sb.toString());
-
-}
-
-
-}
+}
\ No newline at end of file

Modified: tomcat/trunk/java/org/apache/catalina/connector/Connector.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Connector.java?rev=1042798r1=1042797r2=1042798view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Connector.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Connector.java Mon Dec  6 
21:25:07 2010
@@ -904,7 +904,7 @@ public class Connector extends Lifecycle
 } catch (Exception e) {
 throw new LifecycleException
 (sm.getString
- (coyoteConnector.protocolHandlerInitializationFailed, e));
+ (coyoteConnector.protocolHandlerInitializationFailed), e);
 }
 
 onameProtocolHandler = register(protocolHandler,
@@ -935,7 +935,7 @@ public class Connector extends Lifecycle
 
 throw new LifecycleException
 (errPrefix +   + sm.getString
- (coyoteConnector.protocolHandlerStartFailed, e));
+ (coyoteConnector.protocolHandlerStartFailed), e);
 }
 
 mapperListener.start();
@@ -957,7 +957,7 @@ public class Connector extends Lifecycle
 } catch (Exception e) {
 throw new LifecycleException
 (sm.getString
- (coyoteConnector.protocolHandlerStopFailed, e));
+ (coyoteConnector.protocolHandlerStopFailed), e);
 }
 
 mapperListener.stop();
@@ -974,7 +974,7 @@ public class Connector extends Lifecycle
 } catch (Exception e) {
 throw new LifecycleException
 (sm.getString
- 

svn commit: r1042814 - in /tomcat/trunk/java/org/apache/coyote: AbstractProtocolHandler.java ajp/AbstractAjpProtocol.java http11/AbstractHttp11JsseProtocol.java http11/AbstractHttp11Protocol.java

2010-12-06 Thread markt
Author: markt
Date: Mon Dec  6 22:06:52 2010
New Revision: 1042814

URL: http://svn.apache.org/viewvc?rev=1042814view=rev
Log:
Re-factoring in support of 
https://issues.apache.org/bugzilla/show_bug.cgi?id=50360
Pull up JMX related methods
Tidy up the remaining protocol specific methods

Modified:
tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11JsseProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1042814r1=1042813r2=1042814view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Mon Dec  6 
22:06:52 2010
@@ -22,6 +22,7 @@ import java.util.Iterator;
 import java.util.concurrent.Executor;
 
 import javax.management.MBeanRegistration;
+import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import org.apache.juli.logging.Log;
@@ -252,10 +253,76 @@ public abstract class AbstractProtocolHa
 }
 
 
+// -- Public 
methods
+
+/**
+ * The name will be prefix-address-port if address is non-null and
+ * prefix-port if the address is null. The name will be appropriately 
quoted
+ * so it can be used directly in an ObjectName.
+ */
+public String getName() {
+StringBuilder name = new StringBuilder(getNamePrefix());
+name.append('-');
+if (getAddress() != null) {
+name.append(getAddress());
+name.append('-');
+}
+name.append(endpoint.getPort());
+return ObjectName.quote(name.toString());
+}
+
+
 //  Abstract 
methods
+
 /**
  * Concrete implementations need to provide access to their logger to be
  * used by the abstract classes.
  */
 protected abstract Log getLog();
+
+
+/**
+ * Obtain the prefix to be used when construction a name for this protocol
+ * handler. The name will be prefix-address-port.
+ */
+protected abstract String getNamePrefix();
+
+
+// - JMX related 
methods
+
+protected String domain;
+protected ObjectName oname;
+protected MBeanServer mserver;
+
+public ObjectName getObjectName() {
+return oname;
+}
+
+public String getDomain() {
+return domain;
+}
+
+@Override
+public ObjectName preRegister(MBeanServer server, ObjectName name)
+throws Exception {
+oname = name;
+mserver = server;
+domain = name.getDomain();
+return name;
+}
+
+@Override
+public void postRegister(Boolean registrationDone) {
+// NOOP
+}
+
+@Override
+public void preDeregister() throws Exception {
+// NOOP
+}
+
+@Override
+public void postDeregister() {
+// NOOP
+}
 }

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java?rev=1042814r1=1042813r2=1042814view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Mon Dec  6 
22:06:52 2010
@@ -16,21 +16,66 @@
  */
 package org.apache.coyote.ajp;
 
-import java.net.URLEncoder;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
 import org.apache.coyote.AbstractProtocolHandler;
 import org.apache.tomcat.util.modeler.Registry;
 import org.apache.tomcat.util.res.StringManager;
 
 public abstract class AbstractAjpProtocol extends AbstractProtocolHandler {
+
 /**
  * The string manager for this package.
  */
-protected static final StringManager sm = 
StringManager.getManager(Constants.Package);
-
+protected static final StringManager sm =
+StringManager.getManager(Constants.Package);
+
+
+// - AJP specific 
properties
+// -- managed in the 
ProtocolHandler
+
+/**
+ * Should authentication be done in the native webserver layer, 
+ * or in the Servlet container ?
+ */
+protected boolean tomcatAuthentication = true;
+public boolean getTomcatAuthentication() { return tomcatAuthentication; }
+public void setTomcatAuthentication(boolean tomcatAuthentication) {
+ 

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

2010-12-06 Thread kkolinko
Author: kkolinko
Date: Mon Dec  6 22:14:06 2010
New Revision: 1042815

URL: http://svn.apache.org/viewvc?rev=1042815view=rev
Log:
Proposal for bug 50201

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=1042815r1=1042814r2=1042815view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Dec  6 22:14:06 2010
@@ -203,7 +203,7 @@ PATCHES PROPOSED TO BACKPORT:
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50201
-  Handle ROOT webapp redployment, host start/stop etc for default access log
+  Handle ROOT webapp redeployment, host start/stop etc for default access log
   http://people.apache.org/~markt/patches/2010-12-05-bug50201-tc6.patch
   +1: markt
   -1: kkolinko:
@@ -239,6 +239,26 @@ PATCHES PROPOSED TO BACKPORT:
  and won't reenable the access log.
  markt: Fixed in updated patch above
 
+  kkolinko: (Re: markt's 2010-12-05-bug50201-tc6.patch)
+  7) Why Lifecycle.DESTROY_EVENT.endsWith(type) in a condition?
+ s/endsWith/equals/
+  8) I do not see how the listener can be reused when recalculation
+ happens.
+ (We are now installing a new listener when NoAccessLog wins,
+ so my understanding is that it is no more necessary to wait for
+ reuse there. The new listener will catch all the necessary events).
+ Thus all events that force recalculation should result
+ in disabling the listener.
+  9) I propose to use an AtomicReference to guard against registering
+ duplicate listeners (a fix for 4)). See the patch.
+  10) I added install() and uninstall() method to AccessLogListener
+  to help register/unregister the listeners.
+  Here is an amended version of Mark's patch that includes 7),8),9),10). 
+  I have not applied those changes to TC7 yet, and it might need some more
+  testing:
+  http://people.apache.org/~kkolinko/patches/2010-12-07_tc6_bug50201.patch
+
+
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48973
   Avoid creating file SESSIONS.ser if there's no session.
   The patch provided by Marc Guillemot works for tc 6  7



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



svn commit: r1042816 - /tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java

2010-12-06 Thread markt
Author: markt
Date: Mon Dec  6 22:19:35 2010
New Revision: 1042816

URL: http://svn.apache.org/viewvc?rev=1042816view=rev
Log:
Fix auto-completion snafu

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

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java?rev=1042816r1=1042815r2=1042816view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java Mon Dec  6 
22:19:35 2010
@@ -424,7 +424,7 @@ public class StandardEngine extends Cont
 // Force re-calculation but do not disable listener since it
 // might be re-used
 engine.defaultAccessLog = null;
-} else if (Lifecycle.BEFORE_DESTROY_EVENT.endsWith(type)) {
+} else if (Lifecycle.BEFORE_DESTROY_EVENT.equals(type)) {
 // Container is being removed
 // Force re-calculation and disable listener since it won't
 // be re-used



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



svn commit: r1042850 - in /tomcat/trunk/java/org/apache: coyote/ coyote/ajp/ coyote/http11/ tomcat/util/net/

2010-12-06 Thread markt
Author: markt
Date: Mon Dec  6 23:22:44 2010
New Revision: 1042850

URL: http://svn.apache.org/viewvc?rev=1042850view=rev
Log:
Re-factoring in support of 
https://issues.apache.org/bugzilla/show_bug.cgi?id=50360
Add the necessary plumbing for the AbstractProtocolHandler to perform the JMX 
registration

Modified:
tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1042850r1=1042849r2=1042850view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Mon Dec  6 
23:22:44 2010
@@ -27,6 +27,7 @@ import javax.management.ObjectName;
 
 import org.apache.juli.logging.Log;
 import org.apache.tomcat.util.net.AbstractEndpoint;
+import org.apache.tomcat.util.net.AbstractEndpoint.Handler;
 import org.apache.tomcat.util.res.StringManager;
 
 public abstract class AbstractProtocolHandler implements ProtocolHandler,
@@ -288,6 +289,12 @@ public abstract class AbstractProtocolHa
 protected abstract String getNamePrefix();
 
 
+/**
+ * Obtain the handler associated with the underlying Endpoint
+ */
+protected abstract Handler getHandler();
+
+
 // - JMX related 
methods
 
 protected String domain;

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java?rev=1042850r1=1042849r2=1042850view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java Mon Dec  6 
23:22:44 2010
@@ -30,6 +30,7 @@ import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.modeler.Registry;
+import org.apache.tomcat.util.net.AbstractEndpoint;
 import org.apache.tomcat.util.net.AprEndpoint;
 import org.apache.tomcat.util.net.AprEndpoint.Handler;
 import org.apache.tomcat.util.net.SocketStatus;
@@ -52,6 +53,13 @@ public class AjpAprProtocol extends Abst
 @Override
 protected Log getLog() { return log; }
 
+
+@Override
+protected AbstractEndpoint.Handler getHandler() {
+return cHandler;
+}
+
+
 //  Constructor
 
 
@@ -143,6 +151,10 @@ public class AjpAprProtocol extends Abst
 protected AjpAprProtocol proto;
 protected AtomicLong registerCount = new AtomicLong(0);
 protected RequestGroupInfo global = new RequestGroupInfo();
+@Override
+public RequestGroupInfo getGlobal() {
+return global;
+}
 
 protected ConcurrentHashMapSocketWrapperLong, AjpAprProcessor 
connections =
 new ConcurrentHashMapSocketWrapperLong, AjpAprProcessor();

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java?rev=1042850r1=1042849r2=1042850view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java Mon Dec  6 
23:22:44 2010
@@ -31,7 +31,7 @@ import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.modeler.Registry;
-import org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState;
+import org.apache.tomcat.util.net.AbstractEndpoint;
 import org.apache.tomcat.util.net.JIoEndpoint;
 import org.apache.tomcat.util.net.JIoEndpoint.Handler;
 import org.apache.tomcat.util.net.SocketStatus;
@@ -54,6 +54,13 @@ public class AjpProtocol extends Abstrac
 @Override
 protected Log getLog() { return log; }
 
+
+@Override
+protected AbstractEndpoint.Handler getHandler() {
+return cHandler;
+}
+
+
 //  Constructor
 
 
@@ -133,6 +140,11 @@ public class AjpProtocol extends Abstrac
 protected 

svn commit: r1042873 - in /tomcat/trunk/java/org/apache: coyote/ coyote/ajp/ coyote/http11/ tomcat/util/net/

2010-12-06 Thread markt
Author: markt
Date: Tue Dec  7 00:08:38 2010
New Revision: 1042873

URL: http://svn.apache.org/viewvc?rev=1042873view=rev
Log:
Re-factoring in support of 
https://issues.apache.org/bugzilla/show_bug.cgi?id=50360
Pull up the concrete destroy() method - required a fair bit of refactoring
Pull up the abstract init() method()

Modified:
tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
tomcat/trunk/java/org/apache/coyote/LocalStrings.properties
tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java
tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1042873r1=1042872r2=1042873view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Tue Dec  7 
00:08:38 2010
@@ -26,6 +26,7 @@ import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import org.apache.juli.logging.Log;
+import org.apache.tomcat.util.modeler.Registry;
 import org.apache.tomcat.util.net.AbstractEndpoint;
 import org.apache.tomcat.util.net.AbstractEndpoint.Handler;
 import org.apache.tomcat.util.res.StringManager;
@@ -332,4 +333,33 @@ public abstract class AbstractProtocolHa
 public void postDeregister() {
 // NOOP
 }
+
+
+// --- Lifecycle 
methods
+
+// TODO Keep current state and check for invalid transitions
+
+@Override
+public abstract void init() throws Exception;
+
+
+@Override
+public final void destroy() {
+if(getLog().isInfoEnabled()) {
+getLog().info(sm.getString(abstractProtocolHandler.destroy,
+getName()));
+}
+try {
+endpoint.destroy();
+} catch (Exception e) {
+getLog().error(sm.getString(
+abstractProtocolHandler.endPointDestroyError, getName()),
+e);
+}
+
+if( tpOname!=null )
+Registry.getRegistry(null, null).unregisterComponent(tpOname);
+if( rgOname != null )
+Registry.getRegistry(null, null).unregisterComponent(rgOname);
+}
 }

Modified: tomcat/trunk/java/org/apache/coyote/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/LocalStrings.properties?rev=1042873r1=1042872r2=1042873view=diff
==
--- tomcat/trunk/java/org/apache/coyote/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/coyote/LocalStrings.properties Tue Dec  7 
00:08:38 2010
@@ -15,5 +15,7 @@
 
 abstractProtocolHandler.getAttribute=Get attribute [{0}] with value [{1}]
 abstractProtocolHandler.setAttribute=Set attribute [{0}] with value [{1}]
+abstractProtocolHandler.endPointDestroyError=Failed to destroy end point 
associated with ProtocolHandler [{0}]
+abstractProtocolHandler.destroy=Destroying ProtocolHandler [{0}]
 
 asyncStateMachine.invalidAsyncState=Calling [{0}] is not valid for a request 
with Async state [{1}]

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java?rev=1042873r1=1042872r2=1042873view=diff
==
--- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Tue Dec  7 
00:08:38 2010
@@ -17,7 +17,6 @@
 package org.apache.coyote.ajp;
 
 import org.apache.coyote.AbstractProtocolHandler;
-import org.apache.tomcat.util.modeler.Registry;
 import org.apache.tomcat.util.res.StringManager;
 
 public abstract class AbstractAjpProtocol extends AbstractProtocolHandler {
@@ -114,16 +113,4 @@ public abstract class AbstractAjpProtoco
 if (getLog().isInfoEnabled())
 getLog().info(sm.getString(ajpprotocol.stop, getName()));
 }
-
-
-@Override
-public void