svn commit: r325874 - in /tomcat/container/tc5.5.x: catalina/src/share/org/apache/catalina/connector/Request.java catalina/src/share/org/apache/catalina/realm/RealmBase.java webapps/docs/changelog.xml
Author: remm Date: Mon Oct 17 03:39:15 2005 New Revision: 325874 URL: http://svn.apache.org/viewcvs?rev=325874&view=rev Log: - 37044: RealmBase.hasResourcePermission needs access to the GenericPrincipal as the JAAS realm no longer overrides hasRole. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Request.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Request.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Request.java?rev=325874&r1=325873&r2=325874&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Request.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Request.java Mon Oct 17 03:39:15 2005 @@ -2133,6 +2133,14 @@ /** * Return the principal that has been authenticated for this Request. */ +public Principal getPrincipal() { +return (userPrincipal); +} + + +/** + * Return the principal that has been authenticated for this Request. + */ public Principal getUserPrincipal() { if (userPrincipal instanceof GenericPrincipal) { return ((GenericPrincipal) userPrincipal).getUserPrincipal(); Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java?rev=325874&r1=325873&r2=325874&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java Mon Oct 17 03:39:15 2005 @@ -723,7 +723,7 @@ } // Which user principal have we already authenticated? -Principal principal = request.getUserPrincipal(); +Principal principal = request.getPrincipal(); for(int i=0; i < constraints.length; i++) { SecurityConstraint constraint = constraints[i]; String roles[] = constraint.findAuthRoles(); Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=325874&r1=325873&r2=325874&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Mon Oct 17 03:39:15 2005 @@ -52,6 +52,11 @@ 34724: Ability to set domain for Single-Sign-On cookie. Patch by Oliver Rossmueller. (yoavs) + +37044: RealmBase.hasResourcePermission needs to access the GenericPrincipal as +set by the realm unless hasRole is overriden, which was no longer being done properly for +the JAAS realm (remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r326292 - in /tomcat: connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java container/tc5.5.x/webapps/docs/changelog.xml
Author: remm Date: Tue Oct 18 16:04:30 2005 New Revision: 326292 URL: http://svn.apache.org/viewcvs?rev=326292&view=rev Log: - 37121: Sendfile always needs to be given the length of data to write, not the end of the range. Ranged requests behaved in a weird way and ended with an error status because of that. Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=326292&r1=326291&r2=326292&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Tue Oct 18 16:04:30 2005 @@ -1341,7 +1341,7 @@ Socket.timeoutSet(data.socket, 0); while (true) { long nw = Socket.sendfile(data.socket, data.fd, null, null, - data.pos, data.end, 0); + data.pos, data.end - data.pos, 0); if (nw < 0) { if (!(-nw == Status.EAGAIN)) { Socket.destroy(data.socket); Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=326292&r1=326291&r2=326292&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Tue Oct 18 16:04:30 2005 @@ -71,6 +71,10 @@ 36630: Added extra log output for class instantiation failure. (yoavs) + +37121: Sendfile always needs to be given the length of data to write, + which fixes ranged requests. (remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r328876 - in /tomcat/container/tc5.5.x: catalina/src/share/org/apache/catalina/core/StandardContext.java webapps/docs/changelog.xml
Author: remm Date: Thu Oct 27 07:02:41 2005 New Revision: 328876 URL: http://svn.apache.org/viewcvs?rev=328876&view=rev Log: - 37264: JNDI resources were no longer available when stopping listeners. - Not tested well. - Submitted by Bogdan Calmac. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java?rev=328876&r1=328875&r2=328876&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java Thu Oct 27 07:02:41 2005 @@ -4271,6 +4271,9 @@ // Stop our filters filterStop(); +// Stop our application listeners +listenerStop(); + // Stop ContainerBackgroundProcessor thread super.threadStop(); @@ -4301,9 +4304,6 @@ if (children[i] instanceof Lifecycle) ((Lifecycle) children[i]).stop(); } - -// Stop our application listeners -listenerStop(); // Clear all application-originated servlet context attributes if (context != null) Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=328876&r1=328875&r2=328876&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Thu Oct 27 07:02:41 2005 @@ -57,6 +57,10 @@ set by the realm unless hasRole is overriden, which was no longer being done properly for the JAAS realm (remm) + +37264: JNDI resources were no longer available when stopping listeners, +submitted by Bogdan Calmac (remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r330798 - /tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java
Author: remm Date: Fri Nov 4 03:51:02 2005 New Revision: 330798 URL: http://svn.apache.org/viewcvs?rev=330798&view=rev Log: - Use the new methods from Mladen in the AJP connector. Modified: tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Modified: tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=330798&r1=330797&r2=330798&view=diff == --- tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java (original) +++ tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Fri Nov 4 03:51:02 2005 @@ -347,6 +347,8 @@ // Setting up the socket this.socket = socket; +Socket.setrbb(this.socket, inputBuffer); +Socket.setsbb(this.socket, outputBuffer); // Error flag error = false; @@ -999,8 +1001,8 @@ inputBuffer.position(0); } while (inputBuffer.remaining() < n) { -int nRead = Socket.recvb -(socket, inputBuffer, inputBuffer.limit(), +int nRead = Socket.recvbb +(socket, inputBuffer.limit(), inputBuffer.capacity() - inputBuffer.limit()); if (nRead > 0) { inputBuffer.limit(inputBuffer.limit() + nRead); @@ -1031,8 +1033,8 @@ inputBuffer.position(0); } while (inputBuffer.remaining() < n) { -int nRead = Socket.recvbt -(socket, inputBuffer, inputBuffer.limit(), +int nRead = Socket.recvbbt +(socket, inputBuffer.limit(), inputBuffer.capacity() - inputBuffer.limit(), readTimeout); if (nRead > 0) { inputBuffer.limit(inputBuffer.limit() + nRead); @@ -1166,7 +1168,7 @@ protected void flush() throws IOException { if (outputBuffer.position() > 0) { -if (Socket.sendb(socket, outputBuffer, 0, outputBuffer.position()) < 0) { +if (Socket.sendbb(socket, 0, outputBuffer.position()) < 0) { throw new IOException(sm.getString("ajpprotocol.failedwrite")); } outputBuffer.clear(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r331249 - in /tomcat: connectors/trunk/coyote/src/java/org/apache/coyote/ connectors/trunk/http11/src/java/org/apache/coyote/http11/ connectors/trunk/jk/java/org/apache/coyote/ajp/ connect
Author: remm Date: Mon Nov 7 01:57:55 2005 New Revision: 331249 URL: http://svn.apache.org/viewcvs?rev=331249&view=rev Log: - Fix swallowed NPE problem with APR connectors when there's no host header. The mapper will simply use the default host name in that case. - Some small cleanups also, like removing the unused Request.localHost field. Modified: tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Request.java tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Processor.java tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java tomcat/connectors/trunk/util/java/org/apache/tomcat/util/http/mapper/Mapper.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/CoyoteAdapter.java Modified: tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Request.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Request.java?rev=331249&r1=331248&r2=331249&view=diff == --- tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Request.java (original) +++ tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Request.java Mon Nov 7 01:57:55 2005 @@ -88,8 +88,6 @@ private int serverPort = -1; private MessageBytes serverNameMB = MessageBytes.newInstance(); -private String localHost; - private int remotePort; private int localPort; @@ -244,14 +242,6 @@ public MessageBytes localAddr() { return localAddrMB; } - -public String getLocalHost() { -return localHost; -} - -public void setLocalHost(String host) { -this.localHost = host; -} public int getRemotePort(){ return remotePort; Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=331249&r1=331248&r2=331249&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Mon Nov 7 01:57:55 2005 @@ -1400,12 +1400,7 @@ // HTTP/1.0 // Default is what the socket tells us. Overriden if a host is // found/parsed -request.setServerPort(endpoint.getPort()/*socket.getLocalPort()*/); -InetAddress localAddress = endpoint.getAddress()/*socket.getLocalAddress()*/; -// Setting the socket-related fields. The adapter doesn't know -// about socket. -request.setLocalHost(localAddress.getHostName()); -request.serverName().setString(localAddress.getHostName()); +request.setServerPort(endpoint.getPort()); return; } Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Processor.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Processor.java?rev=331249&r1=331248&r2=331249&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Processor.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Processor.java Mon Nov 7 01:57:55 2005 @@ -1355,7 +1355,6 @@ InetAddress localAddress = socket.getLocalAddress(); // Setting the socket-related fields. The adapter doesn't know // about socket. -request.setLocalHost(localAddress.getHostName()); request.serverName().setString(localAddress.getHostName()); return; } Modified: tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=331249&r1=331248&r2=331249&view=diff == --- tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java (original) +++ tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Mon Nov 7 01:57:55 2005 @@ -834,18 +834,7 @@ // HTTP/1.0 // Default is what the socket tells us. Overriden if a host is // found/parsed -request.setServerPort(endpoint.getPort()/*socket.getLocalPort()*/); -InetAddress localAddress = endpoint.getAddress()/*socket.getLocalAddress()*/; -
svn commit: r331250 - /tomcat/connectors/trunk/juli/src/java/org/apache/juli/ClassLoaderLogManager.java
Author: remm Date: Mon Nov 7 02:01:09 2005 New Revision: 331250 URL: http://svn.apache.org/viewcvs?rev=331250&view=rev Log: - Remove asserts for better JDK compatibility. Modified: tomcat/connectors/trunk/juli/src/java/org/apache/juli/ClassLoaderLogManager.java Modified: tomcat/connectors/trunk/juli/src/java/org/apache/juli/ClassLoaderLogManager.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/juli/src/java/org/apache/juli/ClassLoaderLogManager.java?rev=331250&r1=331249&r2=331250&view=diff == --- tomcat/connectors/trunk/juli/src/java/org/apache/juli/ClassLoaderLogManager.java (original) +++ tomcat/connectors/trunk/juli/src/java/org/apache/juli/ClassLoaderLogManager.java Mon Nov 7 02:01:09 2005 @@ -486,7 +486,6 @@ } LogNode findNode(String name) { -assert name != null && name.length() > 0; LogNode currentNode = this; while (name != null) { final int dotIndex = name.indexOf('.'); @@ -516,7 +515,6 @@ logger = node.logger; node = node.parent; } -assert logger != null; return logger; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r331252 - /tomcat/container/tc5.5.x/webapps/docs/changelog.xml
Author: remm Date: Mon Nov 7 02:07:06 2005 New Revision: 331252 URL: http://svn.apache.org/viewcvs?rev=331252&view=rev Log: - Changelog update. Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=331252&r1=331251&r2=331252&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Mon Nov 7 02:07:06 2005 @@ -82,6 +82,12 @@ 37121: Sendfile always needs to be given the length of data to write, which fixes ranged requests. (remm) + +Optimized direct byte buffers association with the socket for APR connectors. (mturk) + + +Fix hidden NPEs when using the APR connectors and there's no host header. (pero, remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r332296 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/LocalStrings.properties
Author: remm Date: Thu Nov 10 06:06:21 2005 New Revision: 332296 URL: http://svn.apache.org/viewcvs?rev=332296&view=rev Log: - Improve the message, according to Mladen. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/LocalStrings.properties Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/LocalStrings.properties URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/LocalStrings.properties?rev=332296&r1=332295&r2=332296&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/LocalStrings.properties (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/LocalStrings.properties Thu Nov 10 06:06:21 2005 @@ -14,8 +14,8 @@ applicationRequest.badRequest=Request is not a javax.servlet.ServletRequestWrapper applicationResponse.badParent=Cannot locate parent Response implementation applicationResponse.badResponse=Response is not a javax.servlet.ServletResponseWrapper -aprListener.aprInit=The Apache Portable Runtime which allows optimal performance in production environments was not found on the java.library.path: {0} -aprListener.tcnInvalid=An incompatible version {0} of the Tomcat Native library is installed, while Tomcat requires version {1} +aprListener.aprInit=The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: {0} +aprListener.tcnInvalid=An incompatible version {0} of the Apache Tomcat Native library is installed, while Tomcat requires version {1} aprListener.aprDestroy=Failed shutdown of Apache Portable Runtime containerBase.addDefaultMapper=Exception configuring default mapper of class {0} containerBase.alreadyStarted=Container {0} has already been started - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r332801 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
Author: remm Date: Sat Nov 12 09:48:54 2005 New Revision: 332801 URL: http://svn.apache.org/viewcvs?rev=332801&view=rev Log: - Add additional experimental measures against apparent garbage collection bugs by setting to null static final fields. Also unregister any JDBC driver. This code is based on techniques found on the Hibernate forums, where this sort of cleanup proved to be able to fix memory leaking. - According to Hibernate developers, the following scenario is causing a leak of the classloader (note: obviously this is not a Tomcat bug, but merely something where there seems to be a workaround): public class DeployTestServlet extends HttpServlet { private TestValue testValue; public void init(ServletConfig servletConfig) throws ServletException { super.init(servletConfig); testValue = TestHolder.TEST_VALUE; } } public class TestHolder { public static final TestValue TEST_VALUE = new TestValue(); } public class TestValue { private transient ClassLoader value; public TestValue() { value = this.getClass().getClassLoader(); } } Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java?rev=332801&r1=332800&r2=332801&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java Sat Nov 12 09:48:54 2005 @@ -23,6 +23,8 @@ import java.io.FilePermission; import java.io.IOException; import java.io.InputStream; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; @@ -33,6 +35,9 @@ import java.security.PermissionCollection; import java.security.Policy; import java.security.PrivilegedAction; +import java.sql.Driver; +import java.sql.DriverManager; +import java.sql.SQLException; import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; @@ -1470,20 +1475,9 @@ */ public void stop() throws LifecycleException { -/* - * Clear the IntrospectionUtils cache. - * - * Implementation note: - * Any reference to IntrospectionUtils which may cause the static - * initalizer of that class to be invoked must occur prior to setting - * the started flag to FALSE, because the static initializer of - * IntrospectionUtils makes a call to - * org.apache.commons.logging.LogFactory.getLog(), which ultimately - * calls the loadClass() method of the thread context classloader, - * which is the same as this classloader, whose impl throws a - * ThreadDeath if the started flag has been set to FALSE. - */ -IntrospectionUtils.clear(); +// Clearing references should be done before setting started to +// false, due to possible side effects +clearReferences(); started = false; @@ -1526,11 +1520,6 @@ deleteDir(loaderDir); } -// Clear the classloader reference in common-logging -org.apache.commons.logging.LogFactory.release(this); -// Clear the classloader reference in the VM's bean introspector -java.beans.Introspector.flushCaches(); - } @@ -1561,6 +1550,61 @@ // -- Protected Methods + +/** + * Clear references. + */ +protected void clearReferences() { + +// Unregister any JDBC drivers loaded by this classloader +Enumeration drivers = DriverManager.getDrivers(); +while (drivers.hasMoreElements()) { +Driver driver = (Driver) drivers.nextElement(); +if (driver.getClass().getClassLoader() == this) { +try { +DriverManager.deregisterDriver(driver); +} catch (SQLException e) { +log.warn("SQL driver deregistration failed", e); +} +} +} + +// Null out any static or final fields from loaded classes, +// as a workaround for apparent garbage collection bugs +Iterator loadedClasses = resourceEntries.values().iterator(); +while (loadedClasses.hasNext()) { +ResourceEntry entry = (ResourceEntry) loadedClasses.next(); +if (entry.loadedClass != null) { +Field[] fields = entry.loadedClass.getDeclaredFields(); +for (int i = 0; i < fields.length; i++)
svn commit: r344145 - in /tomcat/current/tc5.5.x: connectors/ container/ jasper/
Author: remm Date: Mon Nov 14 07:19:03 2005 New Revision: 344145 URL: http://svn.apache.org/viewcvs?rev=344145&view=rev Log: - Try to delete. Removed: tomcat/current/tc5.5.x/connectors/ tomcat/current/tc5.5.x/container/ tomcat/current/tc5.5.x/jasper/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r345233 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
Author: remm Date: Thu Nov 17 04:10:48 2005 New Revision: 345233 URL: http://svn.apache.org/viewcvs?rev=345233&view=rev Log: - Fix NPE and exception problems with setting fields to null. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java?rev=345233&r1=345232&r2=345233&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java Thu Nov 17 04:10:48 2005 @@ -1571,24 +1571,46 @@ // Null out any static or final fields from loaded classes, // as a workaround for apparent garbage collection bugs -Iterator loadedClasses = resourceEntries.values().iterator(); +Iterator loadedClasses = ((HashMap) resourceEntries.clone()).values().iterator(); while (loadedClasses.hasNext()) { ResourceEntry entry = (ResourceEntry) loadedClasses.next(); if (entry.loadedClass != null) { -Field[] fields = entry.loadedClass.getDeclaredFields(); -for (int i = 0; i < fields.length; i++) { -Field field = fields[i]; -int mods = field.getModifiers(); -if (!(!Modifier.isStatic(mods) || !Modifier.isFinal(mods) -|| field.getType().isPrimitive() -|| field.getName().indexOf("$") != -1)) { -field.setAccessible(true); -try { -field.set(null, null); -} catch (Exception e) { -log.info("Could not set field " + field.getName() -+ " to null in class " + entry.loadedClass.getName(), e); +Class clazz = entry.loadedClass; +try { +Field[] fields = clazz.getDeclaredFields(); +for (int i = 0; i < fields.length; i++) { +Field field = fields[i]; +int mods = field.getModifiers(); +if (field.getType().isPrimitive() +|| (field.getName().indexOf("$") != -1)) { +continue; } +if (Modifier.isStatic(mods)) { +try { +field.setAccessible(true); +if (Modifier.isFinal(mods)) { +if (!((field.getType().getName().startsWith("java.")) +|| (field.getType().getName().startsWith("javax." { +nullInstance(field.get(null)); +} +} else { +field.set(null, null); +if (log.isDebugEnabled()) { +log.debug("Set field " + field.getName() ++ " to null in class " + clazz.getName()); +} +} +} catch (Throwable t) { +if (log.isDebugEnabled()) { +log.debug("Could not set field " + field.getName() ++ " to null in class " + clazz.getName(), t); +} +} +} +} +} catch (Throwable t) { +if (log.isDebugEnabled()) { +log.debug("Could not clean fields for class " + clazz.getName(), t); } } } @@ -1603,6 +1625,41 @@ // Clear the classloader reference in the VM's bean introspector java.beans.Introspector.flushCaches(); +} + + +protected void nullInstance(Object instance) { +if (instance == null) { +return; +} +Field[] fields = instance.getClass().getDeclaredFields(); +for (int i = 0; i < fields.length; i++) { +Field field = fields[i]; +int mods = field.getModifiers(); +if (field.getType().isPrimitive() +|| (f
svn commit: r345264 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
Author: remm Date: Thu Nov 17 07:34:09 2005 New Revision: 345264 URL: http://svn.apache.org/viewcvs?rev=345264&view=rev Log: - Remove excessive logging when failing to open a JAR as it may snowball and might be expected situations (moved to debug priority, reported as a regular classloading failure). Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java?rev=345264&r1=345263&r2=345264&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java Thu Nov 17 07:34:09 2005 @@ -977,16 +977,17 @@ // Looking at the JAR files synchronized (jarFiles) { -openJARs(); -for (i = 0; i < jarFilesLength; i++) { -JarEntry jarEntry = jarFiles[i].getJarEntry(name); -if (jarEntry != null) { -try { -String jarFakeUrl = getURI(jarRealFiles[i]).toString(); -jarFakeUrl = "jar:" + jarFakeUrl + "!/" + name; -result.addElement(new URL(jarFakeUrl)); -} catch (MalformedURLException e) { -// Ignore +if (openJARs()) { +for (i = 0; i < jarFilesLength; i++) { +JarEntry jarEntry = jarFiles[i].getJarEntry(name); +if (jarEntry != null) { +try { +String jarFakeUrl = getURI(jarRealFiles[i]).toString(); +jarFakeUrl = "jar:" + jarFakeUrl + "!/" + name; +result.addElement(new URL(jarFakeUrl)); +} catch (MalformedURLException e) { +// Ignore +} } } } @@ -1539,7 +1540,9 @@ jarFiles[i] = null; } } catch (IOException e) { -log.warn("Failed to close JAR", e); +if (log.isDebugEnabled()) { +log.debug("Failed to close JAR", e); +} } } } @@ -1666,19 +1669,23 @@ /** * Used to periodically signal to the classloader to release JAR resources. */ -protected void openJARs() { +protected boolean openJARs() { if (started && (jarFiles.length > 0)) { lastJarAccessed = System.currentTimeMillis(); if (jarFiles[0] == null) { for (int i = 0; i < jarFiles.length; i++) { try { - jarFiles[i] = new JarFile(jarRealFiles[i]); +jarFiles[i] = new JarFile(jarRealFiles[i]); } catch (IOException e) { - log.warn("Failed to open JAR", e); +if (log.isDebugEnabled()) { +log.debug("Failed to open JAR", e); +} +return false; } } } } +return true; } @@ -1903,7 +1910,9 @@ synchronized (jarFiles) { -openJARs(); +if (!openJARs()) { +return null; +} for (i = 0; (entry == null) && (i < jarFilesLength); i++) { jarEntry = jarFiles[i].getJarEntry(path); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r345286 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core: StandardContext.java StandardWrapper.java mbeans-descriptors.xml
Author: remm Date: Thu Nov 17 09:00:24 2005 New Revision: 345286 URL: http://svn.apache.org/viewcvs?rev=345286&view=rev Log: - Allow configuring the amount of time the container will wait when unloading servlets. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java?rev=345286&r1=345285&r2=345286&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java Thu Nov 17 09:00:24 2005 @@ -513,6 +513,12 @@ /** + * Amount of ms that the container will wait for servlets to unload. + */ +private long unloadDelay = 2000; + + +/** * The watched resources for this application. */ private String watchedResources[] = new String[0]; @@ -1618,6 +1624,35 @@ support.firePropertyChange("swallowOutput", new Boolean(oldSwallowOutput), new Boolean(this.swallowOutput)); + +} + + +/** + * Return the value of the unloadDelay flag. + */ +public long getUnloadDelay() { + +return (this.unloadDelay); + +} + + +/** + * Set the value of the unloadDelay flag, which represents the amount + * of ms that the container will wait when unloading servlets. + * Setting this to a small value may cause more requests to fail + * to complete when stopping a web application. + * + * @param unloadDelay The new value + */ +public void setUnloadDelay(long unloadDelay) { + +long oldUnloadDelay = this.unloadDelay; +this.unloadDelay = unloadDelay; +support.firePropertyChange("unloadDelay", + new Long(oldUnloadDelay), + new Long(this.unloadDelay)); } Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java?rev=345286&r1=345285&r2=345286&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java Thu Nov 17 09:00:24 2005 @@ -222,6 +222,12 @@ */ private Stack instancePool = null; + +/** + * Wait time for servlet unload in ms. + */ +private long unloadDelay = 2000; + /** * True if this StandardWrapper is for the JspServlet @@ -466,6 +472,7 @@ (sm.getString("standardWrapper.notContext")); if (container instanceof StandardContext) { swallowOutput = ((StandardContext)container).getSwallowOutput(); +unloadDelay = ((StandardContext)container).getUnloadDelay(); } super.setParent(container); @@ -1286,13 +1293,14 @@ // (possibly more than once if non-STM) if (countAllocated > 0) { int nRetries = 0; +long delay = unloadDelay / 20; while ((nRetries < 21) && (countAllocated > 0)) { if ((nRetries % 10) == 0) { log.info(sm.getString("standardWrapper.waiting", new Integer(countAllocated))); } try { -Thread.sleep(100); +Thread.sleep(delay); } catch (InterruptedException e) { ; } Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml?rev=345286&r1=345285&r2=345286&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml Thu Nov 17 09:00:24 2005 @@ -203,6 +203,10 @@ description="Flag
svn commit: r345288 - in /tomcat/container/tc5.5.x/webapps/docs: changelog.xml config/context.xml
Author: remm Date: Thu Nov 17 09:16:50 2005 New Revision: 345288 URL: http://svn.apache.org/viewcvs?rev=345288&view=rev Log: - Update changelog. Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml tomcat/container/tc5.5.x/webapps/docs/config/context.xml Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=345288&r1=345287&r2=345288&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Thu Nov 17 09:16:50 2005 @@ -72,6 +72,18 @@ 37150: Turn off directory listing by default and add a warning regarding enabling listing of directories with many entries. (markt) + +Add configurability for the amount of time that the container will wait for requests +to complete when unloading servlets, using the unloadDelay property. (remm) + + +Add code to set to null fields in loaded classes when stopping a web application, as a +possible workaround for suspicious garbage collection behavior. (remm) + + +Update messages and stack traces for classloading errors which may occur when removing +a web application. (remm) + 37319: Fix catalina.bat reference to CATALINA_BASE for logging.properties. Thanks to Pierre-Yves Benzaken. (yoavs) Modified: tomcat/container/tc5.5.x/webapps/docs/config/context.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/config/context.xml?rev=345288&r1=345287&r2=345288&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/config/context.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/config/context.xml Thu Nov 17 09:16:50 2005 @@ -290,6 +290,12 @@ a performance penalty. + +Amount of ms that the container will wait for servlets to unload. +If not specified, the default value of the flag is 2000 +ms. + + If true, Tomcat will unpack all compressed web applications before running them. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r345898 - /tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java
Author: remm Date: Mon Nov 21 04:46:09 2005 New Revision: 345898 URL: http://svn.apache.org/viewcvs?rev=345898&view=rev Log: - Either I am completely mistaken, or the type used was wrong. Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=345898&r1=345897&r2=345898&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Mon Nov 21 04:46:09 2005 @@ -1173,8 +1173,8 @@ InputFilter savedBody = new SavedRequestInputFilter(body); savedBody.setRequest(request); -InternalInputBuffer internalBuffer = (InternalInputBuffer) -request.getInputBuffer(); +InternalAprInputBuffer internalBuffer = (InternalAprInputBuffer) +request.getInputBuffer(); internalBuffer.addActiveFilter(savedBody); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r348448 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
Author: remm Date: Wed Nov 23 06:20:32 2005 New Revision: 348448 URL: http://svn.apache.org/viewcvs?rev=348448&view=rev Log: - Modify the way a stopped classloader behaves if accessed, as part of my previous CL work. - Log the illegal access attempt. - findClass will of return a CNFE. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java?rev=348448&r1=348447&r2=348448&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java Wed Nov 23 06:20:32 2005 @@ -835,6 +835,11 @@ if (log.isDebugEnabled()) log.debug("findClass(" + name + ")"); +// Cannot load anything from local repositories if class loader is stopped +if (!started) { +throw new ClassNotFoundException(name); +} + // (1) Permission to define this class when using a SecurityManager if (securityManager != null) { int i = name.lastIndexOf('.'); @@ -1227,10 +1232,13 @@ log.debug("loadClass(" + name + ", " + resolve + ")"); Class clazz = null; -// Don't load classes if class loader is stopped +// Log access to stopped classloader if (!started) { -log.info(sm.getString("webappClassLoader.stopped", name)); -throw new ThreadDeath(); +try { +throw new IllegalStateException(); +} catch (IllegalStateException e) { +log.info(sm.getString("webappClassLoader.stopped", name), e); +} } // (0) Check our previously loaded local class cache - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r348470 - /tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java
Author: remm Date: Wed Nov 23 08:06:10 2005 New Revision: 348470 URL: http://svn.apache.org/viewcvs?rev=348470&view=rev Log: - Fix crash when a socket is used outside of the process method (for example through JMX). I would assume a crash would occur with a socket which had its associated memory pool deallocated. Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=348470&r1=348469&r2=348470&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Wed Nov 23 08:06:10 2005 @@ -19,7 +19,6 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InterruptedIOException; -import java.net.InetAddress; import java.util.StringTokenizer; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; @@ -216,7 +215,7 @@ /** * Socket associated with the current connection. */ -protected long socket; +protected long socket = 0; /** @@ -907,6 +906,7 @@ // Recycle inputBuffer.recycle(); outputBuffer.recycle(); +this.socket = 0; return openSocket; @@ -1003,7 +1003,7 @@ } else if (actionCode == ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE) { // Get remote host address -if (remoteAddr == null) { +if (remoteAddr == null && (socket != 0)) { try { long sa = Address.get(Socket.APR_REMOTE, socket); remoteAddr = Address.getip(sa); @@ -1016,7 +1016,7 @@ } else if (actionCode == ActionCode.ACTION_REQ_LOCAL_NAME_ATTRIBUTE) { // Get local host name -if (localName == null) { +if (localName == null && (socket != 0)) { try { long sa = Address.get(Socket.APR_LOCAL, socket); localName = Address.getnameinfo(sa, 0); @@ -1029,7 +1029,7 @@ } else if (actionCode == ActionCode.ACTION_REQ_HOST_ATTRIBUTE) { // Get remote host name -if (remoteHost == null) { +if (remoteHost == null && (socket != 0)) { try { long sa = Address.get(Socket.APR_REMOTE, socket); remoteHost = Address.getnameinfo(sa, 0); @@ -1042,7 +1042,7 @@ } else if (actionCode == ActionCode.ACTION_REQ_LOCAL_ADDR_ATTRIBUTE) { // Get local host address -if (localAddr == null) { +if (localAddr == null && (socket != 0)) { try { long sa = Address.get(Socket.APR_LOCAL, socket); Sockaddr addr = new Sockaddr(); @@ -1060,7 +1060,7 @@ } else if (actionCode == ActionCode.ACTION_REQ_REMOTEPORT_ATTRIBUTE) { // Get remote port -if (remotePort == -1) { +if (remotePort == -1 && (socket != 0)) { try { long sa = Address.get(Socket.APR_REMOTE, socket); Sockaddr addr = Address.getInfo(sa); @@ -1074,7 +1074,7 @@ } else if (actionCode == ActionCode.ACTION_REQ_LOCALPORT_ATTRIBUTE) { // Get local port -if (localPort == -1) { +if (localPort == -1 && (socket != 0)) { try { long sa = Address.get(Socket.APR_LOCAL, socket); Sockaddr addr = new Sockaddr(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r348476 - /tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java
Author: remm Date: Wed Nov 23 08:15:53 2005 New Revision: 348476 URL: http://svn.apache.org/viewcvs?rev=348476&view=rev Log: - Do the same with SSL. Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=348476&r1=348475&r2=348476&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Wed Nov 23 08:15:53 2005 @@ -1090,8 +1090,8 @@ } else if (actionCode == ActionCode.ACTION_REQ_SSL_ATTRIBUTE ) { -try { -if (ssl) { +if (ssl && (socket != 0)) { +try { // Cipher suite Object sslO = SSLSocket.getInfoS(socket, SSL.SSL_INFO_CIPHER); if (sslO != null) { @@ -1127,14 +1127,14 @@ request.setAttribute (AprEndpoint.SESSION_ID_KEY, sslO); } +} catch (Exception e) { +log.warn(sm.getString("http11processor.socket.ssl"), e); } -} catch (Exception e) { -log.warn(sm.getString("http11processor.socket.ssl"), e); } } else if (actionCode == ActionCode.ACTION_REQ_SSL_CERTIFICATE) { -if (ssl) { +if (ssl && (socket != 0)) { // Consume and buffer the request body, so that it does not // interfere with the client's handshake messages InputFilter[] inputFilters = inputBuffer.getFilters(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r348506 - /tomcat/container/tc5.5.x/webapps/docs/changelog.xml
Author: remm Date: Wed Nov 23 10:03:53 2005 New Revision: 348506 URL: http://svn.apache.org/viewcvs?rev=348506&view=rev Log: - Changelog update. Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=348506&r1=348505&r2=348506&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Wed Nov 23 10:03:53 2005 @@ -85,7 +85,7 @@ Update messages and stack traces for classloading errors which may occur when removing -a web application. (remm) +a web application, and for stopped web applications. (remm) 37319: Fix catalina.bat reference to CATALINA_BASE for logging.properties. Thanks @@ -132,6 +132,10 @@ Connection Timeout is normal, so reduce logging to DEBUG (billbarker) + +Fix crash which could occur with the HTTP APR connector when accessing request JMX objects +outside of the processing of the said request (remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r348735 - in /tomcat: connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java container/tc5.5.x/webapps/docs/changelog.xml
Author: remm Date: Thu Nov 24 06:04:48 2005 New Revision: 348735 URL: http://svn.apache.org/viewcvs?rev=348735&view=rev Log: - 37627:Fix buffering issue in the HTTP APR connector when a large buffer size was used for servlets. - Unfortunately the FIXME had never been addressed and the algorithm never implemented properly, unlike for the AJP connector. Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java?rev=348735&r1=348734&r2=348735&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java Thu Nov 24 06:04:48 2005 @@ -720,19 +720,20 @@ public int doWrite(ByteChunk chunk, Response res) throws IOException { -// FIXME: It would likely be more efficient to do a number of writes -// through the direct BB; however, the case should happen very rarely. -// An algorithm similar to ByteChunk.append may also be better. -if (chunk.getLength() > bbuf.capacity()) { -if (Socket.send(socket, chunk.getBuffer(), chunk.getStart(), -chunk.getLength()) < 0) { -throw new IOException(sm.getString("iib.failedwrite")); -} -} else { -if (bbuf.position() + chunk.getLength() > bbuf.capacity()) { +int len = chunk.getLength(); +int start = chunk.getStart(); +byte[] b = chunk.getBuffer(); +while (len > 0) { +int thisTime = len; +if (bbuf.position() == bbuf.capacity()) { flushBuffer(); } -bbuf.put(chunk.getBuffer(), chunk.getStart(), chunk.getLength()); +if (thisTime > bbuf.capacity() - bbuf.position()) { +thisTime = bbuf.capacity() - bbuf.position(); +} +bbuf.put(b, start, thisTime); +len = len - thisTime; +start = start + thisTime; } return chunk.getLength(); Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=348735&r1=348734&r2=348735&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Thu Nov 24 06:04:48 2005 @@ -136,6 +136,10 @@ Fix crash which could occur with the HTTP APR connector when accessing request JMX objects outside of the processing of the said request (remm) + +37627: Fix buffering issue in the HTTP APR connector when a large buffer size was +used for servlets (remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r349715 - /tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java
Author: remm Date: Tue Nov 29 05:29:07 2005 New Revision: 349715 URL: http://svn.apache.org/viewcvs?rev=349715&view=rev Log: - 37673: Fix getLocalName and getLocalPort. Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=349715&r1=349714&r2=349715&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Tue Nov 29 05:29:07 2005 @@ -1045,11 +1045,7 @@ if (localAddr == null && (socket != 0)) { try { long sa = Address.get(Socket.APR_LOCAL, socket); -Sockaddr addr = new Sockaddr(); -if (Address.fill(addr, sa)) { -localAddr = addr.hostname; -localPort = addr.port; -} +localAddr = Address.getip(sa); } catch (Exception e) { log.warn(sm.getString("http11processor.socket.info"), e); } @@ -1077,11 +1073,8 @@ if (localPort == -1 && (socket != 0)) { try { long sa = Address.get(Socket.APR_LOCAL, socket); -Sockaddr addr = new Sockaddr(); -if (Address.fill(addr, sa)) { -localAddr = addr.hostname; -localPort = addr.port; -} +Sockaddr addr = Address.getInfo(sa); +localPort = addr.port; } catch (Exception e) { log.warn(sm.getString("http11processor.socket.info"), e); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r349717 - /tomcat/container/tc5.5.x/webapps/docs/changelog.xml
Author: remm Date: Tue Nov 29 05:55:55 2005 New Revision: 349717 URL: http://svn.apache.org/viewcvs?rev=349717&view=rev Log: - Changelog update. Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=349717&r1=349716&r2=349717&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Tue Nov 29 05:55:55 2005 @@ -158,6 +158,10 @@ 37627: Fix buffering issue in the HTTP APR connector when a large buffer size was used for servlets (remm) + +37673: Fix implementation of getLocalPort and getLocalAddr in the HTTP APR connector +(remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r349764 - in /tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11: Http11AprProcessor.java Http11Processor.java
Author: remm Date: Tue Nov 29 09:03:43 2005 New Revision: 349764 URL: http://svn.apache.org/viewcvs?rev=349764&view=rev Log: - localName was never reset. Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Processor.java Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=349764&r1=349763&r2=349764&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Tue Nov 29 09:03:43 2005 @@ -746,6 +746,7 @@ remoteAddr = null; remoteHost = null; localAddr = null; +localName = null; remotePort = -1; localPort = -1; Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Processor.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Processor.java?rev=349764&r1=349763&r2=349764&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Processor.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Processor.java Tue Nov 29 09:03:43 2005 @@ -772,6 +772,7 @@ remoteAddr = null; remoteHost = null; localAddr = null; +localName = null; remotePort = -1; localPort = -1; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r349922 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup: ContextConfig.java EngineConfig.java
Author: remm Date: Wed Nov 30 03:10:55 2005 New Revision: 349922 URL: http://svn.apache.org/viewcvs?rev=349922&view=rev Log: - Make some classes non final, as has been done for others. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/EngineConfig.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java?rev=349922&r1=349921&r2=349922&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java Wed Nov 30 03:10:55 2005 @@ -67,7 +67,7 @@ * @version $Revision$ $Date$ */ -public final class ContextConfig +public class ContextConfig implements LifecycleListener { protected static org.apache.commons.logging.Log log= @@ -79,7 +79,7 @@ /* * Custom mappings of login methods to authenticators */ -private Map customAuthenticators; +protected Map customAuthenticators; /** @@ -170,7 +170,7 @@ protected static long deploymentCount = 0L; -private static final LoginConfig DUMMY_LOGIN_CONFIG = +protected static final LoginConfig DUMMY_LOGIN_CONFIG = new LoginConfig("NONE", null, null, null); Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/EngineConfig.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/EngineConfig.java?rev=349922&r1=349921&r2=349922&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/EngineConfig.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/EngineConfig.java Wed Nov 30 03:10:55 2005 @@ -33,11 +33,11 @@ * @version $Revision$ $Date$ */ -public final class EngineConfig +public class EngineConfig implements LifecycleListener { -private static org.apache.commons.logging.Log log= +protected static org.apache.commons.logging.Log log= org.apache.commons.logging.LogFactory.getLog( EngineConfig.class ); // - Instance Variables @@ -46,13 +46,13 @@ /** * The Engine we are associated with. */ -private Engine engine = null; +protected Engine engine = null; /** * The string resources for this package. */ -private static final StringManager sm = +protected static final StringManager sm = StringManager.getManager(Constants.Package); @@ -83,13 +83,13 @@ } -// Private Methods +// Protected Methods /** * Process a "start" event for this Engine. */ -private void start() { +protected void start() { if (engine.getLogger().isDebugEnabled()) engine.getLogger().debug(sm.getString("engineConfig.start")); @@ -100,7 +100,7 @@ /** * Process a "stop" event for this Engine. */ -private void stop() { +protected void stop() { if (engine.getLogger().isDebugEnabled()) engine.getLogger().debug(sm.getString("engineConfig.stop")); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r350078 - /tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java
Author: remm Date: Wed Nov 30 15:32:20 2005 New Revision: 350078 URL: http://svn.apache.org/viewcvs?rev=350078&view=rev Log: - Remove useless commented out code. Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=350078&r1=350077&r2=350078&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java Wed Nov 30 15:32:20 2005 @@ -636,19 +636,6 @@ ((ActionHook) processor).action(ActionCode.ACTION_START, null); } -// FIXME: SSL implementation -/* -if( proto.secure ) { -SSLSupport sslSupport=null; -if(proto.sslImplementation != null) -sslSupport = proto.sslImplementation.getSSLSupport(socket); -processor.setSSLSupport(sslSupport); -} else { -processor.setSSLSupport( null ); -} -processor.setSocket( socket ); -*/ - return processor.process(socket); } catch(java.net.SocketException e) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r350083 - /tomcat/container/tc5.5.x/webapps/docs/apr.xml
Author: remm Date: Wed Nov 30 16:12:04 2005 New Revision: 350083 URL: http://svn.apache.org/viewcvs?rev=350083&view=rev Log: - Add example SSL config. Modified: tomcat/container/tc5.5.x/webapps/docs/apr.xml Modified: tomcat/container/tc5.5.x/webapps/docs/apr.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/apr.xml?rev=350083&r1=350082&r2=350083&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/apr.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/apr.xml Wed Nov 30 16:12:04 2005 @@ -232,6 +232,19 @@ + + +An example SSL Connector declaration can be: + +<Connector port="443" maxHttpHeaderSize="8192" + maxThreads="150" minSpareThreads="25" maxSpareThreads="75" + enableLookups="false" disableUploadTimeout="true" + acceptCount="100" scheme="https" secure="true" + SSLEngine="on" + SSLCertificateFile="${catalina.base}/conf/localhost.crt" + SSLCertificateKeyFile="${catalina.base}/conf/localhost.key" /> + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r354096 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java
Author: remm Date: Mon Dec 5 08:43:36 2005 New Revision: 354096 URL: http://svn.apache.org/viewcvs?rev=354096&view=rev Log: - Require 1.1.1 now. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java?rev=354096&r1=354095&r2=354096&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java Mon Dec 5 08:43:36 2005 @@ -52,7 +52,7 @@ protected static final int REQUIRED_MAJOR = 1; protected static final int REQUIRED_MINOR = 1; -protected static final int REQUIRED_PATCH = 0; +protected static final int REQUIRED_PATCH = 1; // -- LifecycleListener Methods - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r355530 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core: ApplicationContextFacade.java ApplicationFilterConfig.java
Author: remm Date: Fri Dec 9 08:42:23 2005 New Revision: 355530 URL: http://svn.apache.org/viewcvs?rev=355530&view=rev Log: - Remove a static log that I forgot about earlier. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationFilterConfig.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java?rev=355530&r1=355529&r2=355530&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java Fri Dec 9 08:42:23 2005 @@ -63,10 +63,6 @@ private HashMap objectCache; -private static org.apache.commons.logging.Log sysLog= -org.apache.commons.logging.LogFactory.getLog( ApplicationContextFacade.class ); - - // --- Constructors @@ -486,22 +482,18 @@ throws Throwable { Throwable realException; - -if (sysLog.isDebugEnabled()) { -sysLog.debug("ApplicationContextFacade." + methodName, ex); -} - - if (ex instanceof PrivilegedActionException) { + +if (ex instanceof PrivilegedActionException) { ex = ((PrivilegedActionException) ex).getException(); - } - +} + if (ex instanceof InvocationTargetException) { realException = - ((InvocationTargetException) ex).getTargetException(); +((InvocationTargetException) ex).getTargetException(); } else { realException = ex; } - + throw realException; } } Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationFilterConfig.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationFilterConfig.java?rev=355530&r1=355529&r2=355530&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationFilterConfig.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationFilterConfig.java Fri Dec 9 08:42:23 2005 @@ -46,9 +46,7 @@ final class ApplicationFilterConfig implements FilterConfig, Serializable { -private static org.apache.commons.logging.Log log= -org.apache.commons.logging.LogFactory.getLog( ApplicationFilterConfig.class ); - + // --- Constructors @@ -248,12 +246,11 @@ if (this.filter != null){ if( System.getSecurityManager() != null) { try{ -SecurityUtil.doAsPrivilege("destroy", - filter); -SecurityUtil.remove(filter); +SecurityUtil.doAsPrivilege("destroy", filter); } catch(java.lang.Exception ex){ -log.error("ApplicationFilterConfig.doAsPrivilege", ex); + context.getLogger().error("ApplicationFilterConfig.doAsPrivilege", ex); } +SecurityUtil.remove(filter); } else { filter.destroy(); } @@ -290,12 +287,11 @@ if (this.filter != null){ if( System.getSecurityManager() != null) { try{ -SecurityUtil.doAsPrivilege("destroy", - filter); -SecurityUtil.remove(filter); +SecurityUtil.doAsPrivilege("destroy", filter); } catch(java.lang.Exception ex){ -log.error("ApplicationFilterConfig.doAsPrivilege", ex); + context.getLogger().error("ApplicationFilterConfig.doAsPrivilege", ex); } +SecurityUtil.remove(filter); } else { filter.destroy(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r355539 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: remm Date: Fri Dec 9 09:04:06 2005 New Revision: 355539 URL: http://svn.apache.org/viewcvs?rev=355539&view=rev Log: - Convert to string error codes. Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=355539&r1=355538&r2=355539&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Fri Dec 9 09:04:06 2005 @@ -541,12 +541,12 @@ // Bind the server socket int ret = Socket.bind(serverSock, inetAddress); if (ret != 0) { -throw new Exception(sm.getString("endpoint.init.bind", "" + ret)); +throw new Exception(sm.getString("endpoint.init.bind", Error.strerror(ret))); } // Start listening on the server socket ret = Socket.listen(serverSock, backlog); if (ret != 0) { -throw new Exception(sm.getString("endpoint.init.listen", "" + ret)); +throw new Exception(sm.getString("endpoint.init.listen", Error.strerror(ret))); } if (OS.IS_WIN32 || OS.IS_WIN64) { // On Windows set the reuseaddr flag after the bind/listen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r358036 - in /tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime: BodyContentImpl.java JspFactoryImpl.java
Author: remm Date: Tue Dec 20 09:02:33 2005 New Revision: 358036 URL: http://svn.apache.org/viewcvs?rev=358036&view=rev Log: - Add two system properties (as given the JSP API, there is no easy solution to retrieve configuration parameters elsewhere) to allow configuring Jasper memory management. Note that changing from the defaults may affect performance, depending on the application. Modified: tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/BodyContentImpl.java tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java Modified: tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/BodyContentImpl.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/BodyContentImpl.java?rev=358036&r1=358035&r2=358036&view=diff == --- tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/BodyContentImpl.java (original) +++ tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/BodyContentImpl.java Tue Dec 20 09:02:33 2005 @@ -40,6 +40,8 @@ private static final String LINE_SEPARATOR = System.getProperty("line.separator"); +private static final boolean LIMIT_BUFFER = + Boolean.parseBoolean(System.getProperty("org.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER", "false")); private char[] cb; private int nextChar; @@ -468,6 +470,10 @@ throw new IOException(); } else { nextChar = 0; +if (LIMIT_BUFFER && (cb.length > Constants.DEFAULT_TAG_BUFFER_SIZE)) { +bufferSize = Constants.DEFAULT_TAG_BUFFER_SIZE; +cb = new char[bufferSize]; +} } } Modified: tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java?rev=358036&r1=358035&r2=358036&view=diff == --- tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java (original) +++ tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java Tue Dec 20 09:02:33 2005 @@ -40,9 +40,10 @@ private Log log = LogFactory.getLog(JspFactoryImpl.class); private static final String SPEC_VERSION = "2.0"; -private static final boolean USE_POOL = true; +private static final boolean USE_POOL = + Boolean.parseBoolean(System.getProperty("org.apache.jasper.runtime.JspFactoryImpl.USE_POOL", "true")); -private SimplePool pool = new SimplePool( 100 ); +private SimplePool pool = new SimplePool(100); public PageContext getPageContext(Servlet servlet, ServletRequest request, @@ -51,7 +52,6 @@ boolean needsSession, int bufferSize, boolean autoflush) { - if( System.getSecurityManager() != null ) { PrivilegedGetPageContext dp = new PrivilegedGetPageContext( (JspFactoryImpl)this, servlet, request, response, errorPageURL, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r358283 - /tomcat/container/tc5.5.x/webapps/docs/changelog.xml
Author: remm Date: Wed Dec 21 05:05:15 2005 New Revision: 358283 URL: http://svn.apache.org/viewcvs?rev=358283&view=rev Log: - Changelog update. Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=358283&r1=358282&r2=358283&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Wed Dec 21 05:05:15 2005 @@ -30,6 +30,21 @@ 37934: Don't ask for authentication if deny-from-all is in effect. (billbarker) + + Remove leftover static logger which was used to log application level messages in + ApplicationContextFacade (remm) + + + + + + + Report binding errors in the APR endpoint as strings rather than platform specific + status codes (remm) + + + 37934: Don't ask for authentication if deny-from-all is in effect. (billbarker) + @@ -40,6 +55,11 @@ 37929: Don't stop on the generic attribute methods just because the session is invalid. Patch by Pierre Delisle. (billbarker) + +Add system properties org.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER and +org.apache.jasper.runtime.JspFactoryImpl.USE_POOL to allow configuring Jasper +memory usage (remm) + 37933: Restrict <jsp:getAttribute /> to only look in PAGE_SCOPE. (billbarker) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r358285 - in /tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime: BodyContentImpl.java JspFactoryImpl.java
Author: remm Date: Wed Dec 21 05:09:42 2005 New Revision: 358285 URL: http://svn.apache.org/viewcvs?rev=358285&view=rev Log: - Ok, so I used a Java 5 API. Modified: tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/BodyContentImpl.java tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java Modified: tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/BodyContentImpl.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/BodyContentImpl.java?rev=358285&r1=358284&r2=358285&view=diff == --- tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/BodyContentImpl.java (original) +++ tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/BodyContentImpl.java Wed Dec 21 05:09:42 2005 @@ -41,7 +41,7 @@ private static final String LINE_SEPARATOR = System.getProperty("line.separator"); private static final boolean LIMIT_BUFFER = - Boolean.parseBoolean(System.getProperty("org.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER", "false")); + Boolean.valueOf(System.getProperty("org.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER", "false")).booleanValue(); private char[] cb; private int nextChar; Modified: tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java?rev=358285&r1=358284&r2=358285&view=diff == --- tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java (original) +++ tomcat/jasper/tc5.5.x/jasper2/src/share/org/apache/jasper/runtime/JspFactoryImpl.java Wed Dec 21 05:09:42 2005 @@ -41,7 +41,7 @@ private static final String SPEC_VERSION = "2.0"; private static final boolean USE_POOL = - Boolean.parseBoolean(System.getProperty("org.apache.jasper.runtime.JspFactoryImpl.USE_POOL", "true")); + Boolean.valueOf(System.getProperty("org.apache.jasper.runtime.JspFactoryImpl.USE_POOL", "true")).booleanValue(); private SimplePool pool = new SimplePool(100); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r359864 - /tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java
Author: remm Date: Thu Dec 29 10:12:55 2005 New Revision: 359864 URL: http://svn.apache.org/viewcvs?rev=359864&view=rev Log: - Port patch. Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=359864&r1=359863&r2=359864&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Thu Dec 29 10:12:55 2005 @@ -1364,18 +1364,13 @@ parseHost(valueMB); if (!contentDelimitation) { -// If there's no content length and we're using keep-alive -// (HTTP/1.0 with keep-alive or HTTP/1.1), assume +// If there's no content length +// (broken HTTP/1.0 or HTTP/1.1), assume // the client is not broken and didn't send a body -if (keepAlive) { -inputBuffer.addActiveFilter +inputBuffer.addActiveFilter (inputFilters[Constants.VOID_FILTER]); -contentDelimitation = true; -} +contentDelimitation = true; } - -if (!contentDelimitation) -keepAlive = false; // Advertise sendfile support through a request attribute if (endpoint.getUseSendfile()) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r365970 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: remm Date: Wed Jan 4 11:28:39 2006 New Revision: 365970 URL: http://svn.apache.org/viewcvs?rev=365970&view=rev Log: - Oops. Sync on the right object. Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=365970&r1=365969&r2=365970&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Jan 4 11:28:39 2006 @@ -1212,7 +1212,7 @@ } // Tell threadStop() we have shut ourselves down successfully -synchronized (this) { +synchronized (threadSync) { threadSync.notifyAll(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r367660 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core: StandardContext.java mbeans-descriptors.xml
Author: remm Date: Tue Jan 10 07:51:42 2006 New Revision: 367660 URL: http://svn.apache.org/viewcvs?rev=367660&view=rev Log: - Add JMX configuration capabilities for the ContextConfig classname. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java?rev=367660&r1=367659&r2=367660&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java Tue Jan 10 07:51:42 2006 @@ -33,6 +33,7 @@ import java.util.Stack; import java.util.TreeMap; +import javax.management.AttributeNotFoundException; import javax.management.ListenerNotFoundException; import javax.management.MBeanNotificationInfo; import javax.management.MBeanRegistrationException; @@ -5057,11 +5058,31 @@ .registerComponent(host, parentName, null); mserver.invoke(parentName, "init", new Object[] {}, new String[] {} ); } -ContextConfig config = new ContextConfig(); + +// Add the main configuration listener +LifecycleListener config = null; +try { +Object configClassname = null; +try { +configClassname = mserver.getAttribute(parentName, "configClass"); +} catch (AttributeNotFoundException e) { +// Ignore, it's normal a host may not have this optional attribute +} +if (configClassname != null) { +Class clazz = Class.forName(String.valueOf(configClassname)); +config = (LifecycleListener) clazz.newInstance(); +} else { +config = new ContextConfig(); +} +} catch (Exception e) { +log.warn("Error creating ContextConfig for " + parentName, e); +throw e; +} this.addLifecycleListener(config); -if(log.isDebugEnabled()) - log.debug( "AddChild " + parentName + " " + this); +if (log.isDebugEnabled()) { +log.debug("AddChild " + parentName + " " + this); +} try { mserver.invoke(parentName, "addChild", new Object[] { this }, new String[] {"org.apache.catalina.Container"}); Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml?rev=367660&r1=367659&r2=367660&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml Tue Jan 10 07:51:42 2006 @@ -248,6 +248,24 @@ type="org.apache.catalina.Valve"/> + + + + + + + + + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r368054 - /tomcat/container/tc5.5.x/webapps/docs/changelog.xml
Author: remm Date: Wed Jan 11 08:16:17 2006 New Revision: 368054 URL: http://svn.apache.org/viewcvs?rev=368054&view=rev Log: - Changelog update. Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=368054&r1=368053&r2=368054&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Wed Jan 11 08:16:17 2006 @@ -36,6 +36,17 @@ 29214: response.containsHeader() now returns the correct value for Content-Type and Content-Length headers. (markt) + +Allow using a custom ContextConfig when using JMX embedding of Tomcat, as +is doen by the regular deployer. (remm) + + + + + + +Log errors when setting socket options with debug priority rather than error. (remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r371765 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java
Author: remm Date: Mon Jan 23 17:13:19 2006 New Revision: 371765 URL: http://svn.apache.org/viewcvs?rev=371765&view=rev Log: - Remove nonsensical systematic inclusion on ISO-8859-1 charset in the content type, which is noth useless and inefficient. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java?rev=371765&r1=371764&r2=371765&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java Mon Jan 23 17:13:19 2006 @@ -599,20 +599,6 @@ throw new IllegalStateException (sm.getString("coyoteResponse.getWriter.ise")); -/* - * If the response's character encoding has not been specified as - * described in getCharacterEncoding (i.e., the method - * just returns the default value ISO-8859-1), - * getWriter updates it to ISO-8859-1 - * (with the effect that a subsequent call to getContentType() will - * include a charset=ISO-8859-1 component which will also be - * reflected in the Content-Type response header, thereby satisfying - * the Servlet spec requirement that containers must communicate the - * character encoding used for the servlet response's writer to the - * client). - */ -setCharacterEncoding(getCharacterEncoding()); - usingWriter = true; outputBuffer.checkConverter(); if (writer == null) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r371866 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java
Author: remm Date: Tue Jan 24 00:52:54 2006 New Revision: 371866 URL: http://svn.apache.org/viewcvs?rev=371866&view=rev Log: - Restore useless and inefficient code. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java?rev=371866&r1=371865&r2=371866&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/Response.java Tue Jan 24 00:52:54 2006 @@ -599,6 +599,20 @@ throw new IllegalStateException (sm.getString("coyoteResponse.getWriter.ise")); +/* + * If the response's character encoding has not been specified as + * described in getCharacterEncoding (i.e., the method + * just returns the default value ISO-8859-1), + * getWriter updates it to ISO-8859-1 + * (with the effect that a subsequent call to getContentType() will + * include a charset=ISO-8859-1 component which will also be + * reflected in the Content-Type response header, thereby satisfying + * the Servlet spec requirement that containers must communicate the + * character encoding used for the servlet response's writer to the + * client). + */ +setCharacterEncoding(getCharacterEncoding()); + usingWriter = true; outputBuffer.checkConverter(); if (writer == null) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r372228 [6/6] - in /tomcat/jasper/tc6.0.x/src/share: javax/ javax/el/ org/apache/el/ org/apache/el/lang/ org/apache/el/parser/ org/apache/el/util/
Added: tomcat/jasper/tc6.0.x/src/share/org/apache/el/util/ReflectionUtil.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/org/apache/el/util/ReflectionUtil.java?rev=372228&view=auto == --- tomcat/jasper/tc6.0.x/src/share/org/apache/el/util/ReflectionUtil.java (added) +++ tomcat/jasper/tc6.0.x/src/share/org/apache/el/util/ReflectionUtil.java Wed Jan 25 06:37:16 2006 @@ -0,0 +1,183 @@ +/* + * Copyright 1999,2004 The Apache Software Foundation. + * + * Licensed 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.el.util; + +import java.beans.IntrospectionException; +import java.beans.Introspector; +import java.beans.PropertyDescriptor; +import java.lang.reflect.Array; +import java.lang.reflect.Method; +import java.util.Arrays; + +import javax.el.ELException; +import javax.el.MethodNotFoundException; +import javax.el.PropertyNotFoundException; + +import org.apache.el.lang.ELSupport; + + +/** + * Utilities for Managing Serialization and Reflection + * + * @author Jacob Hookom [EMAIL PROTECTED] + * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: jhook $ + */ +public class ReflectionUtil { + +protected static final String[] EMPTY_STRING = new String[0]; + +protected static final String[] PRIMITIVE_NAMES = new String[] { "boolean", +"byte", "char", "double", "float", "int", "long", "short", "void" }; + +protected static final Class[] PRIMITIVES = new Class[] { boolean.class, +byte.class, char.class, double.class, float.class, int.class, +long.class, short.class, Void.TYPE }; + +/** + * + */ +private ReflectionUtil() { +super(); +} + +public static Class forName(String name) throws ClassNotFoundException { +if (null == name || "".equals(name)) { +return null; +} +Class c = forNamePrimitive(name); +if (c == null) { +if (name.endsWith("[]")) { +String nc = name.substring(0, name.length() - 2); +c = Class.forName(nc, true, Thread.currentThread().getContextClassLoader()); +c = Array.newInstance(c, 0).getClass(); +} else { +c = Class.forName(name); +} +} +return c; +} + +protected static Class forNamePrimitive(String name) { +if (name.length() <= 8) { +int p = Arrays.binarySearch(PRIMITIVE_NAMES, name); +if (p >= 0) { +return PRIMITIVES[p]; +} +} +return null; +} + +/** + * Converts an array of Class names to Class types + * @param s + * @return + * @throws ClassNotFoundException + */ +public static Class[] toTypeArray(String[] s) throws ClassNotFoundException { +if (s == null) +return null; +Class[] c = new Class[s.length]; +for (int i = 0; i < s.length; i++) { +c[i] = forName(s[i]); +} +return c; +} + +/** + * Converts an array of Class types to Class names + * @param c + * @return + */ +public static String[] toTypeNameArray(Class[] c) { +if (c == null) +return null; +String[] s = new String[c.length]; +for (int i = 0; i < c.length; i++) { +s[i] = c[i].getName(); +} +return s; +} + +/** + * Returns a method based on the criteria + * @param base the object that owns the method + * @param property the name of the method + * @param paramTypes the parameter types to use + * @return the method specified + * @throws MethodNotFoundException + */ +public static Method getMethod(Object base, Object property, +Class[] paramTypes) throws MethodNotFoundException { +if (base == null || property == null) { +throw new MethodNotFoundException(MessageFactory.get( +"error.method.notfound", base, property, +paramString(paramTypes))); +} + +String methodName = (property instanceof String) ? (String) property +: property.toString(); + +Method method = null; +try { +method = base.getClass().getMethod(methodName, paramTypes); +} catch (NoSuchMethodException nsme) { +throw new MethodNotFoundException(Messag
svn commit: r372228 [3/6] - in /tomcat/jasper/tc6.0.x/src/share: javax/ javax/el/ org/apache/el/ org/apache/el/lang/ org/apache/el/parser/ org/apache/el/util/
Added: tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/AstFunction.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/AstFunction.java?rev=372228&view=auto == --- tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/AstFunction.java (added) +++ tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/AstFunction.java Wed Jan 25 06:37:16 2006 @@ -0,0 +1,118 @@ +/* Generated By:JJTree: Do not edit this line. AstFunction.java */ + +package org.apache.el.parser; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import javax.el.ELException; +import javax.el.FunctionMapper; + +import org.apache.el.lang.EvaluationContext; +import org.apache.el.util.MessageFactory; + + +/** + * @author Jacob Hookom [EMAIL PROTECTED] + * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: dpatil $ + */ +public final class AstFunction extends SimpleNode { + +protected String localName = ""; + +protected String prefix = ""; + +public AstFunction(int id) { +super(id); +} + +public String getLocalName() { +return localName; +} + +public String getOutputName() { +if (this.prefix == null) { +return this.localName; +} else { +return this.prefix + ":" + this.localName; +} +} + +public String getPrefix() { +return prefix; +} + +public Class getType(EvaluationContext ctx) +throws ELException { + +FunctionMapper fnMapper = ctx.getFunctionMapper(); + +// quickly validate again for this request +if (fnMapper == null) { +throw new ELException(MessageFactory.get("error.fnMapper.null")); +} +Method m = fnMapper.resolveFunction(this.prefix, this.localName); +if (m == null) { +throw new ELException(MessageFactory.get("error.fnMapper.method", +this.getOutputName())); +} +return m.getReturnType(); +} + +public Object getValue(EvaluationContext ctx) +throws ELException { + +FunctionMapper fnMapper = ctx.getFunctionMapper(); + +// quickly validate again for this request +if (fnMapper == null) { +throw new ELException(MessageFactory.get("error.fnMapper.null")); +} +Method m = fnMapper.resolveFunction(this.prefix, this.localName); +if (m == null) { +throw new ELException(MessageFactory.get("error.fnMapper.method", +this.getOutputName())); +} + +Class[] paramTypes = m.getParameterTypes(); +Object[] params = null; +Object result = null; +int numParams = this.jjtGetNumChildren(); +if (numParams > 0) { +params = new Object[numParams]; +try { +for (int i = 0; i < numParams; i++) { +params[i] = this.children[i].getValue(ctx); +params[i] = coerceToType(params[i], paramTypes[i]); +} +} catch (ELException ele) { +throw new ELException(MessageFactory.get("error.function", this +.getOutputName()), ele); +} +} +try { +result = m.invoke(null, params); +} catch (IllegalAccessException iae) { +throw new ELException(MessageFactory.get("error.function", this +.getOutputName()), iae); +} catch (InvocationTargetException ite) { +throw new ELException(MessageFactory.get("error.function", this +.getOutputName()), ite.getCause()); +} +return result; +} + +public void setLocalName(String localName) { +this.localName = localName; +} + +public void setPrefix(String prefix) { +this.prefix = prefix; +} + + +public String toString() +{ +return ELParserTreeConstants.jjtNodeName[id] + "[" + this.getOutputName() + "]"; +} +} Added: tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/AstGreaterThan.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/AstGreaterThan.java?rev=372228&view=auto == --- tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/AstGreaterThan.java (added) +++ tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/AstGreaterThan.java Wed Jan 25 06:37:16 2006 @@ -0,0 +1,31 @@ +/* Generated By:JJTree: Do not edit this line. AstGreaterThan.java */ + +package org.apache.el.parser; + +import javax.el.ELException; + +import org.apache.el.lang.EvaluationContext; + + +/** + * @author Jacob Hookom [EMAIL PROTECTED] + * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: dpatil $ + */ +public final class As
svn commit: r372275 - /tomcat/jasper/tc6.0.x/src/share/javax/el/BeanELResolver.java
Author: remm Date: Wed Jan 25 09:04:15 2006 New Revision: 372275 URL: http://svn.apache.org/viewcvs?rev=372275&view=rev Log: - Get the read method rather than the write method here. - Oh no, I've noticed there are tabs everywhere. - Submitted by Jason Hookom. Modified: tomcat/jasper/tc6.0.x/src/share/javax/el/BeanELResolver.java Modified: tomcat/jasper/tc6.0.x/src/share/javax/el/BeanELResolver.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/javax/el/BeanELResolver.java?rev=372275&r1=372274&r2=372275&view=diff == --- tomcat/jasper/tc6.0.x/src/share/javax/el/BeanELResolver.java (original) +++ tomcat/jasper/tc6.0.x/src/share/javax/el/BeanELResolver.java Wed Jan 25 09:04:15 2006 @@ -236,7 +236,7 @@ public Method read(ELContext ctx) { if (this.read == null) { - this.read = getMethod(this.owner, descriptor.getWriteMethod()); + this.read = getMethod(this.owner, descriptor.getReadMethod()); if (this.read == null) { throw new PropertyNotFoundException(message(ctx, "propertyNotReadable", new Object[] { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r372854 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java
Author: remm Date: Fri Jan 27 05:56:55 2006 New Revision: 372854 URL: http://svn.apache.org/viewcvs?rev=372854&view=rev Log: - Always initialize loggers in realm start rather than at a random time earlier. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java?rev=372854&r1=372853&r2=372854&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/RealmBase.java Fri Jan 27 05:56:55 2006 @@ -175,7 +175,6 @@ Container oldContainer = this.container; this.container = container; -this.containerLog = container.getLogger(); support.firePropertyChange("container", oldContainer, this.container); } @@ -1268,6 +1267,7 @@ protected boolean initialized=false; public void init() { +this.containerLog = container.getLogger(); if( initialized && container != null ) return; initialized=true; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r374092 - in /tomcat/jasper/tc6.0.x: build.properties.sample build.xml
Author: remm Date: Wed Feb 1 07:58:35 2006 New Revision: 374092 URL: http://svn.apache.org/viewcvs?rev=374092&view=rev Log: - Update Ant build script for the current source layout. Modified: tomcat/jasper/tc6.0.x/build.properties.sample tomcat/jasper/tc6.0.x/build.xml Modified: tomcat/jasper/tc6.0.x/build.properties.sample URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/build.properties.sample?rev=374092&r1=374091&r2=374092&view=diff == --- tomcat/jasper/tc6.0.x/build.properties.sample (original) +++ tomcat/jasper/tc6.0.x/build.properties.sample Wed Feb 1 07:58:35 2006 @@ -9,9 +9,48 @@ # $Id$ # - +# - Default Base Path for Dependent Packages - +# Please note this path must be absolute, not relative, +# as it is referenced with different working directory +# contexts by the various build scripts. +base.path=/usr/share/java +#base.path=C:/path/to/the/repository +#base.path=/usr/local + # - Pointer to Catalina - catalina.home=../../jakarta-tomcat-5/build # - Pointer to JSP Standard Tag Library distribution - #standard.home=${base.path}/jakarta-taglibs/standard #jsp20el.jar=${standard.home}/../dist/jsp20el/jsp20el.jar + +compile.source=1.5 + +# - Servlet API v2.4 - +servlet-api.home=${base.path}/servlet-api-2.4 +servlet-api.lib=${servlet-api.home}/lib +servlet-api.jar=${servlet-api.lib}/servlet-api.jar + +# - JSP API v2.0 - +jsp-api.home=${base.path}/jsp-api-2.0 +jsp-api.lib=${jsp-api.home}/lib +jsp-api.jar=${jsp-api.lib}/jsp-api.jar + +# - Commons Logging, version 1.0.1 or later - +commons-logging.home=${base.path}/commons-logging-1.0.4 +commons-logging.lib=${commons-logging.home} +commons-logging-api.jar=${commons-logging.lib}/commons-logging-api.jar +commons-logging.jar=${commons-logging.lib}/commons-logging.jar +commons-logging.loc=${base-jakarta.loc}/commons/logging/binaries/commons-logging-1.0.4.tar.gz + +# - Commons Expression Language (EL), version 1.0 or later - +commons-el.home=${base.path}/commons-el-1.0 +commons-el.lib=${commons-el.home} +commons-el.jar=${commons-el.lib}/commons-el.jar +commons-el.loc=${base-jakarta.loc}/commons/el/binaries/commons-el-1.0.tar.gz + +# - Eclipse JDT, version 3.1.1 or later - +jdt.home=${base.path}/eclipse/plugins +jdt.lib=${jdt.home} +jdt.jar=${jdt.lib}/org.eclipse.jdt.core_3.1.1.jar +jdt.loc=http://sunsite.informatik.rwth-aachen.de/eclipse/downloads/drops/R-3.1.1-200509290840/eclipse-JDT-3.1.1.zip Modified: tomcat/jasper/tc6.0.x/build.xml URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/build.xml?rev=374092&r1=374091&r2=374092&view=diff == --- tomcat/jasper/tc6.0.x/build.xml (original) +++ tomcat/jasper/tc6.0.x/build.xml Wed Feb 1 07:58:35 2006 @@ -1,4 +1,4 @@ - + @@ -21,6 +21,7 @@ + @@ -28,16 +29,9 @@ - - - - - - - + - - + @@ -116,10 +110,12 @@ - + + + + + + + + + + + + + + + + + + + + + + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r374204 - /tomcat/container/tc5.5.x/catalina/src/conf/web.xml
Author: remm Date: Wed Feb 1 15:50:13 2006 New Revision: 374204 URL: http://svn.apache.org/viewcvs?rev=374204&view=rev Log: - I guess nobody will do that ... Modified: tomcat/container/tc5.5.x/catalina/src/conf/web.xml Modified: tomcat/container/tc5.5.x/catalina/src/conf/web.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/conf/web.xml?rev=374204&r1=374203&r2=374204&view=diff == --- tomcat/container/tc5.5.x/catalina/src/conf/web.xml (original) +++ tomcat/container/tc5.5.x/catalina/src/conf/web.xml Wed Feb 1 15:50:13 2006 @@ -1072,7 +1072,7 @@ ppt application/vnd.ms-powerpoint -a + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r374205 - in /tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11: Http11BaseProtocol.java Http11Protocol.java
Author: remm Date: Wed Feb 1 15:52:44 2006 New Revision: 374205 URL: http://svn.apache.org/viewcvs?rev=374205&view=rev Log: - 38485: Fix minor regression setting connection timeout and a few others (the connection handler will be created after setting the properties, so setting defaults there is not an option). Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java?rev=374205&r1=374204&r2=374205&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java Wed Feb 1 15:52:44 2006 @@ -31,7 +31,6 @@ import org.apache.coyote.Adapter; import org.apache.coyote.ProtocolHandler; import org.apache.coyote.RequestGroupInfo; -import org.apache.coyote.RequestInfo; import org.apache.tomcat.util.net.PoolTcpEndpoint; import org.apache.tomcat.util.net.SSLImplementation; import org.apache.tomcat.util.net.SSLSupport; @@ -40,7 +39,6 @@ import org.apache.tomcat.util.net.TcpConnectionHandler; import org.apache.tomcat.util.res.StringManager; import org.apache.tomcat.util.threads.ThreadPool; -import org.apache.tomcat.util.threads.ThreadWithAttributes; /** @@ -54,6 +52,10 @@ public class Http11BaseProtocol implements ProtocolHandler { public Http11BaseProtocol() { +setSoLinger(Constants.DEFAULT_CONNECTION_LINGER); +setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT); +setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT); +setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY); } /** @@ -106,12 +108,7 @@ } protected Http11ConnectionHandler createConnectionHandler() { -Http11ConnectionHandler cHandler = new Http11ConnectionHandler( this ); -setSoLinger(Constants.DEFAULT_CONNECTION_LINGER); -setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT); -setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT); -setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY); -return cHandler ; +return new Http11ConnectionHandler( this ); } /** Start the protocol Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java?rev=374205&r1=374204&r2=374205&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java Wed Feb 1 15:52:44 2006 @@ -62,12 +62,7 @@ } protected Http11ConnectionHandler createConnectionHandler() { -Http11ConnectionHandler cHandler = new JmxHttp11ConnectionHandler( this ); -setSoLinger(Constants.DEFAULT_CONNECTION_LINGER); -setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT); -setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT); -setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY); -return cHandler ; +return new JmxHttp11ConnectionHandler( this ) ; } ObjectName tpOname; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r374877 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: remm Date: Sat Feb 4 07:00:44 2006 New Revision: 374877 URL: http://svn.apache.org/viewcvs?rev=374877&view=rev Log: - Pass along more of the SSL related fields (note: I'm not sure what the skipfirst flag of setCertificateChainFile is actually supposed to do). Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=374877&r1=374876&r2=374877&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Sat Feb 4 07:00:44 2006 @@ -590,10 +590,12 @@ SSLContext.setCipherSuite(sslContext, SSLCipherSuite); // Load Server key and certificate SSLContext.setCertificate(sslContext, SSLCertificateFile, SSLCertificateKeyFile, SSLPassword, SSL.SSL_AIDX_RSA); +// Set certificate chain file +SSLContext.setCertificateChainFile(sslContext, SSLCertificateChainFile, false); // Support Client Certificates -if (SSLCACertificateFile != null) { -SSLContext.setCACertificate(sslContext, SSLCACertificateFile, null); -} +SSLContext.setCACertificate(sslContext, SSLCACertificateFile, SSLCACertificatePath); +// Set revocation +SSLContext.setCARevocation(sslContext, SSLCARevocationFile, SSLCARevocationPath); // Client certificate verification value = SSL.SSL_CVERIFY_NONE; if ("optional".equalsIgnoreCase(SSLVerifyClient)) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r374878 - in /tomcat: build/tc5.5.x/tomcat.nsi connectors/trunk/jni/native/include/tcn_version.h container/tc5.5.x/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java
Author: remm Date: Sat Feb 4 07:02:39 2006 New Revision: 374878 URL: http://svn.apache.org/viewcvs?rev=374878&view=rev Log: - The IP change of network.c is a backwards incompatible change (a 1.1.1 binary will crash), so bump up the patch level required. Modified: tomcat/build/tc5.5.x/tomcat.nsi tomcat/connectors/trunk/jni/native/include/tcn_version.h tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java Modified: tomcat/build/tc5.5.x/tomcat.nsi URL: http://svn.apache.org/viewcvs/tomcat/build/tc5.5.x/tomcat.nsi?rev=374878&r1=374877&r2=374878&view=diff == --- tomcat/build/tc5.5.x/tomcat.nsi (original) +++ tomcat/build/tc5.5.x/tomcat.nsi Sat Feb 4 07:02:39 2006 @@ -203,11 +203,11 @@ SectionIn 3 - NSISdl::download /TIMEOUT=3 http://tomcat.heanet.ie/native/1.1.1/binaries/win32/tcnative-1.dll $INSTDIR\bin\tcnative-1.dll + NSISdl::download /TIMEOUT=3 http://tomcat.heanet.ie/native/1.1.2/binaries/win32/tcnative-1.dll $INSTDIR\bin\tcnative-1.dll Pop $0 StrCmp $0 success success SetDetailsView show -DetailPrint "download failed from http://tomcat.heanet.ie/native/1.1.1/binaries/win32/tcnative-1.dll: $0" +DetailPrint "download failed from http://tomcat.heanet.ie/native/1.1.2/binaries/win32/tcnative-1.dll: $0" success: ClearErrors Modified: tomcat/connectors/trunk/jni/native/include/tcn_version.h URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jni/native/include/tcn_version.h?rev=374878&r1=374877&r2=374878&view=diff == --- tomcat/connectors/trunk/jni/native/include/tcn_version.h (original) +++ tomcat/connectors/trunk/jni/native/include/tcn_version.h Sat Feb 4 07:02:39 2006 @@ -68,7 +68,7 @@ #define TCN_MINOR_VERSION 1 /** patch level */ -#define TCN_PATCH_VERSION 1 +#define TCN_PATCH_VERSION 2 /** * This symbol is defined for internal, "development" copies of TCN. This Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java?rev=374878&r1=374877&r2=374878&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java Sat Feb 4 07:02:39 2006 @@ -52,7 +52,7 @@ protected static final int REQUIRED_MAJOR = 1; protected static final int REQUIRED_MINOR = 1; -protected static final int REQUIRED_PATCH = 1; +protected static final int REQUIRED_PATCH = 2; // -- LifecycleListener Methods - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r374893 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core: ContainerBase.java StandardContext.java
Author: remm Date: Sat Feb 4 09:36:19 2006 New Revision: 374893 URL: http://svn.apache.org/viewcvs?rev=374893&view=rev Log: - It is always possible that container loggers are acquired before the classloader is correctly setup. Set it to null to ensure the correct classloader will be used the rest of the way. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ContainerBase.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ContainerBase.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ContainerBase.java?rev=374893&r1=374892&r2=374893&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ContainerBase.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ContainerBase.java Sat Feb 4 09:36:19 2006 @@ -993,6 +993,7 @@ // Start our subordinate components, if any if ((loader != null) && (loader instanceof Lifecycle)) ((Lifecycle) loader).start(); +logger = null; getLogger(); if ((logger != null) && (logger instanceof Lifecycle)) ((Lifecycle) logger).start(); Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java?rev=374893&r1=374892&r2=374893&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java Sat Feb 4 09:36:19 2006 @@ -4082,8 +4082,13 @@ // Binding thread oldCCL = bindThread(); +// Initialize logger again. Other components might have used it too early, +// so it should be reset. +logger = null; +getLogger(); if ((logger != null) && (logger instanceof Lifecycle)) ((Lifecycle) logger).start(); + if ((cluster != null) && (cluster instanceof Lifecycle)) ((Lifecycle) cluster).start(); if ((realm != null) && (realm instanceof Lifecycle)) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r374898 - in /tomcat/container/tc5.5.x/webapps/docs: apr.xml changelog.xml ssl-howto.xml
Author: remm Date: Sat Feb 4 09:55:49 2006 New Revision: 374898 URL: http://svn.apache.org/viewcvs?rev=374898&view=rev Log: - "Update" SSL docs and changelog. Modified: tomcat/container/tc5.5.x/webapps/docs/apr.xml tomcat/container/tc5.5.x/webapps/docs/changelog.xml tomcat/container/tc5.5.x/webapps/docs/ssl-howto.xml Modified: tomcat/container/tc5.5.x/webapps/docs/apr.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/apr.xml?rev=374898&r1=374897&r2=374898&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/apr.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/apr.xml Sat Feb 4 09:55:49 2006 @@ -230,6 +230,31 @@ Maximum verification depth for client certificates. The default is "10". + + + See http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslcacertificatefile";>the mod_ssl documentation. + + + + + See http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslcacertificatepath";>the mod_ssl documentation. + + + + + See http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslcertificatechainfile";>the mod_ssl documentation. + + + + + See http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslcarevocationfile";>the mod_ssl documentation. + + + + + See http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslcarevocationpath";>the mod_ssl documentation. + + Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=374898&r1=374897&r2=374898&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Sat Feb 4 09:55:49 2006 @@ -20,6 +20,9 @@ Updated / enhanced docs to remove old FIXME references. (yoavs) + +Required tcnative library version upgraded to 1.1.2 (remm) + @@ -47,6 +50,10 @@ Fix the JMX MBeanFactory.createStandardHost signature at mbean-descriptors.xml (pero) + + Fix some cases (for example with realm usage) where the container logger for a context + would be retrieved using the wrong classloader (remm) + @@ -57,6 +64,14 @@ 38100: Make certain that a valid Host name is set, or none at all. (billbarker) + +38485: Fix minor regression setting connection timeout (as well as linger and +no delay) where the default value was always used when using the regular +HTTP connector (remm) + + +Pass along more of the SSL related fields to OpenSSL (remm) + Modified: tomcat/container/tc5.5.x/webapps/docs/ssl-howto.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/ssl-howto.xml?rev=374898&r1=374897&r2=374898&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/ssl-howto.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/ssl-howto.xml Sat Feb 4 09:55:49 2006 @@ -17,6 +17,9 @@ + IMPORTANT NOTE: This Howto refers to usage of JSSE. When using APR, Tomcat will + use OpenSSL, which uses a different configuration. + The description below uses the variable name $CATALINA_HOME to refer to the directory into which you have installed Tomcat 5, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r375376 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java
Author: remm Date: Mon Feb 6 13:22:14 2006 New Revision: 375376 URL: http://svn.apache.org/viewcvs?rev=375376&view=rev Log: - Remove getId throwing an ISE. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java?rev=375376&r1=375375&r2=375376&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java Mon Feb 6 13:22:14 2006 @@ -324,11 +324,6 @@ */ public String getId() { -if ( !isValid() ) { -throw new IllegalStateException -(sm.getString("standardSession.getId.ise")); -} - return (this.id); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r375582 - in /tomcat/connectors/trunk: http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java jk/java/org/apache/coyote/ajp/AjpAprProcessor.java
Author: remm Date: Tue Feb 7 03:47:20 2006 New Revision: 375582 URL: http://svn.apache.org/viewcvs?rev=375582&view=rev Log: - 38464: Fix incorrect usage of sendbb method, which can in some cases do incomplete writes. Let me know if there are still problems. - Note: for AJP, the fix is there just-in-case, as it is apparently impossible to get in this situation. Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java?rev=375582&r1=375581&r2=375582&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java Tue Feb 7 03:47:20 2006 @@ -695,9 +695,14 @@ protected void flushBuffer() throws IOException { if (bbuf.position() > 0) { -if (Socket.sendbb(socket, 0, bbuf.position()) < 0) { -throw new IOException(sm.getString("iib.failedwrite")); -} +int i = 0; +int n = 0; +do { +if ((n = Socket.sendbb(socket, i, bbuf.position())) < 0) { +throw new IOException(); +} +i += n; +} while (i < bbuf.position()); bbuf.clear(); } } Modified: tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=375582&r1=375581&r2=375582&view=diff == --- tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java (original) +++ tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Tue Feb 7 03:47:20 2006 @@ -1169,9 +1169,14 @@ protected void flush() throws IOException { if (outputBuffer.position() > 0) { -if (Socket.sendbb(socket, 0, outputBuffer.position()) < 0) { -throw new IOException(sm.getString("ajpprotocol.failedwrite")); -} +int i = 0; +int n = 0; +do { +if ((n = Socket.sendbb(socket, i, outputBuffer.position())) < 0) { +throw new IOException(); +} +i += n; +} while (i < outputBuffer.position()); outputBuffer.clear(); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r375601 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: remm Date: Tue Feb 7 06:04:47 2006 New Revision: 375601 URL: http://svn.apache.org/viewcvs?rev=375601&view=rev Log: - Modify logging for APR sendfile errors affecting only a single transfer when adding to the poller. Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=375601&r1=375600&r2=375601&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Tue Feb 7 06:04:47 2006 @@ -1429,7 +1429,9 @@ sendfileData.put(new Long(data.socket), data); sendfileCount++; } else { - log.warn(sm.getString("endpoint.sendfile.addfail", "" + rv)); +if (log.isDebugEnabled()) { + log.debug(sm.getString("endpoint.sendfile.addfail", Error.strerror(rv))); +} // Can't do anything: close the socket right away Socket.destroy(data.socket); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r375606 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: remm Date: Tue Feb 7 06:28:27 2006 New Revision: 375606 URL: http://svn.apache.org/viewcvs?rev=375606&view=rev Log: - Switch back to warn, as the error could be recurring. Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=375606&r1=375605&r2=375606&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Tue Feb 7 06:28:27 2006 @@ -1429,9 +1429,7 @@ sendfileData.put(new Long(data.socket), data); sendfileCount++; } else { -if (log.isDebugEnabled()) { - log.debug(sm.getString("endpoint.sendfile.addfail", Error.strerror(rv))); -} + log.warn(sm.getString("endpoint.sendfile.addfail", Error.strerror(rv))); // Can't do anything: close the socket right away Socket.destroy(data.socket); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r375613 - in /tomcat/connectors/trunk: http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java jk/java/org/apache/coyote/ajp/AjpAprProcessor.java
Author: remm Date: Tue Feb 7 06:39:54 2006 New Revision: 375613 URL: http://svn.apache.org/viewcvs?rev=375613&view=rev Log: - sendbb uses a length, so "- i" is missing. Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java?rev=375613&r1=375612&r2=375613&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java Tue Feb 7 06:39:54 2006 @@ -698,7 +698,7 @@ int i = 0; int n = 0; do { -if ((n = Socket.sendbb(socket, i, bbuf.position())) < 0) { +if ((n = Socket.sendbb(socket, i, bbuf.position() - i)) < 0) { throw new IOException(); } i += n; Modified: tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=375613&r1=375612&r2=375613&view=diff == --- tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java (original) +++ tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Tue Feb 7 06:39:54 2006 @@ -1172,7 +1172,7 @@ int i = 0; int n = 0; do { -if ((n = Socket.sendbb(socket, i, outputBuffer.position())) < 0) { +if ((n = Socket.sendbb(socket, i, outputBuffer.position() - i)) < 0) { throw new IOException(); } i += n; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r375625 - in /tomcat/connectors/trunk: http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java jk/java/org/apache/coyote/ajp/AjpAprProcessor.java
Author: remm Date: Tue Feb 7 07:16:02 2006 New Revision: 375625 URL: http://svn.apache.org/viewcvs?rev=375625&view=rev Log: - Switch back to using a native fix (in order to not having to do too many JNI calls, since it's the whole point). Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java?rev=375625&r1=375624&r2=375625&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java Tue Feb 7 07:16:02 2006 @@ -695,14 +695,9 @@ protected void flushBuffer() throws IOException { if (bbuf.position() > 0) { -int i = 0; -int n = 0; -do { -if ((n = Socket.sendbb(socket, i, bbuf.position() - i)) < 0) { -throw new IOException(); -} -i += n; -} while (i < bbuf.position()); +if (Socket.sendbb(socket, 0, bbuf.position()) < 0) { +throw new IOException(); +} bbuf.clear(); } } Modified: tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=375625&r1=375624&r2=375625&view=diff == --- tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java (original) +++ tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java Tue Feb 7 07:16:02 2006 @@ -1169,14 +1169,9 @@ protected void flush() throws IOException { if (outputBuffer.position() > 0) { -int i = 0; -int n = 0; -do { -if ((n = Socket.sendbb(socket, i, outputBuffer.position() - i)) < 0) { -throw new IOException(); -} -i += n; -} while (i < outputBuffer.position()); +if (Socket.sendbb(socket, 0, outputBuffer.position()) < 0) { +throw new IOException(); +} outputBuffer.clear(); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r375650 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/factory: EjbFactory.java ResourceEnvFactory.java ResourceFactory.java TransactionFactory.java
Author: remm Date: Tue Feb 7 09:55:11 2006 New Revision: 375650 URL: http://svn.apache.org/viewcvs?rev=375650&view=rev Log: - More detailed error report using exception nesting. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/factory/EjbFactory.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/factory/ResourceEnvFactory.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/factory/ResourceFactory.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/factory/TransactionFactory.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/factory/EjbFactory.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/factory/EjbFactory.java?rev=375650&r1=375649&r2=375650&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/factory/EjbFactory.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/factory/EjbFactory.java Tue Feb 7 09:55:11 2006 @@ -114,11 +114,19 @@ try { factoryClass = tcl.loadClass(factoryClassName); } catch(ClassNotFoundException e) { +NamingException ex = new NamingException +("Could not load resource factory class"); +ex.initCause(e); +throw ex; } } else { try { factoryClass = Class.forName(factoryClassName); } catch(ClassNotFoundException e) { +NamingException ex = new NamingException +("Could not load resource factory class"); +ex.initCause(e); +throw ex; } } if (factoryClass != null) { @@ -135,6 +143,12 @@ factory = (ObjectFactory) Class.forName(javaxEjbFactoryClassName).newInstance(); } catch(Throwable t) { +if (t instanceof NamingException) +throw (NamingException) t; +NamingException ex = new NamingException +("Could not create resource factory instance"); +ex.initCause(t); +throw ex; } } Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/factory/ResourceEnvFactory.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/factory/ResourceEnvFactory.java?rev=375650&r1=375649&r2=375650&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/factory/ResourceEnvFactory.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/factory/ResourceEnvFactory.java Tue Feb 7 09:55:11 2006 @@ -77,17 +77,31 @@ try { factoryClass = tcl.loadClass(factoryClassName); } catch(ClassNotFoundException e) { +NamingException ex = new NamingException +("Could not load resource factory class"); +ex.initCause(e); +throw ex; } } else { try { factoryClass = Class.forName(factoryClassName); } catch(ClassNotFoundException e) { +NamingException ex = new NamingException +("Could not load resource factory class"); +ex.initCause(e); +throw ex; } } if (factoryClass != null) { try { factory = (ObjectFactory) factoryClass.newInstance(); } catch(Throwable t) { +if (t instanceof NamingException) +throw (NamingException) t; +NamingException ex = new NamingException +("Could not create resource factory instance"); +ex.initCause(t); +throw ex; } } } Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/factory/ResourceFactory.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/naming/factory/ResourceFactory.java?rev=375650&r1=375649&r2=375650&view=diff =
svn commit: r376345 - in /tomcat/container/tc5.5.x/webapps/docs: config/context.xml config/globalresources.xml jndi-resources-howto.xml
Author: remm Date: Thu Feb 9 08:47:51 2006 New Revision: 376345 URL: http://svn.apache.org/viewcvs?rev=376345&view=rev Log: - Add some docs for the Transaction element. Modified: tomcat/container/tc5.5.x/webapps/docs/config/context.xml tomcat/container/tc5.5.x/webapps/docs/config/globalresources.xml tomcat/container/tc5.5.x/webapps/docs/jndi-resources-howto.xml Modified: tomcat/container/tc5.5.x/webapps/docs/config/context.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/config/context.xml?rev=376345&r1=376344&r2=376345&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/config/context.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/config/context.xml Thu Feb 9 08:47:51 2006 @@ -747,6 +747,28 @@ + + +You can declare the characteristics of the UserTransaction +to be returned for JNDI lookup for java:comp/UserTransaction. +You MUST define an object factory class to instantiate +this object as well as the needed resource parameters as attributes of the +Transaction +element, and the properties used to configure that object factory. + +The valid attributes for the <Transaction> element +are as follows: + + + + +The class name for the JNDI object factory. + + + + + + Modified: tomcat/container/tc5.5.x/webapps/docs/config/globalresources.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/config/globalresources.xml?rev=376345&r1=376344&r2=376345&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/config/globalresources.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/config/globalresources.xml Thu Feb 9 08:47:51 2006 @@ -223,6 +223,28 @@ + + +You can declare the characteristics of the UserTransaction +to be returned for JNDI lookup for java:comp/UserTransaction. +You MUST define an object factory class to instantiate +this object as well as the needed resource parameters as attributes of the +Transaction +element, and the properties used to configure that object factory. + +The valid attributes for the <Transaction> element +are as follows: + + + + +The class name for the JNDI object factory. + + + + + + Modified: tomcat/container/tc5.5.x/webapps/docs/jndi-resources-howto.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/jndi-resources-howto.xml?rev=376345&r1=376344&r2=376345&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/jndi-resources-howto.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/jndi-resources-howto.xml Thu Feb 9 08:47:51 2006 @@ -121,6 +121,9 @@ the<GlobalNamingResources> child element of the <Server> element. +<Transaction> - +Add a resource factory for instantiating the UserTransaction object +instance that is available at java:comp/UserTransaction. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r376730 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java
Author: remm Date: Fri Feb 10 07:20:44 2006 New Revision: 376730 URL: http://svn.apache.org/viewcvs?rev=376730&view=rev Log: - Have CharCHunk implement CharSequence, so that a CharChunk can be given to a Java 5 regexp matcher without having to do a useless toString on it first. Typically, it would be the URL. - For some reason Costin refused this a while ago. Maybe there was a misunderstanding as to what the proposed change was about, as there's no functional change to CharChunk. Is this change still refused ? Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java?rev=376730&r1=376729&r2=376730&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/CharChunk.java Fri Feb 10 07:20:44 2006 @@ -30,7 +30,7 @@ * @author Costin Manolache * @author Remy Maucherat */ -public final class CharChunk implements Cloneable, Serializable { +public final class CharChunk implements Cloneable, Serializable, CharSequence { // Input interface, used when the buffer is emptied. public static interface CharInputChannel { @@ -695,4 +695,26 @@ return b; } +// Char sequence impl + +public char charAt(int index) { +return buff[index + start]; +} + +public CharSequence subSequence(int start, int end) { +try { +CharChunk result = (CharChunk) this.clone(); +result.setOffset(this.start + start); +result.setEnd(this.start + end); +return result; +} catch (CloneNotSupportedException e) { +// Cannot happen +return null; +} +} + +public int length() { +return end - start; +} + } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r377994 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core: ApplicationContext.java ApplicationContextFacade.java
Author: remm Date: Wed Feb 15 04:37:28 2006 New Revision: 377994 URL: http://svn.apache.org/viewcvs?rev=377994&view=rev Log: - Add getContextPath to the implementation classes. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java?rev=377994&r1=377993&r2=377994&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java Wed Feb 15 04:37:28 2006 @@ -240,6 +240,14 @@ } } + +/** + * Return the main path associated with this context. + */ +public String getContextPath() { +return context.getPath(); +} + /** * Return the value of the specified initialization parameter, or Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java?rev=377994&r1=377993&r2=377994&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContextFacade.java Wed Feb 15 04:37:28 2006 @@ -353,6 +353,15 @@ } +public String getContextPath() { +if (SecurityUtil.isPackageProtectionEnabled()) { +return (String) doPrivileged("getContextPath", null); +} else { +return context.getContextPath(); +} +} + + /** * Use reflection to invoke the requested method. Cache the method object * to speed up the process - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r378241 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: remm Date: Thu Feb 16 05:22:51 2006 New Revision: 378241 URL: http://svn.apache.org/viewcvs?rev=378241&view=rev Log: - Fix a dumb programming error which could cause a crash (rare, fortunately) after a poll error. i-- was used for the loop, so if sockets add were pending, the first socket (position 0) would be destroyed but not removed from the poller. - Change syncing to sync on "this", as init reallocates a new addS object. Please review to make sure all my syncs match my notify calls :) Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=378241&r1=378240&r2=378241&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Thu Feb 16 05:22:51 2006 @@ -985,7 +985,7 @@ */ protected void destroy() { // Close all sockets in the add queue -for (int i = 0; i < addCount; i--) { +for (int i = 0; i < addCount; i++) { Socket.destroy(addS[i]); } // Close all sockets still in the poller @@ -1009,7 +1009,7 @@ * @param socket to add to the poller */ public void add(long socket) { -synchronized (addS) { +synchronized (this) { // Add socket to the list. Newly added sockets will wait // at most for pollTime before being polled if (addCount >= addS.length) { @@ -1019,7 +1019,7 @@ } addS[addCount] = socket; addCount++; -addS.notify(); +this.notify(); } } @@ -1046,8 +1046,8 @@ // Reset maintain time. maintainTime = 0; try { -synchronized (addS) { -addS.wait(); +synchronized (this) { +this.wait(); } } catch (InterruptedException e) { // Ignore @@ -1057,7 +1057,7 @@ try { // Add sockets which are waiting to the poller if (addCount > 0) { -synchronized (addS) { +synchronized (this) { for (int i = (addCount - 1); i >= 0; i--) { int rv = Poll.add (serverPollset, addS[i], Poll.APR_POLLIN); @@ -1373,9 +1373,9 @@ } // Add socket to the list. Newly added sockets will wait // at most for pollTime before being polled -synchronized (addS) { +synchronized (this) { addS.add(data); -addS.notify(); +this.notify(); } return false; } @@ -1413,8 +1413,8 @@ while (sendfileCount < 1 && addS.size() < 1) { try { -synchronized (addS) { -addS.wait(); +synchronized (this) { +this.wait(); } } catch (InterruptedException e) { // Ignore @@ -1424,7 +1424,7 @@ try { // Add socket to the poller if (addS.size() > 0) { -synchronized (addS) { +synchronized (this) { for (int i = (addS.size() - 1); i >= 0; i--) { SendfileData data = (SendfileData) addS.get(i); int rv = Poll.add(sendfilePollset, data.socket, Poll.APR_POLLOUT); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r378248 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: remm Date: Thu Feb 16 05:53:29 2006 New Revision: 378248 URL: http://svn.apache.org/viewcvs?rev=378248&view=rev Log: - Remove useless thread sync. Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=378248&r1=378247&r2=378248&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Thu Feb 16 05:53:29 2006 @@ -91,12 +91,6 @@ /** - * Synchronization object. - */ -protected final Object threadSync = new Object(); - - -/** * The acceptor thread. */ protected Thread acceptorThread = null; @@ -927,11 +921,6 @@ } -// Notify the threadStop() method that we have shut ourselves down -synchronized (threadSync) { -threadSync.notifyAll(); -} - } } @@ -1115,11 +1104,6 @@ } -// Notify the threadStop() method that we have shut ourselves down -synchronized (threadSync) { -threadSync.notifyAll(); -} - } } @@ -1216,11 +1200,6 @@ } -// Tell threadStop() we have shut ourselves down successfully -synchronized (threadSync) { -threadSync.notifyAll(); -} - } @@ -1504,11 +1483,6 @@ } catch (Throwable t) { log.error(sm.getString("endpoint.poll.error"), t); } -} - -// Notify the threadStop() method that we have shut ourselves down -synchronized (threadSync) { -threadSync.notifyAll(); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r378251 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
Author: remm Date: Thu Feb 16 06:19:13 2006 New Revision: 378251 URL: http://svn.apache.org/viewcvs?rev=378251&view=rev Log: - Null instances loaded by WCL only. - Submitted by Matt Jensen. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java?rev=378251&r1=378250&r2=378251&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java Thu Feb 16 06:19:13 2006 @@ -1543,10 +1543,10 @@ > (lastJarAccessed + 9))) { for (int i = 0; i < jarFiles.length; i++) { try { - if (jarFiles[i] != null) { - jarFiles[i].close(); - jarFiles[i] = null; - } +if (jarFiles[i] != null) { +jarFiles[i].close(); +jarFiles[i] = null; +} } catch (IOException e) { if (log.isDebugEnabled()) { log.debug("Failed to close JAR", e); @@ -1657,10 +1657,25 @@ // Doing something recursively is too risky continue; } else { -field.set(instance, null); -if (log.isDebugEnabled()) { -log.debug("Set field " + field.getName() -+ " to null in class " + instance.getClass().getName()); +Object value = field.get(instance); +if (null != value) { +Class valueClass = value.getClass(); +if (!loadedByThisOrChild(valueClass)) { +if (log.isDebugEnabled()) { +log.debug("Not setting field " + field.getName() + +" to null in object of class " + +instance.getClass().getName() + +" because the referenced object was of type " + +valueClass.getName() + +" which was not loaded by this WebappClassLoader."); +} +} else { +field.set(instance, null); +if (log.isDebugEnabled()) { +log.debug("Set field " + field.getName() ++ " to null in class " + instance.getClass().getName()); +} +} } } } catch (Throwable t) { @@ -1672,7 +1687,25 @@ } } } - + + +/** + * Determine whether a class was loaded by this class loader or one of + * its child class loaders. + */ +protected boolean loadedByThisOrChild(Class clazz) +{ +boolean result = false; +for (ClassLoader classLoader = clazz.getClassLoader(); +null != classLoader; classLoader = classLoader.getParent()) { +if (classLoader.equals(this)) { +result = true; +break; +} +} +return result; +} + /** * Used to periodically signal to the classloader to release JAR resources. @@ -1682,14 +1715,14 @@ lastJarAccessed = System.currentTimeMillis(); if (jarFiles[0] == null) { for (int i = 0; i < jarFiles.length; i++) { - try { +try { jarFiles[i] = new JarFile(jarRealFiles[i]); - } catch (IOException e) { +} catch (IOException e) { if (log.isDebugEnabled()) { log.debug("Failed to open JAR", e); } return false; - } +} } } } @@ -1869,6 +1902,7 @@ entry.lastModified = attributes.getLastModified();
svn commit: r378289 - /tomcat/container/tc5.5.x/webapps/docs/class-loader-howto.xml
Author: remm Date: Thu Feb 16 08:25:07 2006 New Revision: 378289 URL: http://svn.apache.org/viewcvs?rev=378289&view=rev Log: - No pattern exclusion anymore. Modified: tomcat/container/tc5.5.x/webapps/docs/class-loader-howto.xml Modified: tomcat/container/tc5.5.x/webapps/docs/class-loader-howto.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/class-loader-howto.xml?rev=378289&r1=378288&r2=378289&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/class-loader-howto.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/class-loader-howto.xml Thu Feb 16 08:25:07 2006 @@ -204,16 +204,7 @@ part of the JRE base classes cannot be overriden. For some classes (such as the XML parser components in J2SE 1.4+), the J2SE 1.4 endorsed feature can be used -(see the common classloader definition above). In addition, for the following -class patterns, the classloader will always delegate first -(and load the class itself if no parent classloader loads it): - -javax.* -org.xml.sax.* -org.w3c.dom.* -org.apache.xerces.* -org.apache.xalan.* - +(see the common classloader definition above). Last, any JAR containing servlet API classes will be ignored by the classloader. All other class loaders in Tomcat 5 follow the usual delegation pattern. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r378292 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup: ContextConfig.java HostConfig.java
Author: remm Date: Thu Feb 16 08:34:08 2006 New Revision: 378292 URL: http://svn.apache.org/viewcvs?rev=378292&view=rev Log: - Return an error (other than a NPE) if a context file doesn't contain any Context element. - Deploy folders which don't have a WEB-INF. - No info message when a webapp doesn't have a web.xml. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java?rev=378292&r1=378291&r2=378292&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java Thu Feb 16 08:34:08 2006 @@ -314,7 +314,9 @@ } } if (stream == null) { -log.info(sm.getString("contextConfig.applicationMissing") + " " + context); +if (log.isDebugEnabled()) { +log.debug(sm.getString("contextConfig.applicationMissing") + " " + context); +} return; } Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java?rev=378292&r1=378291&r2=378292&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java Thu Feb 16 08:34:08 2006 @@ -563,6 +563,11 @@ synchronized (digester) { try { context = (Context) digester.parse(contextXml); +if (context == null) { + log.error(sm.getString("hostConfig.deployDescriptor.error", +file)); +return; +} } finally { digester.reset(); } @@ -851,15 +856,6 @@ File dir = new File(appBase, files[i]); if (dir.isDirectory()) { -// Make sure there is an application configuration directory -// This is needed if the Context appBase is the same as the -// web server document root to make sure only web applications -// are deployed and not directories for web space. -File webInf = new File(dir, "/WEB-INF"); -if (!webInf.exists() || !webInf.isDirectory() || -!webInf.canRead()) -continue; - // Calculate the context path and make sure it is unique String contextPath = "/" + files[i]; if (files[i].equals("ROOT")) @@ -868,9 +864,7 @@ if (isServiced(contextPath)) continue; -String file = files[i]; - -deployDirectory(contextPath, dir, file); +deployDirectory(contextPath, dir, files[i]); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r378293 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util: LocalStrings.properties LocalStrings_es.properties LocalStrings_fr.properties LocalStrings_ja.properties
Author: remm Date: Thu Feb 16 08:36:47 2006 New Revision: 378293 URL: http://svn.apache.org/viewcvs?rev=378293&view=rev Log: - 38653: Fix property name. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings.properties tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings_es.properties tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings_fr.properties tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings_ja.properties Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings.properties URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings.properties?rev=378293&r1=378292&r2=378293&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings.properties (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings.properties Thu Feb 16 08:36:47 2006 @@ -1,4 +1,4 @@ -propertyMap.locked=No modifications are allowed to a locked ParameterMap +parameterMap.locked=No modifications are allowed to a locked ParameterMap resourceSet.locked=No modifications are allowed to a locked ResourceSet hexUtil.bad=Bad hexadecimal digit hexUtil.odd=Odd number of hexadecimal digits Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings_es.properties URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings_es.properties?rev=378293&r1=378292&r2=378293&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings_es.properties (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings_es.properties Thu Feb 16 08:36:47 2006 @@ -1,4 +1,4 @@ -propertyMap.locked=No se permiten modificaciones en un ParameterMap bloqueado +parameterMap.locked=No se permiten modificaciones en un ParameterMap bloqueado resourceSet.locked=No se permiten modificaciones en un ResourceSet bloqueado hexUtil.bad=DÃgito hexadecimal incorrecto hexUtil.odd=Número de dÃgitos hexadecimales impar Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings_fr.properties URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings_fr.properties?rev=378293&r1=378292&r2=378293&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings_fr.properties (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings_fr.properties Thu Feb 16 08:36:47 2006 @@ -1,4 +1,4 @@ -propertyMap.locked=Aucune modification n''est authorisée sur un ParameterMap vérrouillé +parameterMap.locked=Aucune modification n''est authorisée sur un ParameterMap vérrouillé resourceSet.locked=Aucune modification n''est authorisée sur un ResourceSet vérrouillé hexUtil.bad=Mauvais digit hexadecimal hexUtil.odd=Nombre impair de digits hexadecimaux Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings_ja.properties URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings_ja.properties?rev=378293&r1=378292&r2=378293&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings_ja.properties (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/util/LocalStrings_ja.properties Thu Feb 16 08:36:47 2006 @@ -1,4 +1,4 @@ -propertyMap.locked=\u30ed\u30c3\u30af\u3055\u308c\u305fParameterMap\u306f\u5909\u66f4\u304c\u8a31\u3055\u308c\u307e\u305b\u3093 +parameterMap.locked=\u30ed\u30c3\u30af\u3055\u308c\u305fParameterMap\u306f\u5909\u66f4\u304c\u8a31\u3055\u308c\u307e\u305b\u3093 resourceSet.locked=\u30ed\u30c3\u30af\u3055\u308c\u305fResourceSet\u306f\u5909\u66f4\u304c\u8a31\u3055\u308c\u307e\u305b\u3093 hexUtil.bad=\u7121\u52b9\u306a16\u9032\u6570\u5024\u3067\u3059 hexUtil.odd=\u5947\u6570\u6841\u306e16\u9032\u6570\u5024\u3067\u3059 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r378498 - in /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net: AprEndpoint.java res/LocalStrings.properties
Author: remm Date: Fri Feb 17 04:47:40 2006 New Revision: 378498 URL: http://svn.apache.org/viewcvs?rev=378498&view=rev Log: - Update error reports, including the error codes (just in case we get a MS style "Unknown error"). Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=378498&r1=378497&r2=378498&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Fri Feb 17 04:47:40 2006 @@ -538,12 +538,12 @@ // Bind the server socket int ret = Socket.bind(serverSock, inetAddress); if (ret != 0) { -throw new Exception(sm.getString("endpoint.init.bind", Error.strerror(ret))); +throw new Exception(sm.getString("endpoint.init.bind", "" + ret, Error.strerror(ret))); } // Start listening on the server socket ret = Socket.listen(serverSock, backlog); if (ret != 0) { -throw new Exception(sm.getString("endpoint.init.listen", Error.strerror(ret))); +throw new Exception(sm.getString("endpoint.init.listen", "" + ret, Error.strerror(ret))); } if (OS.IS_WIN32 || OS.IS_WIN64) { // On Windows set the reuseaddr flag after the bind/listen @@ -1079,7 +1079,11 @@ } else if (rv < 0) { /* Any non timeup error is critical */ if (-rv != Status.TIMEUP) { -log.error(sm.getString("endpoint.poll.fail", Error.strerror(-rv))); +int errn = -rv; +if (errn > Status.APR_OS_START_USERERR) { + errn -= Status.APR_OS_START_USERERR; +} +log.error(sm.getString("endpoint.poll.fail", "" + (-rv), Error.strerror(-rv))); // Handle poll critical failure synchronized (this) { destroy(); @@ -1411,7 +1415,7 @@ sendfileData.put(new Long(data.socket), data); sendfileCount++; } else { - log.warn(sm.getString("endpoint.sendfile.addfail", Error.strerror(rv))); + log.warn(sm.getString("endpoint.sendfile.addfail", "" + rv, Error.strerror(rv))); // Can't do anything: close the socket right away Socket.destroy(data.socket); } @@ -1471,7 +1475,7 @@ if (-rv == Status.TIMEUP) rv = 0; else { -log.error(sm.getString("endpoint.poll.fail", Error.strerror(-rv))); +log.error(sm.getString("endpoint.poll.fail", "" + (-rv), Error.strerror(-rv))); // Handle poll critical failure synchronized (this) { destroy(); Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties?rev=378498&r1=378497&r2=378498&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties Fri Feb 17 04:47:40 2006 @@ -11,14 +11,14 @@ endpoint.debug.unlock=Caught exception trying to unlock accept on port {0} endpoint.err.close=Caught exception trying to close socket endpoint.noProcessor=No Processors - worker thread dead! -endpoint.init.bind=Socket bind failed: {0} -endpoint.init.listen=Socket listen failed: {0} +endpoint.init.bind=Socket bind failed: [{0}] {1} +endpoint.init.listen=Socket listen failed: [{0}] {1} endpoint.accept.fail=Socket accept failed endpoint.poll.limitedpollsize=Failed to create poller with specified size, uses 62 instead endpoint.poll.initfail=Poller creat
svn commit: r378621 - in /tomcat/container/tc5.5.x/webapps: host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/Constants.java manager/WEB-INF/classes/org/apache/catalina/manager/Constants.ja
Author: remm Date: Fri Feb 17 12:36:01 2006 New Revision: 378621 URL: http://svn.apache.org/viewcvs?rev=378621&view=rev Log: - Fix logos. Modified: tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/Constants.java tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java Modified: tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/Constants.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/Constants.java?rev=378621&r1=378620&r2=378621&view=diff == --- tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/Constants.java (original) +++ tomcat/container/tc5.5.x/webapps/host-manager/WEB-INF/classes/org/apache/catalina/hostmanager/Constants.java Fri Feb 17 12:36:01 2006 @@ -106,11 +106,11 @@ "\n" + " \n" + " \n" + -" http://jakarta.apache.org/\";>\n" + -"\n" + +" http://www.apache.org/\";>\n" + +"\n" + " \n" + -" http://jakarta.apache.org/tomcat/\";>\n" + +" http://tomcat.apache.org/\";>\n" + "\n" + " \n" + Modified: tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java?rev=378621&r1=378620&r2=378621&view=diff == --- tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java (original) +++ tomcat/container/tc5.5.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java Fri Feb 17 12:36:01 2006 @@ -102,11 +102,11 @@ "\n" + " \n" + " \n" + -" http://jakarta.apache.org/\";>\n" + -"\n" + +" http://www.apache.org/\";>\n" + +"\n" + " \n" + -" http://jakarta.apache.org/tomcat/\";>\n" + +" http://tomcat.apache.org/\";>\n" + "\n" + " \n" + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r379183 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina: core/StandardContext.java startup/ContextConfig.java
Author: remm Date: Mon Feb 20 09:45:48 2006 New Revision: 379183 URL: http://svn.apache.org/viewcvs?rev=379183&view=rev Log: - Slightly modify the timing of the manager start (unfortunately, setManager in ContextConfig.java causes and immediate start of the manager). Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java?rev=379183&r1=379182&r2=379183&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java Mon Feb 20 09:45:48 2006 @@ -81,6 +81,7 @@ import org.apache.catalina.deploy.SecurityCollection; import org.apache.catalina.deploy.SecurityConstraint; import org.apache.catalina.loader.WebappLoader; +import org.apache.catalina.session.StandardManager; import org.apache.catalina.startup.ContextConfig; import org.apache.catalina.startup.TldConfig; import org.apache.catalina.util.CharsetMapper; @@ -4116,6 +4117,20 @@ // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(START_EVENT, null); +// Configure default manager if none was specified +if (manager == null) { +if ((cluster != null) && distributable) { +try { +setManager(cluster.createManager(getName())); +} catch (Exception ex) { +log.error("standardContext.clusterFail", ex); +ok = false; +} +} else { +setManager(new StandardManager()); +} +} + // Start manager if ((manager != null) && (manager instanceof Lifecycle)) { ((Lifecycle) getManager()).start(); Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java?rev=379183&r1=379182&r2=379183&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java Mon Feb 20 09:45:48 2006 @@ -388,28 +388,6 @@ /** - * Set up a manager. - */ -protected synchronized void managerConfig() { - -if (context.getManager() == null) { -if ((context.getCluster() != null) && context.getDistributable()) { -try { -context.setManager(context.getCluster().createManager - (context.getName())); -} catch (Exception ex) { -log.error("contextConfig.clusteringInit", ex); -ok = false; -} -} else { -context.setManager(new StandardManager()); -} -} - -} - - -/** * Set up an Authenticator automatically if required, and one has not * already been configured. */ @@ -1062,10 +1040,6 @@ // Configure an authenticator if we need one if (ok) authenticatorConfig(); - -// Configure a manager -if (ok) -managerConfig(); // Dump the contents of this pipeline if requested if ((log.isDebugEnabled()) && (context instanceof ContainerBase)) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r379417 [3/7] - in /tomcat/jasper/tc6.0.x/src/share/org/apache: el/lang/ el/parser/ el/util/ jasper/compiler/ jasper/el/ jasper/resources/ jasper/runtime/
Modified: tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/PageInfo.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/PageInfo.java?rev=379417&r1=379416&r2=379417&view=diff == --- tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/PageInfo.java (original) +++ tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/PageInfo.java Tue Feb 21 02:57:35 2006 @@ -22,8 +22,11 @@ import java.util.List; import java.util.Vector; +import org.apache.el.ExpressionFactoryImpl; import org.apache.jasper.Constants; import org.apache.jasper.JasperException; + +import javax.el.ExpressionFactory; import javax.servlet.jsp.tagext.TagLibraryInfo; /** @@ -63,8 +66,17 @@ private boolean scriptless = false; private boolean scriptingInvalid = false; + private String isELIgnoredValue; private boolean isELIgnored = false; + +// JSP 2.1 +private String deferredSyntaxAllowedAsLiteralValue; +private boolean deferredSyntaxAllowedAsLiteral = false; +private ExpressionFactory expressionFactory = new ExpressionFactoryImpl(); +private String trimDirectiveWhitespacesValue; +private boolean trimDirectiveWhitespaces = false; + private String omitXmlDecl = null; private String doctypeName = null; private String doctypePublic = null; @@ -605,6 +617,48 @@ isELIgnoredValue = value; } + +/* + * deferredSyntaxAllowedAsLiteral + */ +public void setDeferredSyntaxAllowedAsLiteral(String value, Node n, ErrorDispatcher err, + boolean pagedir) +throws JasperException { + +if ("true".equalsIgnoreCase(value)) +deferredSyntaxAllowedAsLiteral = true; +else if ("false".equalsIgnoreCase(value)) +deferredSyntaxAllowedAsLiteral = false; +else { +if (pagedir) +err.jspError(n, "jsp.error.page.invalid.deferredsyntaxallowedasliteral"); +else +err.jspError(n, "jsp.error.tag.invalid.deferredsyntaxallowedasliteral"); +} + +deferredSyntaxAllowedAsLiteralValue = value; +} + +/* + * trimDirectiveWhitespaces + */ +public void setTrimDirectiveWhitespaces(String value, Node n, ErrorDispatcher err, + boolean pagedir) +throws JasperException { + +if ("true".equalsIgnoreCase(value)) +trimDirectiveWhitespaces = true; +else if ("false".equalsIgnoreCase(value)) +trimDirectiveWhitespaces = false; +else { +if (pagedir) +err.jspError(n, "jsp.error.page.invalid.trimdirectivewhitespaces"); +else +err.jspError(n, "jsp.error.tag.invalid.trimdirectivewhitespaces"); +} + +deferredSyntaxAllowedAsLiteralValue = value; +} public void setELIgnored(boolean s) { isELIgnored = s; @@ -624,5 +678,33 @@ public Mark getNonCustomTagPrefix(String prefix) { return (Mark) nonCustomTagPrefixMap.get(prefix); +} + +public String getDeferredSyntaxAllowedAsLiteral() { +return deferredSyntaxAllowedAsLiteralValue; +} + +public boolean isDeferredSyntaxAllowedAsLiteral() { +return deferredSyntaxAllowedAsLiteral; +} + +public void setDeferredSyntaxAllowedAsLiteral(boolean isELDeferred) { +this.deferredSyntaxAllowedAsLiteral = isELDeferred; +} + +public ExpressionFactory getExpressionFactory() { +return expressionFactory; +} + +public String getTrimDirectiveWhitespaces() { +return trimDirectiveWhitespacesValue; +} + +public boolean isTrimDirectiveWhitespaces() { +return trimDirectiveWhitespaces; +} + +public void setTrimDirectiveWhitespaces(boolean trimDirectiveWhitespaces) { +this.trimDirectiveWhitespaces = trimDirectiveWhitespaces; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r379417 [1/7] - in /tomcat/jasper/tc6.0.x/src/share/org/apache: el/lang/ el/parser/ el/util/ jasper/compiler/ jasper/el/ jasper/resources/ jasper/runtime/
Author: remm Date: Tue Feb 21 02:57:35 2006 New Revision: 379417 URL: http://svn.apache.org/viewcvs?rev=379417&view=rev Log: - Wire the new EL inside Jasper. - Remove dependency on commons-el. - Temporary problem: this now requires a JSP 2.1 API binary to build. - Small fixes in the EL. - Submitted by Jacob Hookom. Added: tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/el/ tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/el/ELContextImpl.java tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/el/ELResolverImpl.java tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/el/ExpressionEvaluatorImpl.java tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/el/ExpressionImpl.java tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/el/FunctionMapperImpl.java tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/el/VariableResolverImpl.java tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/runtime/JspApplicationContextImpl.java Modified: tomcat/jasper/tc6.0.x/src/share/org/apache/el/lang/ExpressionBuilder.java tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/Node.java tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/NodeVisitor.java tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/SimpleNode.java tomcat/jasper/tc6.0.x/src/share/org/apache/el/util/MessageFactory.java tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/ELParser.java tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/JspDocumentParser.java tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/JspUtil.java tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/Node.java tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/PageInfo.java tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/Parser.java tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/Validator.java tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/resources/LocalStrings.properties tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/runtime/JspContextWrapper.java tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/runtime/JspFactoryImpl.java tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/runtime/PageContextImpl.java tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/runtime/ProtectedFunctionMapper.java Modified: tomcat/jasper/tc6.0.x/src/share/org/apache/el/lang/ExpressionBuilder.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/org/apache/el/lang/ExpressionBuilder.java?rev=379417&r1=379416&r2=379417&view=diff == --- tomcat/jasper/tc6.0.x/src/share/org/apache/el/lang/ExpressionBuilder.java (original) +++ tomcat/jasper/tc6.0.x/src/share/org/apache/el/lang/ExpressionBuilder.java Tue Feb 21 02:57:35 2006 @@ -133,7 +133,11 @@ } private void prepare(Node node) throws ELException { - node.accept(this); +try { +node.accept(this); +} catch (Exception e) { +throw (ELException) e; +} if (this.fnMapper instanceof FunctionMapperFactory) { this.fnMapper = ((FunctionMapperFactory) this.fnMapper).create(); } Modified: tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/Node.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/Node.java?rev=379417&r1=379416&r2=379417&view=diff == --- tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/Node.java (original) +++ tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/Node.java Tue Feb 21 02:57:35 2006 @@ -64,7 +64,7 @@ public void setValue(EvaluationContext ctx, Object value) throws ELException; public Class getType(EvaluationContext ctx) throws ELException; public boolean isReadOnly(EvaluationContext ctx) throws ELException; - public void accept(NodeVisitor visitor) throws ELException; + public void accept(NodeVisitor visitor) throws Exception; public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes) throws ELException; public Object invoke(EvaluationContext ctx, Class[] paramTypes, Object[] paramValues) throws ELException; } Modified: tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/NodeVisitor.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/NodeVisitor.java?rev=379417&r1=379416&r2=379417&view=diff == --- tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/NodeVisitor.java (original) +++ tomcat/jasper/tc6.0.x/src/share/org/apache/el/parser/NodeVisitor.java Tue Feb 21 02:57:35 2006 @@ -15,12 +15,10 @@ */ package org.apache.el.parser; -import javax.el.ELException; - /** * @author Jacob Hookom [EMAIL PROTECTED] * @version $Change: 181177
svn commit: r379417 [6/7] - in /tomcat/jasper/tc6.0.x/src/share/org/apache: el/lang/ el/parser/ el/util/ jasper/compiler/ jasper/el/ jasper/resources/ jasper/runtime/
Added: tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/el/ELContextImpl.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/el/ELContextImpl.java?rev=379417&view=auto == --- tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/el/ELContextImpl.java (added) +++ tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/el/ELContextImpl.java Tue Feb 21 02:57:35 2006 @@ -0,0 +1,62 @@ +/* + * Copyright 1999,2004 The Apache Software Foundation. + * + * Licensed 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.jasper.el; + +import javax.el.ELContext; +import javax.el.ELResolver; +import javax.el.FunctionMapper; +import javax.el.VariableMapper; + +/** + * Implementation of ELContext + * + * @author Jacob Hookom + */ +public class ELContextImpl extends ELContext { + + private final ELResolver resolver; + private FunctionMapper functionMapper; + private VariableMapper variableMapper; + +public ELContextImpl() { +this(ELResolverImpl.DefaultResolver); +} + + public ELContextImpl(ELResolver resolver) { + this.resolver = resolver; + } + + public ELResolver getELResolver() { + return this.resolver; + } + + public FunctionMapper getFunctionMapper() { + return this.functionMapper; + } + + public VariableMapper getVariableMapper() { + return this.variableMapper; + } + + public void setFunctionMapper(FunctionMapper functionMapper) { + this.functionMapper = functionMapper; + } + + public void setVariableMapper(VariableMapper variableMapper) { + this.variableMapper = variableMapper; + } + +} Added: tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/el/ELResolverImpl.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/el/ELResolverImpl.java?rev=379417&view=auto == --- tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/el/ELResolverImpl.java (added) +++ tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/el/ELResolverImpl.java Tue Feb 21 02:57:35 2006 @@ -0,0 +1,129 @@ +package org.apache.jasper.el; + +import java.util.Iterator; + +import javax.el.ArrayELResolver; +import javax.el.BeanELResolver; +import javax.el.CompositeELResolver; +import javax.el.ELContext; +import javax.el.ELException; +import javax.el.ELResolver; +import javax.el.ListELResolver; +import javax.el.MapELResolver; +import javax.el.PropertyNotFoundException; +import javax.el.PropertyNotWritableException; +import javax.el.ResourceBundleELResolver; +import javax.servlet.jsp.el.VariableResolver; + +public class ELResolverImpl extends ELResolver { + + public final static ELResolver DefaultResolver = new CompositeELResolver(); + + static { + ((CompositeELResolver) DefaultResolver).add(new MapELResolver()); + ((CompositeELResolver) DefaultResolver).add(new ResourceBundleELResolver()); + ((CompositeELResolver) DefaultResolver).add(new ListELResolver()); + ((CompositeELResolver) DefaultResolver).add(new ArrayELResolver()); + ((CompositeELResolver) DefaultResolver).add(new BeanELResolver()); + } + + private final VariableResolver variableResolver; + + public ELResolverImpl(VariableResolver variableResolver) { + this.variableResolver = variableResolver; + } + + public Object getValue(ELContext context, Object base, Object property) + throws NullPointerException, PropertyNotFoundException, ELException { + if (context == null) { + throw new NullPointerException(); + } + + if (base == null) { + context.setPropertyResolved(true); + if (property != null) { + try { + return this.variableResolver.resolveVariable(property + .toString()); + } catch (javax.servlet.jsp.el.ELException e) { + throw new ELException(e.getMessage(), e.getCause()); + }
svn commit: r379427 - /tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
Author: remm Date: Tue Feb 21 03:28:12 2006 New Revision: 379427 URL: http://svn.apache.org/viewcvs?rev=379427&view=rev Log: - Fix imports. - 38726: Remove duplicate request group field. Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java?rev=379427&r1=379426&r2=379427&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java Tue Feb 21 03:28:12 2006 @@ -16,34 +16,12 @@ package org.apache.coyote.http11; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.InetAddress; -import java.net.Socket; -import java.net.URLEncoder; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.Iterator; - import javax.management.MBeanRegistration; import javax.management.MBeanServer; import javax.management.ObjectName; import org.apache.commons.modeler.Registry; -import org.apache.coyote.ActionCode; -import org.apache.coyote.ActionHook; -import org.apache.coyote.Adapter; -import org.apache.coyote.ProtocolHandler; -import org.apache.coyote.RequestGroupInfo; import org.apache.coyote.RequestInfo; -import org.apache.tomcat.util.net.PoolTcpEndpoint; -import org.apache.tomcat.util.net.SSLImplementation; -import org.apache.tomcat.util.net.SSLSupport; -import org.apache.tomcat.util.net.ServerSocketFactory; -import org.apache.tomcat.util.net.TcpConnection; -import org.apache.tomcat.util.net.TcpConnectionHandler; -import org.apache.tomcat.util.res.StringManager; import org.apache.tomcat.util.threads.ThreadPool; import org.apache.tomcat.util.threads.ThreadWithAttributes; @@ -139,7 +117,6 @@ static class JmxHttp11ConnectionHandler extends Http11ConnectionHandler { Http11Protocol proto; static int count=0; -RequestGroupInfo global=new RequestGroupInfo(); JmxHttp11ConnectionHandler( Http11Protocol proto ) { super(proto); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r379463 - /tomcat/container/tc5.5.x/webapps/docs/changelog.xml
Author: remm Date: Tue Feb 21 06:41:00 2006 New Revision: 379463 URL: http://svn.apache.org/viewcvs?rev=379463&view=rev Log: - Changelog update. Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=379463&r1=379462&r2=379463&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Tue Feb 21 06:41:00 2006 @@ -44,15 +44,41 @@ is doen by the regular deployer. (remm) - Add JMX serverInfo attribute to Server MBean, that we can identify - the tomcat release remotely. (pero) +Add JMX serverInfo attribute to Server MBean, that we can identify +the tomcat release remotely. (pero) - Fix the JMX MBeanFactory.createStandardHost signature at mbean-descriptors.xml (pero) +Fix the JMX MBeanFactory.createStandardHost signature at mbean-descriptors.xml (pero) - Fix some cases (for example with realm usage) where the container logger for a context - would be retrieved using the wrong classloader (remm) +Fix some cases (for example with realm usage) where the container logger for a context +would be retrieved using the wrong classloader (remm) + + +HttpSession.getId will no longer throw an ISE when the session is invalid (remm) + + + ore detailed errors for naming issues (remm) + + +Add documentation for the Transaction element (remm) + + +Add getContextPath to the internal servlet context implementation (remm) + + +Only null instances loaded by the webapp CL, submitted by Matt Jensen (remm) + + +Deploy folders which don't have a WEB-INF, and return an error when a context +file does not contain a Context element (remm) + + +38653: Fix property name (remm) + + +Slightly modify the timing of the manager start, so that it is not started by a + listener (remm) @@ -72,6 +98,23 @@ Pass along more of the SSL related fields to OpenSSL (remm) + +CharChunk now implements CharSequence (remm) + + +Fix coding error which could cause a rare crash when a poller error occurred and sockets +where pending being added to the keepalive poller (remm) + + +Fix potential sync issues when restarting a poller (remm) + + +Update APR error reports, including the error codes (remm) + + +38726: Remove duplicate request group field causing blank statistics for the + HTTP connector (remm) + @@ -106,6 +149,9 @@ Fix some XSS issues in the JSP examples. (markt) + + +Fix logos in the manager webapp (remm) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r379499 [5/5] - in /tomcat/jasper/tc6.0.x/src: etc/ etc/dtd/ share/javax/servlet/ share/javax/servlet/jsp/ share/javax/servlet/jsp/el/ share/javax/servlet/jsp/tagext/ share/javax/servlet/j
Added: tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/tagext/TagLibraryInfo.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/tagext/TagLibraryInfo.java?rev=379499&view=auto == --- tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/tagext/TagLibraryInfo.java (added) +++ tomcat/jasper/tc6.0.x/src/share/javax/servlet/jsp/tagext/TagLibraryInfo.java Tue Feb 21 07:46:36 2006 @@ -0,0 +1,286 @@ +/* +* Copyright 2004 The Apache Software Foundation +* +* Licensed 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 javax.servlet.jsp.tagext; + +import javax.servlet.jsp.tagext.TagInfo; +import javax.servlet.jsp.tagext.TagFileInfo; + +/** + * Translation-time information associated with a taglib directive, and its + * underlying TLD file. + * + * Most of the information is directly from the TLD, except for + * the prefix and the uri values used in the taglib directive + * + * + */ + +abstract public class TagLibraryInfo { + +/** + * Constructor. + * + * This will invoke the constructors for TagInfo, and TagAttributeInfo + * after parsing the TLD file. + * + * @param prefix the prefix actually used by the taglib directive + * @param uri the URI actually used by the taglib directive + */ +protected TagLibraryInfo(String prefix, String uri) { + this.prefix = prefix; + this.uri= uri; +} + +// methods accessing taglib information === + +/** + * The value of the uri attribute from the taglib directive for + * this library. + * + * @return the value of the uri attribute + */ + +public String getURI() { +return uri; +} + +/** + * The prefix assigned to this taglib from the taglib directive + * + * @return the prefix assigned to this taglib from the taglib directive + */ + +public String getPrefixString() { + return prefix; +} + +// methods using the TLD data === + +/** + * The preferred short name (prefix) as indicated in the TLD. + * This may be used by authoring tools as the preferred prefix + * to use when creating an taglib directive for this library. + * + * @return the preferred short name for the library + */ +public String getShortName() { +return shortname; +} + +/** + * The "reliable" URN indicated in the TLD (the uri element). + * This may be used by authoring tools as a global identifier + * to use when creating a taglib directive for this library. + * + * @return a reliable URN to a TLD like this + */ +public String getReliableURN() { +return urn; +} + + +/** + * Information (documentation) for this TLD. + * + * @return the info string for this tag lib + */ + +public String getInfoString() { +return info; +} + + +/** + * A string describing the required version of the JSP container. + * + * @return the (minimal) required version of the JSP container. + * @see javax.servlet.jsp.JspEngineInfo + */ + +public String getRequiredVersion() { +return jspversion; +} + + +/** + * An array describing the tags that are defined in this tag library. + * + * @return the TagInfo objects corresponding to the tags defined by this + * tag library, or a zero length array if this tag library + * defines no tags + */ +public TagInfo[] getTags() { +return tags; +} + +/** + * An array describing the tag files that are defined in this tag library. + * + * @return the TagFileInfo objects corresponding to the tag files defined + * by this tag library, or a zero length array if this + * tag library defines no tags files + * @since 2.0 + */ +public TagFileInfo[] getTagFiles() { +return tagFiles; +} + + +/** + * Get the TagInfo for a given tag name, looking through all the + * tags in this tag library. + * + * @param shortname The short name (no prefix) of the tag + * @return the TagInfo for the tag with the specified short name, or + * null if no such tag is found + */ + +public TagInfo getTag(String shortname) { +TagInfo tags[] = getTags(); + +if (tags == null || tags.length == 0) { +return null; +
svn commit: r379500 - in /tomcat/jasper/tc6.0.x: build.properties.sample build.xml
Author: remm Date: Tue Feb 21 07:50:10 2006 New Revision: 379500 URL: http://svn.apache.org/viewcvs?rev=379500&view=rev Log: - Fix build script according to recent changes. Modified: tomcat/jasper/tc6.0.x/build.properties.sample tomcat/jasper/tc6.0.x/build.xml Modified: tomcat/jasper/tc6.0.x/build.properties.sample URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/build.properties.sample?rev=379500&r1=379499&r2=379500&view=diff == --- tomcat/jasper/tc6.0.x/build.properties.sample (original) +++ tomcat/jasper/tc6.0.x/build.properties.sample Tue Feb 21 07:50:10 2006 @@ -17,13 +17,6 @@ #base.path=C:/path/to/the/repository #base.path=/usr/local -# - Pointer to Catalina - -catalina.home=../../jakarta-tomcat-5/build - -# - Pointer to JSP Standard Tag Library distribution - -#standard.home=${base.path}/jakarta-taglibs/standard -#jsp20el.jar=${standard.home}/../dist/jsp20el/jsp20el.jar - compile.source=1.5 # - Servlet API v2.4 - @@ -31,23 +24,12 @@ servlet-api.lib=${servlet-api.home}/lib servlet-api.jar=${servlet-api.lib}/servlet-api.jar -# - JSP API v2.0 - -jsp-api.home=${base.path}/jsp-api-2.0 -jsp-api.lib=${jsp-api.home}/lib -jsp-api.jar=${jsp-api.lib}/jsp-api.jar - # - Commons Logging, version 1.0.1 or later - commons-logging.home=${base.path}/commons-logging-1.0.4 commons-logging.lib=${commons-logging.home} commons-logging-api.jar=${commons-logging.lib}/commons-logging-api.jar commons-logging.jar=${commons-logging.lib}/commons-logging.jar commons-logging.loc=${base-jakarta.loc}/commons/logging/binaries/commons-logging-1.0.4.tar.gz - -# - Commons Expression Language (EL), version 1.0 or later - -commons-el.home=${base.path}/commons-el-1.0 -commons-el.lib=${commons-el.home} -commons-el.jar=${commons-el.lib}/commons-el.jar -commons-el.loc=${base-jakarta.loc}/commons/el/binaries/commons-el-1.0.tar.gz # - Eclipse JDT, version 3.1.1 or later - jdt.home=${base.path}/eclipse/plugins Modified: tomcat/jasper/tc6.0.x/build.xml URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/build.xml?rev=379500&r1=379499&r2=379500&view=diff == --- tomcat/jasper/tc6.0.x/build.xml (original) +++ tomcat/jasper/tc6.0.x/build.xml Tue Feb 21 07:50:10 2006 @@ -1,4 +1,4 @@ - + @@ -8,19 +8,14 @@ - - - - - - + @@ -28,10 +23,8 @@ - - @@ -39,8 +32,6 @@ - - @@ -55,42 +46,17 @@ - - - - - - - - - - - - - - - - - - - - - - - + @@ -105,8 +71,6 @@ - - @@ -116,6 +80,7 @@ + + @@ -167,6 +133,23 @@ + + + + + + + + + + + + + + + + + @@ -279,7 +262,6 @@ - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r379613 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java
Author: remm Date: Tue Feb 21 15:02:25 2006 New Revision: 379613 URL: http://svn.apache.org/viewcvs?rev=379613&view=rev Log: - Woops, use getCluster. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java?rev=379613&r1=379612&r2=379613&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java Tue Feb 21 15:02:25 2006 @@ -4119,9 +4119,9 @@ // Configure default manager if none was specified if (manager == null) { -if ((cluster != null) && distributable) { +if ((getCluster() != null) && distributable) { try { -setManager(cluster.createManager(getName())); +setManager(getCluster().createManager(getName())); } catch (Exception ex) { log.error("standardContext.clusterFail", ex); ok = false; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r379614 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
Author: remm Date: Tue Feb 21 15:02:57 2006 New Revision: 379614 URL: http://svn.apache.org/viewcvs?rev=379614&view=rev Log: - Imports. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java?rev=379614&r1=379613&r2=379614&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java Tue Feb 21 15:02:57 2006 @@ -24,8 +24,8 @@ import java.io.IOException; import java.io.InputStream; import java.net.URL; -import java.util.Properties; import java.util.Map; +import java.util.Properties; import javax.servlet.ServletContext; @@ -50,7 +50,6 @@ import org.apache.catalina.deploy.FilterMap; import org.apache.catalina.deploy.LoginConfig; import org.apache.catalina.deploy.SecurityConstraint; -import org.apache.catalina.session.StandardManager; import org.apache.catalina.util.StringManager; import org.apache.tomcat.util.digester.Digester; import org.apache.tomcat.util.digester.RuleSet; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r380645 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/digester/Digester.java
Author: remm Date: Fri Feb 24 03:37:46 2006 New Revision: 380645 URL: http://svn.apache.org/viewcvs?rev=380645&view=rev Log: - Refresh loggers being used, to make sure the current webapp logger is used. Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/digester/Digester.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/digester/Digester.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/digester/Digester.java?rev=380645&r1=380644&r2=380645&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/digester/Digester.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/digester/Digester.java Fri Feb 24 03:37:46 2006 @@ -2338,7 +2338,10 @@ params.clear(); publicId = null; stack.clear(); - +log = null; +saxLog = null; +configured = false; + } @@ -2550,6 +2553,9 @@ if (configured) { return; } + +log = LogFactory.getLog("org.apache.commons.digester.Digester"); +saxLog = LogFactory.getLog("org.apache.commons.digester.Digester.sax"); // Perform lazy configuration as needed initialize(); // call hook method for subclasses that want to be initialized once only - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r380673 - /tomcat/build/tc5.5.x/build.properties.default
Author: remm Date: Fri Feb 24 06:11:27 2006 New Revision: 380673 URL: http://svn.apache.org/viewcvs?rev=380673&view=rev Log: - Update to JDT 3.1.2. Modified: tomcat/build/tc5.5.x/build.properties.default Modified: tomcat/build/tc5.5.x/build.properties.default URL: http://svn.apache.org/viewcvs/tomcat/build/tc5.5.x/build.properties.default?rev=380673&r1=380672&r2=380673&view=diff == --- tomcat/build/tc5.5.x/build.properties.default (original) +++ tomcat/build/tc5.5.x/build.properties.default Fri Feb 24 06:11:27 2006 @@ -134,11 +134,11 @@ xerces.loc=${base-xml.loc}/xerces-j/binaries/Xerces-J-bin.2.7.1.tar.gz -# - Eclipse JDT, version 3.1.1 or later - +# - Eclipse JDT, version 3.1.2 or later - jdt.home=${base.path}/eclipse/plugins jdt.lib=${jdt.home} -jdt.jar=${jdt.lib}/org.eclipse.jdt.core_3.1.1.jar -jdt.loc=http://sunsite.informatik.rwth-aachen.de/eclipse/downloads/drops/R-3.1.1-200509290840/eclipse-JDT-3.1.1.zip +jdt.jar=${jdt.lib}/org.eclipse.jdt.core_3.1.2.jar +jdt.loc=http://sunsite.informatik.rwth-aachen.de/eclipse/downloads/drops/R-3.1.2-200601181600/eclipse-JDT-3.1.2.zip # - Tomcat native library - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r381341 - /tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JDTCompiler.java
Author: remm Date: Mon Feb 27 06:10:39 2006 New Revision: 381341 URL: http://svn.apache.org/viewcvs?rev=381341&view=rev Log: - 38776: Fix source file attribute. - Submitted by Olivier Thomann. Modified: tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JDTCompiler.java Modified: tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JDTCompiler.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JDTCompiler.java?rev=381341&r1=381340&r2=381341&view=diff == --- tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JDTCompiler.java (original) +++ tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JDTCompiler.java Mon Feb 27 06:10:39 2006 @@ -93,7 +93,7 @@ } public char[] getFileName() { -return className.toCharArray(); +return sourceFile.toCharArray(); } public char[] getContents() { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r381342 - /tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/JDTCompiler.java
Author: remm Date: Mon Feb 27 06:15:09 2006 New Revision: 381342 URL: http://svn.apache.org/viewcvs?rev=381342&view=rev Log: - 38776: Fix source file attribute. - Submitted by Olivier Thomann. Modified: tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/JDTCompiler.java Modified: tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/JDTCompiler.java URL: http://svn.apache.org/viewcvs/tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/JDTCompiler.java?rev=381342&r1=381341&r2=381342&view=diff == --- tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/JDTCompiler.java (original) +++ tomcat/jasper/tc6.0.x/src/share/org/apache/jasper/compiler/JDTCompiler.java Mon Feb 27 06:15:09 2006 @@ -93,7 +93,7 @@ } public char[] getFileName() { -return className.toCharArray(); +return sourceFile.toCharArray(); } public char[] getContents() { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r381396 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: remm Date: Mon Feb 27 09:50:22 2006 New Revision: 381396 URL: http://svn.apache.org/viewcvs?rev=381396&view=rev Log: - Use the right error field. Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=381396&r1=381395&r2=381396&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Mon Feb 27 09:50:22 2006 @@ -1083,7 +1083,7 @@ if (errn > Status.APR_OS_START_USERERR) { errn -= Status.APR_OS_START_USERERR; } -log.error(sm.getString("endpoint.poll.fail", "" + (-rv), Error.strerror(-rv))); +log.error(sm.getString("endpoint.poll.fail", "" + errn, Error.strerror(errn))); // Handle poll critical failure synchronized (this) { destroy(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r381691 - /tomcat/container/tc5.5.x/webapps/docs/changelog.xml
Author: remm Date: Tue Feb 28 08:25:07 2006 New Revision: 381691 URL: http://svn.apache.org/viewcvs?rev=381691&view=rev Log: -Changelog update. Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=381691&r1=381690&r2=381691&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Tue Feb 28 08:25:07 2006 @@ -23,6 +23,9 @@ Required tcnative library version upgraded to 1.1.2 (remm) + +Update to Eclipse JDT 3.1.2 (remm) + @@ -80,6 +83,9 @@ Slightly modify the timing of the manager start, so that it is not started by a listener (remm) + +Refresh loggers used by the digester (remm) + @@ -115,6 +121,10 @@ 38726: Remove duplicate request group field causing blank statistics for the HTTP connector (remm) + +Fix invalid length used by some AJP packets for the AJP APR connector, which could cause +corruption, submitted by Rudiger Plum (jim) + @@ -126,6 +136,9 @@ Add some useful hints to jasper-howto. (pero). + +38776: Fix source file attribute, submitted by Olivier Thomann (remm) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r383163 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java
Author: remm Date: Sat Mar 4 10:13:32 2006 New Revision: 383163 URL: http://svn.apache.org/viewcvs?rev=383163&view=rev Log: - With the pending tag, revert patch right away. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java?rev=383163&r1=383162&r2=383163&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/session/StandardSession.java Sat Mar 4 10:13:32 2006 @@ -421,6 +421,12 @@ * a value associated with the session, do not affect the access time. */ public long getLastAccessedTime() { + +if ( !isValid() ) { +throw new IllegalStateException +(sm.getString("standardSession.getId.ise")); +} + return (this.lastAccessedTime); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r386120 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: remm Date: Wed Mar 15 09:29:02 2006 New Revision: 386120 URL: http://svn.apache.org/viewcvs?rev=386120&view=rev Log: - As suggested by Peter, move getWorkerThread inside the try (an OOM could occur). This isn't going to help the server much, though. Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=386120&r1=386119&r2=386120&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Mar 15 09:29:02 2006 @@ -900,11 +900,10 @@ } } -// Allocate a new worker thread -Worker workerThread = getWorkerThread(); - -// Accept the next incoming connection from the server socket try { +// Allocate a new worker thread +Worker workerThread = getWorkerThread(); +// Accept the next incoming connection from the server socket long socket = Socket.accept(serverSock); // Hand this socket off to an appropriate processor if (setSocketOptions(socket)) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r386331 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java
Author: remm Date: Thu Mar 16 06:03:12 2006 New Revision: 386331 URL: http://svn.apache.org/viewcvs?rev=386331&view=rev Log: - 38795: Associate more closely bind with a finally unbind. - Based on a patch submitted by Darryl Miles. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java?rev=386331&r1=386330&r2=386331&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java Thu Mar 16 06:03:12 2006 @@ -4059,18 +4059,19 @@ } } -// Binding thread -ClassLoader oldCCL = bindThread(); - // Standard container startup if (log.isDebugEnabled()) log.debug("Processing standard container startup"); -if (ok) { +// Binding thread +ClassLoader oldCCL = bindThread(); -boolean mainOk = false; -try { +boolean mainOk = false; +try { + +if (ok) { + started = true; // Start our subordinate components, if any @@ -4141,17 +4142,18 @@ mainOk = true; -} finally { -// Unbinding thread -unbindThread(oldCCL); -if (!mainOk) { -// An exception occurred -// Register with JMX anyway, to allow management -registerJMX(); -} } +} finally { +// Unbinding thread +unbindThread(oldCCL); +if (!mainOk) { +// An exception occurred +// Register with JMX anyway, to allow management +registerJMX(); +} } + if (!getConfigured()) { log.error( "Error getConfigured"); ok = false; @@ -4168,38 +4170,42 @@ // Binding thread oldCCL = bindThread(); -// Create context attributes that will be required -if (ok) { -postWelcomeFiles(); -} - -if (ok) { -// Notify our interested LifecycleListeners -lifecycle.fireLifecycleEvent(AFTER_START_EVENT, null); -} - -// Configure and call application event listeners and filters -if (ok) { -if (!listenerStart()) { -log.error( "Error listenerStart"); -ok = false; +try { + +// Create context attributes that will be required +if (ok) { +postWelcomeFiles(); } -} -if (ok) { -if (!filterStart()) { -log.error( "Error filterStart"); -ok = false; + +if (ok) { +// Notify our interested LifecycleListeners +lifecycle.fireLifecycleEvent(AFTER_START_EVENT, null); } + +// Configure and call application event listeners and filters +if (ok) { +if (!listenerStart()) { +log.error( "Error listenerStart"); +ok = false; +} +} +if (ok) { +if (!filterStart()) { +log.error( "Error filterStart"); +ok = false; +} +} + +// Load and initialize all "load on startup" servlets +if (ok) { +loadOnStartup(findChildren()); +} + +} finally { +// Unbinding thread +unbindThread(oldCCL); } -// Load and initialize all "load on startup" servlets -if (ok) { -loadOnStartup(findChildren()); -} - -// Unbinding thread -unbindThread(oldCCL); - // Set available status depending upon startup success if (ok) { if (log.isDebugEnabled()) @@ -4324,30 +4330,30 @@ // Binding thread ClassLoader oldCCL = bindThread(); -// Stop our filters -filterStop(); +try { -// Stop our application listeners -listenerStop(); +// Stop our filters +filterStop(); -// Stop ContainerBackgroundProcessor thread -super.threadStop(); +// Stop our application listeners +listenerStop(); -if
svn commit: r386336 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup: HostConfig.java LocalStrings.properties
Author: remm Date: Thu Mar 16 06:13:00 2006 New Revision: 386336 URL: http://svn.apache.org/viewcvs?rev=386336&view=rev Log: - Wrap remove inside a try/catch, to prevent recurrent undeploy failures. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java?rev=386336&r1=386335&r2=386336&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java Thu Mar 16 06:13:00 2006 @@ -975,12 +975,17 @@ if (log.isInfoEnabled()) log.info(sm.getString("hostConfig.undeploy", app.name)); ContainerBase context = (ContainerBase) host.findChild(app.name); -host.removeChild(context); +try { +host.removeChild(context); +} catch (Throwable t) { +log.warn(sm.getString + ("hostConfig.context.remove", app.name), t); +} try { context.destroy(); -} catch (Exception e) { +} catch (Throwable t) { log.warn(sm.getString - ("hostConfig.context.destroy", app.name), e); + ("hostConfig.context.destroy", app.name), t); } // Delete other redeploy resources for (int j = i + 1; j < resources.length; j++) { @@ -1010,12 +1015,17 @@ if (log.isInfoEnabled()) log.info(sm.getString("hostConfig.undeploy", app.name)); ContainerBase context = (ContainerBase) host.findChild(app.name); -host.removeChild(context); +try { +host.removeChild(context); +} catch (Throwable t) { +log.warn(sm.getString + ("hostConfig.context.remove", app.name), t); +} try { context.destroy(); -} catch (Exception e) { +} catch (Throwable t) { log.warn(sm.getString - ("hostConfig.context.destroy", app.name), e); + ("hostConfig.context.destroy", app.name), t); } // Delete all redeploy resources for (int j = i + 1; j < resources.length; j++) { @@ -1150,7 +1160,12 @@ DeployedApplication[] apps = (DeployedApplication[]) deployed.values().toArray(new DeployedApplication[0]); for (int i = 0; i < apps.length; i++) { -host.removeChild(host.findChild(apps[i].name)); +try { +host.removeChild(host.findChild(apps[i].name)); +} catch (Throwable t) { +log.warn(sm.getString +("hostConfig.context.remove", apps[i].name), t); +} } deployed.clear(); Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties?rev=386336&r1=386335&r2=386336&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties Thu Mar 16 06:13:00 2006 @@ -43,6 +43,7 @@ hostConfig.canonicalizing=Error delete redeploy resources from context [{0}] hostConfig.cce=Lifecycle event data object {0} is not a Host hostConfig.context.destroy=Error during context [{0}] destroy +hostConfig.context.remove=Error while removing context [{0}] hostConfig.context.restart=Error during context [{0}] restart hostConfig.deploy=Deploying web application directory {0} hostConfig.deployDescriptor=Deploying configuration descriptor {0} - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r386390 - /tomcat/build/tc5.5.x/build.properties.default
Author: remm Date: Thu Mar 16 09:22:38 2006 New Revision: 386390 URL: http://svn.apache.org/viewcvs?rev=386390&view=rev Log: - Update to Xerces 2.8. Modified: tomcat/build/tc5.5.x/build.properties.default Modified: tomcat/build/tc5.5.x/build.properties.default URL: http://svn.apache.org/viewcvs/tomcat/build/tc5.5.x/build.properties.default?rev=386390&r1=386389&r2=386390&view=diff == --- tomcat/build/tc5.5.x/build.properties.default (original) +++ tomcat/build/tc5.5.x/build.properties.default Thu Mar 16 09:22:38 2006 @@ -126,12 +126,12 @@ commons-modeler.jar=${commons-modeler.lib}/commons-modeler.jar commons-modeler.loc=${base-jakarta.loc}/commons/modeler/binaries/modeler-1.1.tar.gz -# - Xerces XML Parser, version 2.7.1 - -xerces.home=${base.path}/xerces-2_7_1 +# - Xerces XML Parser, version 2.8.0 - +xerces.home=${base.path}/xerces-2_8_0 xerces.lib=${xerces.home} xercesImpl.jar=${xerces.lib}/xercesImpl.jar xml-apis.jar=${xerces.lib}/xml-apis.jar -xerces.loc=${base-xml.loc}/xerces-j/binaries/Xerces-J-bin.2.7.1.tar.gz +xerces.loc=${base-xml.loc}/xerces-j/binaries/Xerces-J-bin.2.8.0.tar.gz # - Eclipse JDT, version 3.1.2 or later - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r386404 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/SemaphoreValve.java
Author: remm Date: Thu Mar 16 09:50:37 2006 New Revision: 386404 URL: http://svn.apache.org/viewcvs?rev=386404&view=rev Log: - Expand a bit the semaphore valve. Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/SemaphoreValve.java Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/SemaphoreValve.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/SemaphoreValve.java?rev=386404&r1=386403&r2=386404&view=diff == --- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/SemaphoreValve.java (original) +++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/SemaphoreValve.java Thu Mar 16 09:50:37 2006 @@ -101,6 +101,22 @@ public void setFairness(boolean fairness) { this.fairness = fairness; } +/** + * Block until a permit is available. + */ +protected boolean block = true; +public boolean getBlock() { return block; } +public void setBlock(boolean block) { this.block = block; } + + +/** + * Block interruptibly until a permit is available. + */ +protected boolean interruptible = false; +public boolean getInterruptible() { return interruptible; } +public void setInterruptible(boolean interruptible) { this.interruptible = interruptible; } + + // -- Lifecycle Methods @@ -206,15 +222,55 @@ public void invoke(Request request, Response response) throws IOException, ServletException { -try { -semaphore.acquireUninterruptibly(); -// Perform the request +if (controlConcurrency(request, response)) { +boolean shouldRelease = true; +try { +if (block) { +if (interruptible) { +try { +semaphore.acquire(); +} catch (InterruptedException e) { +shouldRelease = false; +permitDenied(request, response); +return; +} +} else { +semaphore.acquireUninterruptibly(); +} +} else { +if (!semaphore.tryAcquire()) { +shouldRelease = false; +permitDenied(request, response); +return; +} +} +getNext().invoke(request, response); +} finally { +if (shouldRelease) { +semaphore.release(); +} +} +} else { getNext().invoke(request, response); -} finally { -semaphore.release(); } } + +/** + * Subclass friendly method to add conditions. + */ +public boolean controlConcurrency(Request request, Response response) { +return true; +} + + +/** + * Subclass friendly method to add error handling when a permit isn't granted. + */ +public void permitDenied(Request request, Response response) +throws IOException, ServletException { +} + } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r387554 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: remm Date: Tue Mar 21 07:49:50 2006 New Revision: 387554 URL: http://svn.apache.org/viewcvs?rev=387554&view=rev Log: - Apparently some OSes can also use EINTR as a semi normal result. - Harmonize sendfile poller handling. Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=387554&r1=387553&r2=387554&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Tue Mar 21 07:49:50 2006 @@ -1076,9 +1076,9 @@ getWorkerThread().assign(desc[n*2+1]); } } else if (rv < 0) { -/* Any non timeup error is critical */ -if (-rv != Status.TIMEUP) { -int errn = -rv; +int errn = -rv; +/* Any non timeup or interrupted error is critical */ +if ((errn != Status.TIMEUP) && (errn != Status.EINTR)) { if (errn > Status.APR_OS_START_USERERR) { errn -= Status.APR_OS_START_USERERR; } @@ -1088,6 +1088,7 @@ destroy(); init(); } +continue; } } if (soTimeout > 0 && maintainTime > 100L) { @@ -1470,16 +1471,19 @@ } } } else if (rv < 0) { -/* Any non timeup error is critical */ -if (-rv == Status.TIMEUP) -rv = 0; -else { -log.error(sm.getString("endpoint.poll.fail", "" + (-rv), Error.strerror(-rv))); +int errn = -rv; +/* Any non timeup or interrupted error is critical */ +if ((errn != Status.TIMEUP) && (errn != Status.EINTR)) { +if (errn > Status.APR_OS_START_USERERR) { +errn -= Status.APR_OS_START_USERERR; +} +log.error(sm.getString("endpoint.poll.fail", "" + errn, Error.strerror(errn))); // Handle poll critical failure synchronized (this) { destroy(); init(); } +continue; } } /* TODO: See if we need to call the maintain for sendfile poller */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r387572 - /tomcat/container/tc5.5.x/webapps/docs/changelog.xml
Author: remm Date: Tue Mar 21 08:21:02 2006 New Revision: 387572 URL: http://svn.apache.org/viewcvs?rev=387572&view=rev Log: - Changelog update. Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=387572&r1=387571&r2=387572&view=diff == --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Tue Mar 21 08:21:02 2006 @@ -15,6 +15,13 @@ + + + +Update to Xerces 2.8.0 (remm) + + + @@ -32,6 +39,16 @@ 38761: Handle relative symlinks to shell scripts as suggested by Adam Murray (keith) + +38795: Associate more closely bind with a finally unbind in StandardContext start and +stop, based on a patch by Darryl Miles (remm) + + +Improve undeployment robustness (remm) + + +Expand the semaphore valve (remm) + @@ -41,6 +58,14 @@ suites enabled by default rather than the set of all cipher suites. This prevents ciphers suites that do not provide confidentiality protection and/or server authentication being used by default. (markt) + + +Move AprEndpoint.getWorkerThread inside the try/catch for the main accept loop, to guard +about an OOM (which would most likely doom the server anyway) (remm) + + +As exhibited in the ASF's JIRA installation, it seems EINTR is a status code that should +be ignored as a result to a poll call (remm) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r387832 - in /tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11: Http11AprProtocol.java Http11BaseProtocol.java
Author: remm Date: Wed Mar 22 03:20:25 2006 New Revision: 387832 URL: http://svn.apache.org/viewcvs?rev=387832&view=rev Log: - Modify the read default to 8KB (thanks IE). Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=387832&r1=387831&r2=387832&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java Wed Mar 22 03:20:25 2006 @@ -192,7 +192,7 @@ private int maxKeepAliveRequests=100; // as in Apache HTTPD server private int timeout = 30; // 5 minutes as in Apache HTTPD server private int maxSavePostSize = 4 * 1024; -private int maxHttpHeaderSize = 4 * 1024; +private int maxHttpHeaderSize = 8 * 1024; private int socketCloseDelay=-1; private boolean disableUploadTimeout = true; private int socketBuffer = 9000; Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java?rev=387832&r1=387831&r2=387832&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java Wed Mar 22 03:20:25 2006 @@ -199,7 +199,7 @@ private int maxKeepAliveRequests=100; // as in Apache HTTPD server private int timeout = 30; // 5 minutes as in Apache HTTPD server private int maxSavePostSize = 4 * 1024; -private int maxHttpHeaderSize = 4 * 1024; +private int maxHttpHeaderSize = 8 * 1024; private String reportedname; private int socketCloseDelay=-1; private boolean disableUploadTimeout = true; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r387833 - /tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/Constants.java
Author: remm Date: Wed Mar 22 03:21:43 2006 New Revision: 387833 URL: http://svn.apache.org/viewcvs?rev=387833&view=rev Log: - Unless I missed something, I think it's better to use -1 here rather than 0. Modified: tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/Constants.java Modified: tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/Constants.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/Constants.java?rev=387833&r1=387832&r2=387833&view=diff == --- tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/Constants.java (original) +++ tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/Constants.java Wed Mar 22 03:21:43 2006 @@ -36,7 +36,7 @@ public static final String Package = "org.apache.coyote.ajp"; public static final int DEFAULT_CONNECTION_LINGER = -1; -public static final int DEFAULT_CONNECTION_TIMEOUT = 0; +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; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r387838 - in /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net: AprEndpoint.java res/LocalStrings.properties
Author: remm Date: Wed Mar 22 03:30:42 2006 New Revision: 387838 URL: http://svn.apache.org/viewcvs?rev=387838&view=rev Log: - New defaults, which should be more production friendly. - New (cleaner) way of allocating pollers (note: the 62 size is there because it was an older Win32 limitation in APR). Normally, APR right now limits to 1024 on Windows. Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/res/LocalStrings.properties Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=387838&r1=387837&r2=387838&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Mar 22 03:30:42 2006 @@ -181,7 +181,7 @@ /** * Maximum amount of worker threads. */ -protected int maxThreads = 60; +protected int maxThreads = 40; public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; } public int getMaxThreads() { return maxThreads; } @@ -197,7 +197,7 @@ /** * Size of the socket poller. */ -protected int pollerSize = 768; +protected int pollerSize = 16 * 1024; public void setPollerSize(int pollerSize) { this.pollerSize = pollerSize; } public int getPollerSize() { return pollerSize; } @@ -205,7 +205,7 @@ /** * Size of the sendfile (= concurrent files which can be served). */ -protected int sendfileSize = 256; +protected int sendfileSize = 1 * 1024; public void setSendfileSize(int sendfileSize) { this.sendfileSize = sendfileSize; } public int getSendfileSize() { return sendfileSize; } @@ -280,7 +280,7 @@ * Poll interval, in microseconds. The smaller the value, the more CPU the poller * will use, but the more responsive to activity it will be. */ -protected int pollTime = 5000; +protected int pollTime = 2000; public int getPollTime() { return pollTime; } public void setPollTime(int pollTime) { this.pollTime = pollTime; } @@ -627,15 +627,15 @@ // Start acceptor thread acceptorThread = new Thread(new Acceptor(), getName() + "-Acceptor"); -acceptorThread.setPriority(getThreadPriority()); -acceptorThread.setDaemon(true); +acceptorThread.setPriority(threadPriority); +acceptorThread.setDaemon(daemon); acceptorThread.start(); // Start poller thread poller = new Poller(); poller.init(); pollerThread = new Thread(poller, getName() + "-Poller"); -pollerThread.setPriority(getThreadPriority()); +pollerThread.setPriority(threadPriority); pollerThread.setDaemon(true); pollerThread.start(); @@ -644,7 +644,7 @@ sendfile = new Sendfile(); sendfile.init(); sendfileThread = new Thread(sendfile, getName() + "-Sendfile"); -sendfileThread.setPriority(getThreadPriority()); +sendfileThread.setPriority(threadPriority); sendfileThread.setDaemon(true); sendfileThread.start(); } @@ -872,6 +872,25 @@ } } + +/** + * Allocate a new poller of the specified size. + */ +protected long allocatePoller(int size, long pool, int timeout) { +try { +return Poll.create(size, pool, 0, timeout * 1000); +} catch (Error e) { +if (Status.APR_STATUS_IS_EINVAL(e.getError())) { +log.info(sm.getString("endpoint.poll.limitedpollsize", "" + size)); +return 0; +} else { +log.error(sm.getString("endpoint.poll.initfail"), e); +return -1; +} +} +} + + // --- Acceptor Inner Class @@ -946,21 +965,12 @@ */ protected void init() { pool = Pool.create(serverSockPool); -try { -serverPollset = Poll.create(pollerSize, pool, 0, soTimeout * 1000); -} catch (Error e) { -if (Status.APR_STATUS_IS_EINVAL(e.getError())) { -try { -// Use WIN32 maximum poll size -pollerSize = 62; -serverPollset = Poll.create(pollerSize, pool, 0, soTimeout * 1000); - log.warn(sm.getString("endpoint.poll.limitedpollsize")); -
svn commit: r387887 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: remm Date: Wed Mar 22 08:36:13 2006 New Revision: 387887 URL: http://svn.apache.org/viewcvs?rev=387887&view=rev Log: - Woops, fix sizes being used. Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=387887&r1=387886&r2=387887&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Mar 22 08:36:13 2006 @@ -965,16 +965,19 @@ */ protected void init() { pool = Pool.create(serverSockPool); -serverPollset = allocatePoller(pollerSize, pool, soTimeout); -if (serverPollset == 0 && pollerSize > 1024) { -serverPollset = allocatePoller(1024, pool, soTimeout); +int size = pollerSize; +serverPollset = allocatePoller(size, pool, soTimeout); +if (serverPollset == 0 && size > 1024) { +size = 1024; +serverPollset = allocatePoller(size, pool, soTimeout); } if (serverPollset == 0) { -serverPollset = allocatePoller(62, pool, soTimeout); +size = 62; +serverPollset = allocatePoller(size, pool, soTimeout); } -desc = new long[pollerSize * 2]; +desc = new long[size * 2]; keepAliveCount = 0; -addS = new long[pollerSize]; +addS = new long[size]; addCount = 0; } @@ -1275,15 +1278,18 @@ */ protected void init() { pool = Pool.create(serverSockPool); +int size = sendfileSize; sendfilePollset = allocatePoller(sendfileSize, pool, soTimeout); -if (sendfilePollset == 0 && pollerSize > 1024) { -sendfilePollset = allocatePoller(1024, pool, soTimeout); +if (sendfilePollset == 0 && size > 1024) { +size = 1024; +sendfilePollset = allocatePoller(size, pool, soTimeout); } if (sendfilePollset == 0) { -sendfilePollset = allocatePoller(62, pool, soTimeout); +size = 62; +sendfilePollset = allocatePoller(size, pool, soTimeout); } -desc = new long[sendfileSize * 2]; -sendfileData = new HashMap(sendfileSize); +desc = new long[size * 2]; +sendfileData = new HashMap(size); addS = new ArrayList(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r388137 - in /tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11: Http11AprProcessor.java InternalAprInputBuffer.java
Author: remm Date: Thu Mar 23 02:54:30 2006 New Revision: 388137 URL: http://svn.apache.org/viewcvs?rev=388137&view=rev Log: - Add some new fisrtReadTimeout modes (mostly for Mladen's testing): - 0: poller will be used for all keepalives (this one was the behavior if fisrtReadTimeout <= 0), and all the initial reads will have a short timeout - -1: poller will be used for all keepalives, but all reads will use the regular socket timeout - < -1: all reads will use the regular socket timeout; the mode becomes equivalent to -1 as soon as more than maxThreads/2 are used Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=388137&r1=388136&r2=388137&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java Thu Mar 23 02:54:30 2006 @@ -86,8 +86,10 @@ request = new Request(); int readTimeout = endpoint.getFirstReadTimeout(); -if (readTimeout <= 0) { +if (readTimeout == 0) { readTimeout = 100; +} else if (readTimeout < 0) { +readTimeout = -1; } inputBuffer = new InternalAprInputBuffer(request, headerBufferSize, readTimeout); @@ -763,7 +765,7 @@ long soTimeout = endpoint.getSoTimeout(); int limit = 0; -if (endpoint.getFirstReadTimeout() > 0) { +if (endpoint.getFirstReadTimeout() > 0 || endpoint.getFirstReadTimeout() < -1) { limit = endpoint.getMaxThreads() / 2; } Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=388137&r1=388136&r2=388137&view=diff == --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original) +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/InternalAprInputBuffer.java Thu Mar 23 02:54:30 2006 @@ -73,7 +73,11 @@ parsingHeader = true; swallowInput = true; -this.readTimeout = readTimeout * 1000; +if (readTimeout < 0) { +this.readTimeout = -1; +} else { +this.readTimeout = readTimeout * 1000; +} } @@ -404,19 +408,24 @@ if (useAvailableData) { return false; } -// Do a simple read with a short timeout -bbuf.clear(); -int nRead = Socket.recvbbt -(socket, 0, buf.length - lastValid, readTimeout); -if (nRead > 0) { -bbuf.limit(nRead); -bbuf.get(buf, pos, nRead); -lastValid = pos + nRead; +if (readTimeout == -1) { +if (!fill()) +throw new EOFException(sm.getString("iib.eof.error")); } else { -if ((-nRead) == Status.ETIMEDOUT || (-nRead) == Status.TIMEUP) { -return false; +// Do a simple read with a short timeout +bbuf.clear(); +int nRead = Socket.recvbbt +(socket, 0, buf.length - lastValid, readTimeout); +if (nRead > 0) { +bbuf.limit(nRead); +bbuf.get(buf, pos, nRead); +lastValid = pos + nRead; } else { -throw new IOException(sm.getString("iib.failedread")); +if ((-nRead) == Status.ETIMEDOUT || (-nRead) == Status.TIMEUP) { +return false; +} else { +throw new IOException(sm.getString("iib.failedread")); +} } } } @@ -434,19 +443,24 @@ if (useAvailableData) { return false; } -// Do a simple read with a short timeout -bbuf.clear(); -int nRead = Socket.recvbbt -(socket, 0, buf.leng
svn commit: r388500 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: remm Date: Fri Mar 24 04:37:27 2006 New Revision: 388500 URL: http://svn.apache.org/viewcvs?rev=388500&view=rev Log: - As suggested by Peter, replace the (synced) Stack with a specialized unsynced stack. Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=388500&r1=388499&r2=388500&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Fri Mar 24 04:37:27 2006 @@ -19,7 +19,6 @@ import java.net.InetAddress; import java.util.ArrayList; import java.util.HashMap; -import java.util.Stack; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -109,10 +108,9 @@ /** - * Available processors. + * Available workers. */ -// FIXME: Stack is synced, which makes it a non optimal choice -protected Stack workers = new Stack(); +protected WorkerStack workers = null; /** @@ -510,7 +508,7 @@ if (initialized) return; - + // Create the root APR memory pool rootPool = Pool.create(0); // Create the pool for the server socket @@ -625,6 +623,9 @@ running = true; paused = false; +// Create worker collection +workers = new WorkerStack(maxThreads); + // Start acceptor thread acceptorThread = new Thread(new Acceptor(), getName() + "-Acceptor"); acceptorThread.setPriority(threadPriority); @@ -808,7 +809,7 @@ synchronized (workers) { if (workers.size() > 0) { curThreadsBusy++; -return ((Worker) workers.pop()); +return (workers.pop()); } if ((maxThreads > 0) && (curThreads < maxThreads)) { curThreadsBusy++; @@ -1516,5 +1517,60 @@ public boolean process(long socket); } + +// - WorkerStack Inner Class + + +public class WorkerStack { + +protected Worker[] workers = null; +protected int end = 0; + +public WorkerStack(int size) { +workers = new Worker[size]; +} + +/** + * Put the object into the queue. + * + * @param object the object to be appended to the queue (first element). + */ +public void push(Worker worker) { +workers[end++] = worker; +} + +/** + * Get the first object out of the queue. Return null if the queue + * is empty. + */ +public Worker pop() { +if (end > 0) { +return workers[--end]; +} +return null; +} + +/** + * Get the first object out of the queue, Return null if the queue + * is empty. + */ +public Worker peek() { +return workers[end]; +} + +/** + * Is the queue empty? + */ +public boolean isEmpty() { +return (end == 0); +} + +/** + * How many elements are there in this queue? + */ +public int size() { +return (end); +} +} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r388594 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: remm Date: Fri Mar 24 10:15:16 2006 New Revision: 388594 URL: http://svn.apache.org/viewcvs?rev=388594&view=rev Log: - Add many threading options, the most useful being multiple pollers for Win (after testing, it's really not possible to have large pollers and reasonable performance). Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=388594&r1=388593&r2=388594&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Fri Mar 24 10:15:16 2006 @@ -92,19 +92,19 @@ /** * The acceptor thread. */ -protected Thread acceptorThread = null; +//protected Thread[] acceptorThreads = null; /** * The socket poller thread. */ -protected Thread pollerThread = null; +//protected Thread[] pollerThreads = null; /** * The sendfile thread. */ -protected Thread sendfileThread = null; +//protected Thread[] sendfileThreads = null; /** @@ -195,7 +195,7 @@ /** * Size of the socket poller. */ -protected int pollerSize = 16 * 1024; +protected int pollerSize = 8 * 1024; public void setPollerSize(int pollerSize) { this.pollerSize = pollerSize; } public int getPollerSize() { return pollerSize; } @@ -269,7 +269,7 @@ /** * Timeout on first request read before going to the poller, in ms. */ -protected int firstReadTimeout = 100; +protected int firstReadTimeout = -1; public int getFirstReadTimeout() { return firstReadTimeout; } public void setFirstReadTimeout(int firstReadTimeout) { this.firstReadTimeout = firstReadTimeout; } @@ -310,31 +310,49 @@ /** - * Number of keepalive sockets. + * Acceptor thread count. */ -protected int keepAliveCount = 0; -public int getKeepAliveCount() { return keepAliveCount; } +protected int acceptorThreadCount = 0; +public void setAcceptorThreadCount(int acceptorThreadCount) { this.acceptorThreadCount = acceptorThreadCount; } +public int getAcceptorThreadCount() { return acceptorThreadCount; } /** - * Number of sendfile sockets. + * Sendfile thread count. + */ +protected int sendfileThreadCount = 0; +public void setSendfileThreadCount(int sendfileThreadCount) { this.sendfileThreadCount = sendfileThreadCount; } +public int getSendfileThreadCount() { return sendfileThreadCount; } + + +/** + * Poller thread count. */ -protected int sendfileCount = 0; -public int getSendfileCount() { return sendfileCount; } +protected int pollerThreadCount = 0; +public void setPollerThreadCount(int pollerThreadCount) { this.pollerThreadCount = pollerThreadCount; } +public int getPollerThreadCount() { return pollerThreadCount; } /** * The socket poller. */ -protected Poller poller = null; -public Poller getPoller() { return poller; } +protected Poller[] pollers = null; +protected int pollerRoundRobin = 0; +public Poller getPoller() { +pollerRoundRobin = (pollerRoundRobin + 1) % pollers.length; +return pollers[pollerRoundRobin]; +} /** * The static file sender. */ -protected Sendfile sendfile = null; -public Sendfile getSendfile() { return sendfile; } +protected Sendfile[] sendfiles = null; +protected int sendfileRoundRobin = 0; +public Sendfile getSendfile() { +sendfileRoundRobin = (sendfileRoundRobin + 1) % sendfiles.length; +return sendfiles[sendfileRoundRobin]; +} /** @@ -458,6 +476,38 @@ /** + * Number of keepalive sockets. + */ +public int getKeepAliveCount() { +if (pollers == null) { +return 0; +} else { +int keepAliveCount = 0; +for (int i = 0; i < pollers.length; i++) { +keepAliveCount += pollers[i].getKeepAliveCount(); +} +return keepAliveCount; +} +} + + +/** + * Number of sendfile sockets. + */ +public int getSendfileCount() { +if (sendfiles == null) { +return 0; +} else { +int sendfileCount = 0; +for (int i = 0; i < sendfiles.length; i++) { +sendfileCount += sendfiles[i].getSendfileCount(); +} +return sendfileCount; +} +} + + +/** * Return the amount of threads that are managed by the pool. * * @return the amount of threads that are managed by
svn commit: r388679 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: remm Date: Fri Mar 24 15:59:49 2006 New Revision: 388679 URL: http://svn.apache.org/viewcvs?rev=388679&view=rev Log: - Remove commented out code. Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=388679&r1=388678&r2=388679&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Fri Mar 24 15:59:49 2006 @@ -90,24 +90,6 @@ /** - * The acceptor thread. - */ -//protected Thread[] acceptorThreads = null; - - -/** - * The socket poller thread. - */ -//protected Thread[] pollerThreads = null; - - -/** - * The sendfile thread. - */ -//protected Thread[] sendfileThreads = null; - - -/** * Available workers. */ protected WorkerStack workers = null; @@ -606,7 +588,7 @@ // Initialize thread count defaults for acceptor, poller and sendfile if (acceptorThreadCount == 0) { -// FIXME: Default to one per CPU ? +// FIXME: Doesn't seem to work that well with multiple accept threads acceptorThreadCount = 1; } if (pollerThreadCount == 0) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r388948 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: remm Date: Sun Mar 26 11:50:47 2006 New Revision: 388948 URL: http://svn.apache.org/viewcvs?rev=388948&view=rev Log: - Add a guard to pollTime. Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=388948&r1=388947&r2=388948&view=diff == --- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/net/AprEndpoint.java Sun Mar 26 11:50:47 2006 @@ -262,7 +262,7 @@ */ protected int pollTime = 2000; public int getPollTime() { return pollTime; } -public void setPollTime(int pollTime) { this.pollTime = pollTime; } +public void setPollTime(int pollTime) { if (pollTime > 0) { this.pollTime = pollTime; } } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]