org.apache.catalina.WELCOME_FILES constant (was: svn commit: r1043265)
2010/12/8 : > Author: markt > Date: Wed Dec 8 01:14:43 2010 > New Revision: 1043265 > > URL: http://svn.apache.org/viewvc?rev=1043265&view=rev > Log: > Remove unused code. > Make spacing consistent. > > Modified: > tomcat/trunk/java/org/apache/catalina/Globals.java > > Modified: tomcat/trunk/java/org/apache/catalina/Globals.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Globals.java?rev=1043265&r1=1043264&r2=1043265&view=diff > > /** > - * The servlet context attribute under which we store the class loader > - * used for loading servlets (as an object of type > java.lang.ClassLoader). > - */ > - public static final String CLASS_LOADER_ATTR = > - "org.apache.catalina.classloader"; > - OK, cannot find any use of this string. > /** > - * The servlet context attribute under which we record the set of > - * welcome files (as an object of type String[]) for this application. > - */ > - public static final String WELCOME_FILES_ATTR = > - "org.apache.catalina.WELCOME_FILES"; > - StandardContext.postWelcomeFiles() uses this name to publish welcome files "so that the default servlet can find them", but I do not see any use of this anywhere else. That is, the default servlet does not use this. I see two ways: a) remove this feature (remove setting the attribute from that StandardContext method), b) revert deletion of this constant, and use it in StandardContext. I am OK with a) Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: org.apache.catalina.WELCOME_FILES constant (was: svn commit: r1043265)
On 08/12/2010 11:05, Konstantin Kolinko wrote: > 2010/12/8 : >> Author: markt >> Date: Wed Dec 8 01:14:43 2010 >> New Revision: 1043265 >> >> URL: http://svn.apache.org/viewvc?rev=1043265&view=rev >> Log: >> Remove unused code. >> Make spacing consistent. >> >> Modified: >>tomcat/trunk/java/org/apache/catalina/Globals.java >> >> Modified: tomcat/trunk/java/org/apache/catalina/Globals.java >> URL: >> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Globals.java?rev=1043265&r1=1043264&r2=1043265&view=diff >> > >> /** >> - * The servlet context attribute under which we store the class loader >> - * used for loading servlets (as an object of type >> java.lang.ClassLoader). >> - */ >> -public static final String CLASS_LOADER_ATTR = >> -"org.apache.catalina.classloader"; >> - > > OK, cannot find any use of this string. > >> /** >> - * The servlet context attribute under which we record the set of >> - * welcome files (as an object of type String[]) for this application. >> - */ >> -public static final String WELCOME_FILES_ATTR = >> -"org.apache.catalina.WELCOME_FILES"; >> - > > StandardContext.postWelcomeFiles() uses this name to publish welcome > files "so that the default servlet can find them", but I do not see > any use of this anywhere else. That is, the default servlet does not > use this. > > I see two ways: > a) remove this feature (remove setting the attribute from that > StandardContext method), > b) revert deletion of this constant, and use it in StandardContext. > > I am OK with a) +1. I suspect that is an old way of handling welcome files. I also suspect there are lots of things like this in the code base. The more we can delete, the better. For those that are interested, I am running an unused code detector [1] over the Tomcat 7 code base and working my way through the results when I have a spare 5 mins. (I am doing something similar with FindBugs). Mark [1] http://www.ucdetector.org/ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1043364 - /tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
Author: markt Date: Wed Dec 8 11:36:49 2010 New Revision: 1043364 URL: http://svn.apache.org/viewvc?rev=1043364&view=rev Log: Remove unused welcome file handling code Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1043364&r1=1043363&r2=1043364&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Wed Dec 8 11:36:49 2010 @@ -3021,7 +3021,6 @@ public class StandardContext extends Con results[welcomeFiles.length] = name; welcomeFiles = results; } -postWelcomeFiles(); if(this.getState().equals(LifecycleState.STARTED)) fireContainerEvent(ADD_WELCOME_FILE_EVENT, name); } @@ -4115,7 +4114,6 @@ public class StandardContext extends Con } // Inform interested listeners -postWelcomeFiles(); if(this.getState().equals(LifecycleState.STARTED)) fireContainerEvent(REMOVE_WELCOME_FILE_EVENT, name); @@ -4976,10 +4974,6 @@ public class StandardContext extends Con JarScanner.class.getName(), getJarScanner()); } -if (ok) { -postWelcomeFiles(); -} - // Set up the context init params mergeParameters(); @@ -5655,17 +5649,6 @@ public class StandardContext extends Con } -/** - * Post a copy of our current list of welcome files as a servlet context - * attribute, so that the default servlet can find them. - */ -private void postWelcomeFiles() { - -getServletContext().setAttribute("org.apache.catalina.WELCOME_FILES", - welcomeFiles); - -} - public String getHostname() { Container parentHost = getParent(); if (parentHost != null) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 48973] Don't create SESSIONS.ser when no session exists
https://issues.apache.org/bugzilla/show_bug.cgi?id=48973 --- Comment #2 from Marc Guillemot 2010-12-08 06:44:40 EST --- In fact the patch was incomplete and applying it as it introduces a bug: if no session exist, no SESSIONS.ser should be created AND previous SESSIONS.ser should be deleted (if any old file exists). -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 50431] New: Creating new Files
https://issues.apache.org/bugzilla/show_bug.cgi?id=50431 Summary: Creating new Files Product: Tomcat 5 Version: Unknown Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Unknown AssignedTo: dev@tomcat.apache.org ReportedBy: mullang...@yahoo.com CC: mullang...@yahoo.com we are developing an application using struts1.3 framework. We are deploying the developed application in tomcat5.5 server. We have a page,in which there is a link to a file.when the user clicks on the link to open file,we observed that parallely this operation is creating files either in tomcat_home direcotry or in tomcat_home /bin directory. Please help us to resolve this issue. Please respond asap because this is an urgent requirement to deliver. Thanks & Regards, Ram -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 50431] Creating new Files
https://issues.apache.org/bugzilla/show_bug.cgi?id=50431 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #1 from Mark Thomas 2010-12-08 07:30:35 EST --- Bugzilla is not a support forum. Please use the users mailing list. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1043395 - in /tomcat/trunk/java/org/apache/coyote: ./ ajp/ http11/
Author: markt Date: Wed Dec 8 12:57:54 2010 New Revision: 1043395 URL: http://svn.apache.org/viewvc?rev=1043395&view=rev Log: Re-factoring in support of https://issues.apache.org/bugzilla/show_bug.cgi?id=50360 Pull up pause() and resume() methods Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java tomcat/trunk/java/org/apache/coyote/LocalStrings.properties tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings_es.properties tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_es.properties tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_fr.properties tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_ja.properties Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1043395&r1=1043394&r2=1043395&view=diff == --- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original) +++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Wed Dec 8 12:57:54 2010 @@ -342,19 +342,46 @@ public abstract class AbstractProtocolHa @Override public abstract void init() throws Exception; +@Override +public final void pause() throws Exception { +if(getLog().isInfoEnabled()) +getLog().info(sm.getString("abstractProtocolHandler.action", +"Pausing", getName())); +try { +endpoint.pause(); +} catch (Exception ex) { +getLog().error(sm.getString("abstractProtocolHandler.actionError", +"pause", getName()), ex); +throw ex; +} +} + +@Override +public final void resume() throws Exception { +if(getLog().isInfoEnabled()) +getLog().info(sm.getString("abstractProtocolHandler.action", +"Resuming", getName())); +try { +endpoint.resume(); +} catch (Exception ex) { +getLog().error(sm.getString("abstractProtocolHandler.actionError", +"resule", getName()), ex); +throw ex; +} +} + @Override public final void destroy() { if(getLog().isInfoEnabled()) { -getLog().info(sm.getString("abstractProtocolHandler.destroy", -getName())); +getLog().info(sm.getString("abstractProtocolHandler.action", +"Destroying", getName())); } try { endpoint.destroy(); } catch (Exception e) { -getLog().error(sm.getString( -"abstractProtocolHandler.endPointDestroyError", getName()), -e); +getLog().error(sm.getString("abstractProtocolHandler.actionError", +"destroy", getName()), e); } if( tpOname!=null ) Modified: tomcat/trunk/java/org/apache/coyote/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/LocalStrings.properties?rev=1043395&r1=1043394&r2=1043395&view=diff == --- tomcat/trunk/java/org/apache/coyote/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/coyote/LocalStrings.properties Wed Dec 8 12:57:54 2010 @@ -13,9 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +abstractProtocolHandler.action={0} ProtocolHandler [{1}] +abstractProtocolHandler.actionError=Failed to {0} end point associated with ProtocolHandler [{1}] abstractProtocolHandler.getAttribute=Get attribute [{0}] with value [{1}] abstractProtocolHandler.setAttribute=Set attribute [{0}] with value [{1}] -abstractProtocolHandler.endPointDestroyError=Failed to destroy end point associated with ProtocolHandler [{0}] -abstractProtocolHandler.destroy=Destroying ProtocolHandler [{0}] asyncStateMachine.invalidAsyncState=Calling [{0}] is not valid for a request with Async state [{1}] Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java?rev=1043395&r1=1043394&r2=1043395&view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Wed Dec 8 12:57:54 2010 @@ -76,33 +76,6 @@ public abstract class AbstractAjpProtoco // ---
svn commit: r1043399 - in /tomcat/trunk/java/org/apache/coyote: ./ ajp/ http11/
Author: markt Date: Wed Dec 8 13:06:46 2010 New Revision: 1043399 URL: http://svn.apache.org/viewvc?rev=1043399&view=rev Log: Re-factoring in support of https://issues.apache.org/bugzilla/show_bug.cgi?id=50360 Pull up stop() Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings_es.properties tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_es.properties tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_fr.properties tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_ja.properties Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1043399&r1=1043398&r2=1043399&view=diff == --- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original) +++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Wed Dec 8 13:06:46 2010 @@ -365,13 +365,28 @@ public abstract class AbstractProtocolHa endpoint.resume(); } catch (Exception ex) { getLog().error(sm.getString("abstractProtocolHandler.actionError", -"resule", getName()), ex); +"resume", getName()), ex); throw ex; } } @Override +public final void stop() throws Exception { +try { +endpoint.stop(); +} catch (Exception ex) { +getLog().error(sm.getString("abstractProtocolHandler.action", +"Stopping"), ex); +throw ex; +} +if(getLog().isInfoEnabled()) +getLog().info(sm.getString("abstractProtocolHandler.actionError", +"stop", getName())); +} + + +@Override public final void destroy() { if(getLog().isInfoEnabled()) { getLog().info(sm.getString("abstractProtocolHandler.action", Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java?rev=1043399&r1=1043398&r2=1043399&view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Wed Dec 8 13:06:46 2010 @@ -71,19 +71,4 @@ public abstract class AbstractAjpProtoco protected String getNamePrefix() { return ("ajp"); } - - -// --- Lifecycle methods - -@Override -public void stop() throws Exception { -try { -endpoint.stop(); -} catch (Exception ex) { -getLog().error(sm.getString("ajpprotocol.endpoint.stoperror"), ex); -throw ex; -} -if (getLog().isInfoEnabled()) -getLog().info(sm.getString("ajpprotocol.stop", getName())); -} } Modified: tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties?rev=1043399&r1=1043398&r2=1043399&view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties Wed Dec 8 13:06:46 2010 @@ -29,7 +29,6 @@ ajpprotocol.endpoint.stoperror=Error sto ajpprotocol.init=Initializing Coyote AJP/1.3 on {0} ajpprotocol.proto.error=Error reading request, ignored ajpprotocol.start=Starting Coyote AJP/1.3 on {0} -ajpprotocol.stop=Stopping Coyote AJP/1.3 on {0} ajpprotocol.failedread=Socket read failed ajpprotocol.failedwrite=Socket write failed ajpprotocol.request.register=Error registering request processor in JMX Modified: tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings_es.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings_es.properties?rev=1043399&r1=1043398&r2=1043399&view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings_es.properties (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings_es.properties Wed Dec 8 13:06:46 2010 @@ -18,7 +18,6 @@ ajpprotocol.endpoint.starterror = Error ajpprotocol.init = Inicializando Coyote AJP/1.3 en {0} ajpprotocol.proto.error = Error leyendo requerimiento, ignorado ajpprotocol.start = Arranca
svn commit: r1043402 - in /tomcat/trunk/java/org/apache/coyote: AbstractProtocolHandler.java LocalStrings.properties
Author: markt Date: Wed Dec 8 13:10:34 2010 New Revision: 1043402 URL: http://svn.apache.org/viewvc?rev=1043402&view=rev Log: Nice idea, but need i18n for the actions so each needs its own string Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java tomcat/trunk/java/org/apache/coyote/LocalStrings.properties Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1043402&r1=1043401&r2=1043402&view=diff == --- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original) +++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Wed Dec 8 13:10:34 2010 @@ -345,13 +345,13 @@ public abstract class AbstractProtocolHa @Override public final void pause() throws Exception { if(getLog().isInfoEnabled()) -getLog().info(sm.getString("abstractProtocolHandler.action", -"Pausing", getName())); +getLog().info(sm.getString("abstractProtocolHandler.pause", +getName())); try { endpoint.pause(); } catch (Exception ex) { -getLog().error(sm.getString("abstractProtocolHandler.actionError", -"pause", getName()), ex); +getLog().error(sm.getString("abstractProtocolHandler.pauseError", +getName()), ex); throw ex; } } @@ -359,13 +359,13 @@ public abstract class AbstractProtocolHa @Override public final void resume() throws Exception { if(getLog().isInfoEnabled()) -getLog().info(sm.getString("abstractProtocolHandler.action", -"Resuming", getName())); +getLog().info(sm.getString("abstractProtocolHandler.resume", +getName())); try { endpoint.resume(); } catch (Exception ex) { -getLog().error(sm.getString("abstractProtocolHandler.actionError", -"resume", getName()), ex); +getLog().error(sm.getString("abstractProtocolHandler.resumeError", +getName()), ex); throw ex; } } @@ -376,27 +376,27 @@ public abstract class AbstractProtocolHa try { endpoint.stop(); } catch (Exception ex) { -getLog().error(sm.getString("abstractProtocolHandler.action", -"Stopping"), ex); +getLog().error(sm.getString("abstractProtocolHandler.stop", +getName()), ex); throw ex; } if(getLog().isInfoEnabled()) -getLog().info(sm.getString("abstractProtocolHandler.actionError", -"stop", getName())); +getLog().info(sm.getString("abstractProtocolHandler.stopError", +getName())); } @Override public final void destroy() { if(getLog().isInfoEnabled()) { -getLog().info(sm.getString("abstractProtocolHandler.action", -"Destroying", getName())); +getLog().info(sm.getString("abstractProtocolHandler.destroy", +getName())); } try { endpoint.destroy(); } catch (Exception e) { -getLog().error(sm.getString("abstractProtocolHandler.actionError", -"destroy", getName()), e); +getLog().error(sm.getString("abstractProtocolHandler.destroyError", +getName()), e); } if( tpOname!=null ) Modified: tomcat/trunk/java/org/apache/coyote/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/LocalStrings.properties?rev=1043402&r1=1043401&r2=1043402&view=diff == --- tomcat/trunk/java/org/apache/coyote/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/coyote/LocalStrings.properties Wed Dec 8 13:10:34 2010 @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -abstractProtocolHandler.action={0} ProtocolHandler [{1}] -abstractProtocolHandler.actionError=Failed to {0} end point associated with ProtocolHandler [{1}] abstractProtocolHandler.getAttribute=Get attribute [{0}] with value [{1}] abstractProtocolHandler.setAttribute=Set attribute [{0}] with value [{1}] +abstractProtocolHandler.pause=Pausing ProtocolHandler [{0}] +abstractProtocolHandler.pauseError=Failed to pause end point associated with ProtocolHandler [{0}] +abstractProtocolHandler.resume=Resuming ProtocolHandler [{0}] +abstractProtocolHandler.resumeError=Failed to resume end point associated with ProtocolHandler [{0}] +abstractProtocolHandler.stop=Stopping ProtocolHandler [
svn commit: r1043410 - in /tomcat/trunk/java/org/apache/coyote: ajp/AjpAprProtocol.java ajp/AjpProtocol.java ajp/Constants.java http11/Http11AprProtocol.java http11/Http11NioProtocol.java http11/Http1
Author: markt Date: Wed Dec 8 13:37:11 2010 New Revision: 1043410 URL: http://svn.apache.org/viewvc?rev=1043410&view=rev Log: Re-factoring in support of https://issues.apache.org/bugzilla/show_bug.cgi?id=50360 Align the init() methods (JSSE still to go) Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/Constants.java tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java?rev=1043410&r1=1043409&r2=1043410&view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java Wed Dec 8 13:37:11 2010 @@ -66,9 +66,11 @@ public class AjpAprProtocol extends Abst public AjpAprProtocol() { endpoint = new AprEndpoint(); cHandler = new AjpConnectionHandler(this); +((AprEndpoint) endpoint).setHandler(cHandler); setSoLinger(Constants.DEFAULT_CONNECTION_LINGER); setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT); setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY); +setUseSendfile(Constants.DEFAULT_USE_SENDFILE); } @@ -89,8 +91,6 @@ public class AjpAprProtocol extends Abst @Override public void init() throws Exception { endpoint.setName(getName()); -((AprEndpoint)endpoint).setHandler(cHandler); -((AprEndpoint)endpoint).setUseSendfile(false); try { endpoint.init(); Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java?rev=1043410&r1=1043409&r2=1043410&view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java Wed Dec 8 13:37:11 2010 @@ -67,6 +67,7 @@ public class AjpProtocol extends Abstrac public AjpProtocol() { endpoint = new JIoEndpoint(); cHandler = new AjpConnectionHandler(this); +((JIoEndpoint) endpoint).setHandler(cHandler); setSoLinger(Constants.DEFAULT_CONNECTION_LINGER); setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT); setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY); @@ -90,7 +91,6 @@ public class AjpProtocol extends Abstrac @Override public void init() throws Exception { endpoint.setName(getName()); -((JIoEndpoint)endpoint).setHandler(cHandler); try { endpoint.init(); Modified: tomcat/trunk/java/org/apache/coyote/ajp/Constants.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/Constants.java?rev=1043410&r1=1043409&r2=1043410&view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/Constants.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/Constants.java Wed Dec 8 13:37:11 2010 @@ -42,6 +42,7 @@ public final class Constants { public static final int DEFAULT_CONNECTION_TIMEOUT = -1; public static final int DEFAULT_CONNECTION_UPLOAD_TIMEOUT = 30; public static final boolean DEFAULT_TCP_NO_DELAY = true; +public static final boolean DEFAULT_USE_SENDFILE = false; // Prefix codes for message types from server to container public static final byte JK_AJP13_FORWARD_REQUEST = 2; Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=1043410&r1=1043409&r2=1043410&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java Wed Dec 8 13:37:11 2010 @@ -72,6 +72,7 @@ public class Http11AprProtocol extends A public Http11AprProtocol() { endpoint = new AprEndpoint(); cHandler = new Http11ConnectionHandler(this); +((AprEndpoint) endpoint).setHandler(cHandler); setSoLinger(Constants.DEFAULT_CONNECTION_LINGER); setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT); setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY); @@ -83,7 +84,6 @@ public class Http11AprProtocol extends A @Override public void init() throws Exception { endpoint.setName(getName()); -((AprEndpoint)endpoint).setHandler(cHandler);
DO NOT REPLY [Bug 48973] Don't create SESSIONS.ser when no session exists
https://issues.apache.org/bugzilla/show_bug.cgi?id=48973 --- Comment #3 from Konstantin Kolinko 2010-12-08 08:47:30 EST --- (In reply to comment #2) AFAIK, the SESSIONS.ser file is deleted in StandardManager.doLoad() upon successful or unsuccessful attempt to read it. Do you have a scenario where a stale SESSIONS.ser file is left behind? -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1043420 - /tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java
Author: markt Date: Wed Dec 8 13:51:42 2010 New Revision: 1043420 URL: http://svn.apache.org/viewvc?rev=1043420&view=rev Log: JSSE will always be available in Tomcat 7 Modified: tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java?rev=1043420&r1=1043419&r2=1043420&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java Wed Dec 8 13:51:42 2010 @@ -32,15 +32,11 @@ import org.apache.tomcat.util.net.Server @author EKR */ -public class JSSEImplementation extends SSLImplementation -{ -static final String SSLSocketClass = "javax.net.ssl.SSLSocket"; +public class JSSEImplementation extends SSLImplementation { private JSSEFactory factory = null; -public JSSEImplementation() throws ClassNotFoundException { -// Check to see if JSSE is floating around somewhere -Class.forName(SSLSocketClass); +public JSSEImplementation() { factory = new JSSEFactory(); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1043421 - /tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java
Author: markt Date: Wed Dec 8 13:52:06 2010 New Revision: 1043421 URL: http://svn.apache.org/viewvc?rev=1043421&view=rev Log: Fix indents Modified: tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java?rev=1043421&r1=1043420&r2=1043421&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java Wed Dec 8 13:52:06 2010 @@ -43,7 +43,7 @@ public class JSSEImplementation extends @Override public String getImplementationName(){ - return "JSSE"; +return "JSSE"; } @Override - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 48973] Don't create SESSIONS.ser when no session exists
https://issues.apache.org/bugzilla/show_bug.cgi?id=48973 --- Comment #4 from Marc Guillemot 2010-12-08 08:57:37 EST --- (In reply to comment #3) I hadn't checked doLoad(). I was only thinking that not writing a file with 0 sessions could have a consequence. I think that you're right and that no problem should occur. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1043420 - /tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java
On 8 December 2010 13:51, wrote: > Author: markt > Date: Wed Dec 8 13:51:42 2010 > New Revision: 1043420 > > URL: http://svn.apache.org/viewvc?rev=1043420&view=rev > Log: > JSSE will always be available in Tomcat 7 > > Modified: > tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java > > Modified: > tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java?rev=1043420&r1=1043419&r2=1043420&view=diff > == > --- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java > (original) > +++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java > Wed Dec 8 13:51:42 2010 > @@ -32,15 +32,11 @@ import org.apache.tomcat.util.net.Server > �...@author EKR > */ > > -public class JSSEImplementation extends SSLImplementation > -{ > - static final String SSLSocketClass = "javax.net.ssl.SSLSocket"; > +public class JSSEImplementation extends SSLImplementation { > > private JSSEFactory factory = null; The factory field could now be made final. > - public JSSEImplementation() throws ClassNotFoundException { > - // Check to see if JSSE is floating around somewhere > - Class.forName(SSLSocketClass); > + public JSSEImplementation() { > factory = new JSSEFactory(); > } > > > > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1043425 - /tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java
Author: markt Date: Wed Dec 8 14:09:26 2010 New Revision: 1043425 URL: http://svn.apache.org/viewvc?rev=1043425&view=rev Log: Align BIO+JSSE with NIO+JSSE Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java?rev=1043425&r1=1043424&r2=1043425&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java Wed Dec 8 14:09:26 2010 @@ -20,7 +20,6 @@ package org.apache.coyote.http11; import java.net.Socket; import java.security.AccessController; import java.security.PrivilegedAction; -import java.util.Iterator; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.atomic.AtomicInteger; @@ -36,10 +35,9 @@ import org.apache.tomcat.util.modeler.Re import org.apache.tomcat.util.net.AbstractEndpoint; import org.apache.tomcat.util.net.JIoEndpoint; import org.apache.tomcat.util.net.JIoEndpoint.Handler; -import org.apache.tomcat.util.net.SSLImplementation; -import org.apache.tomcat.util.net.ServerSocketFactory; import org.apache.tomcat.util.net.SocketStatus; import org.apache.tomcat.util.net.SocketWrapper; +import org.apache.tomcat.util.net.jsse.JSSEImplementation; /** @@ -85,43 +83,15 @@ public class Http11Protocol extends Abst protected Http11ConnectionHandler cHandler; -protected ServerSocketFactory socketFactory = null; - - // - ProtocolHandler Implementation @Override public void init() throws Exception { endpoint.setName(getName()); -// Verify the validity of the configured socket factory -try { -if (isSSLEnabled()) { -sslImplementation = -SSLImplementation.getInstance(sslImplementationName); -socketFactory = sslImplementation.getServerSocketFactory(); -((JIoEndpoint)endpoint).setServerSocketFactory(socketFactory); -} else if (socketFactoryName != null) { -socketFactory = (ServerSocketFactory) Class.forName(socketFactoryName).newInstance(); -((JIoEndpoint)endpoint).setServerSocketFactory(socketFactory); -} -} catch (Exception ex) { -log.error(sm.getString("http11protocol.socketfactory.initerror"), - ex); -throw ex; -} - -if (socketFactory!=null) { -Iterator attE = attributes.keySet().iterator(); -while( attE.hasNext() ) { -String key = attE.next(); -Object v=attributes.get(key); -socketFactory.setAttribute(key, v); -} -} - try { endpoint.init(); +sslImplementation = new JSSEImplementation(); } catch (Exception ex) { log.error(sm.getString("http11protocol.endpoint.initerror"), ex); throw ex; @@ -159,25 +129,6 @@ public class Http11Protocol extends Abst } -// - Properties - -/** - * Name of the socket factory. - */ -protected String socketFactoryName = null; -public String getSocketFactory() { return socketFactoryName; } -public void setSocketFactory(String valueS) { socketFactoryName = valueS; } - -/** - * Name of the SSL implementation. - */ -protected String sslImplementationName=null; -public String getSSLImplementation() { return sslImplementationName; } -public void setSSLImplementation( String valueS) { -sslImplementationName = valueS; -setSecure(true); -} - // --- Http11ConnectionHandler Inner Class protected static class Http11ConnectionHandler implements Handler { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1043429 - in /tomcat/trunk/java/org/apache/coyote: ./ ajp/ http11/
Author: markt Date: Wed Dec 8 14:19:23 2010 New Revision: 1043429 URL: http://svn.apache.org/viewvc?rev=1043429&view=rev Log: Re-factoring in support of https://issues.apache.org/bugzilla/show_bug.cgi?id=50360 Pull up init() Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java tomcat/trunk/java/org/apache/coyote/LocalStrings.properties tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings_es.properties tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11JsseProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_es.properties tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_fr.properties tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_ja.properties Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1043429&r1=1043428&r2=1043429&view=diff == --- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original) +++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Wed Dec 8 14:19:23 2010 @@ -337,13 +337,32 @@ public abstract class AbstractProtocolHa // --- Lifecycle methods -// TODO Keep current state and check for invalid transitions +/* + * NOTE: There is no maintenance of state or checking for valid transitions + * within this class. It is expected that the connector will maintain state + * and prevent invalid state transitions. + */ @Override -public abstract void init() throws Exception; +public void init() throws Exception { +if (getLog().isInfoEnabled()) +getLog().info(sm.getString("abstractProtocolHandler.init", +getName())); + +endpoint.setName(getName()); + +try { +endpoint.init(); +} catch (Exception ex) { +getLog().error(sm.getString("abstractProtocolHandler.initError", +getName()), ex); +throw ex; +} +} + @Override -public final void pause() throws Exception { +public void pause() throws Exception { if(getLog().isInfoEnabled()) getLog().info(sm.getString("abstractProtocolHandler.pause", getName())); @@ -357,7 +376,7 @@ public abstract class AbstractProtocolHa } @Override -public final void resume() throws Exception { +public void resume() throws Exception { if(getLog().isInfoEnabled()) getLog().info(sm.getString("abstractProtocolHandler.resume", getName())); @@ -372,7 +391,7 @@ public abstract class AbstractProtocolHa @Override -public final void stop() throws Exception { +public void stop() throws Exception { try { endpoint.stop(); } catch (Exception ex) { @@ -387,7 +406,7 @@ public abstract class AbstractProtocolHa @Override -public final void destroy() { +public void destroy() { if(getLog().isInfoEnabled()) { getLog().info(sm.getString("abstractProtocolHandler.destroy", getName())); Modified: tomcat/trunk/java/org/apache/coyote/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/LocalStrings.properties?rev=1043429&r1=1043428&r2=1043429&view=diff == --- tomcat/trunk/java/org/apache/coyote/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/coyote/LocalStrings.properties Wed Dec 8 14:19:23 2010 @@ -15,6 +15,8 @@ abstractProtocolHandler.getAttribute=Get attribute [{0}] with value [{1}] abstractProtocolHandler.setAttribute=Set attribute [{0}] with value [{1}] +abstractProtocolHandler.pause=Initializing ProtocolHandler [{0}] +abstractProtocolHandler.pauseError=Failed to initialize end point associated with ProtocolHandler [{0}] abstractProtocolHandler.pause=Pausing ProtocolHandler [{0}] abstractProtocolHandler.pauseError=Failed to pause end point associated with ProtocolHandler [{0}] abstractProtocolHandler.resume=Resuming ProtocolHandler [{0}] Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java?rev=1043429&r1=104
svn commit: r1043433 - /tomcat/trunk/java/org/apache/coyote/LocalStrings.properties
Author: markt Date: Wed Dec 8 14:33:51 2010 New Revision: 1043433 URL: http://svn.apache.org/viewvc?rev=1043433&view=rev Log: Fix copy/paste error Modified: tomcat/trunk/java/org/apache/coyote/LocalStrings.properties Modified: tomcat/trunk/java/org/apache/coyote/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/LocalStrings.properties?rev=1043433&r1=1043432&r2=1043433&view=diff == --- tomcat/trunk/java/org/apache/coyote/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/coyote/LocalStrings.properties Wed Dec 8 14:33:51 2010 @@ -15,8 +15,8 @@ abstractProtocolHandler.getAttribute=Get attribute [{0}] with value [{1}] abstractProtocolHandler.setAttribute=Set attribute [{0}] with value [{1}] -abstractProtocolHandler.pause=Initializing ProtocolHandler [{0}] -abstractProtocolHandler.pauseError=Failed to initialize end point associated with ProtocolHandler [{0}] +abstractProtocolHandler.init=Initializing ProtocolHandler [{0}] +abstractProtocolHandler.initError=Failed to initialize end point associated with ProtocolHandler [{0}] abstractProtocolHandler.pause=Pausing ProtocolHandler [{0}] abstractProtocolHandler.pauseError=Failed to pause end point associated with ProtocolHandler [{0}] abstractProtocolHandler.resume=Resuming ProtocolHandler [{0}] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1043437 - in /tomcat/trunk/java/org/apache/coyote: AbstractProtocolHandler.java LocalStrings.properties ajp/AjpAprProtocol.java ajp/AjpProtocol.java http11/Http11AprProtocol.java http11/H
Author: markt Date: Wed Dec 8 14:36:26 2010 New Revision: 1043437 URL: http://svn.apache.org/viewvc?rev=1043437&view=rev Log: Re-factoring in support of https://issues.apache.org/bugzilla/show_bug.cgi?id=50360 Move MBean registration from start() to init(). More MBean refactoring expected Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java tomcat/trunk/java/org/apache/coyote/LocalStrings.properties tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1043437&r1=1043436&r2=1043437&view=diff == --- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original) +++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Wed Dec 8 14:36:26 2010 @@ -349,6 +349,23 @@ public abstract class AbstractProtocolHa getLog().info(sm.getString("abstractProtocolHandler.init", getName())); +if (this.domain != null) { +try { +tpOname = new ObjectName(domain + ":" + +"type=ThreadPool,name=" + getName()); +Registry.getRegistry(null, null).registerComponent(endpoint, +tpOname, null); +} catch (Exception e) { +getLog().error(sm.getString( +"abstractProtocolHandler.mbeanRegistrationFailed", +tpOname, getName()), e); +} +rgOname=new ObjectName(domain + +":type=GlobalRequestProcessor,name=" + getName()); +Registry.getRegistry(null, null).registerComponent(getHandler(), +rgOname, null ); +} + endpoint.setName(getName()); try { @@ -418,9 +435,9 @@ public abstract class AbstractProtocolHa getName()), e); } -if( tpOname!=null ) +if (tpOname != null) Registry.getRegistry(null, null).unregisterComponent(tpOname); -if( rgOname != null ) +if (rgOname != null) Registry.getRegistry(null, null).unregisterComponent(rgOname); } } Modified: tomcat/trunk/java/org/apache/coyote/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/LocalStrings.properties?rev=1043437&r1=1043436&r2=1043437&view=diff == --- tomcat/trunk/java/org/apache/coyote/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/coyote/LocalStrings.properties Wed Dec 8 14:36:26 2010 @@ -17,6 +17,7 @@ abstractProtocolHandler.getAttribute=Get abstractProtocolHandler.setAttribute=Set attribute [{0}] with value [{1}] abstractProtocolHandler.init=Initializing ProtocolHandler [{0}] abstractProtocolHandler.initError=Failed to initialize end point associated with ProtocolHandler [{0}] +abstractProtocolHandler.mbeanRegistrationFailed=Failed to register MBean [{0}] for ProtocolHandler [{1}] abstractProtocolHandler.pause=Pausing ProtocolHandler [{0}] abstractProtocolHandler.pauseError=Failed to pause end point associated with ProtocolHandler [{0}] abstractProtocolHandler.resume=Resuming ProtocolHandler [{0}] Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java?rev=1043437&r1=1043436&r2=1043437&view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java Wed Dec 8 14:36:26 2010 @@ -88,21 +88,6 @@ public class AjpAprProtocol extends Abst @Override public void start() throws Exception { -if (this.domain != null ) { -try { -tpOname = new ObjectName -(domain + ":" + "type=ThreadPool,name=" + getName()); -Registry.getRegistry(null, null) -.registerComponent(endpoint, tpOname, null ); -} catch (Exception e) { -log.error("Can't register threadpool" ); -} -rgOname = new ObjectName -(domain + ":type=GlobalRequestProcessor,name=" + getName()); -Registry.getRegistry(null, null).registerComponent -(cHandler.global, rgOname, null); -} - try { endpoint.start(); }
svn commit: r1043441 - in /tomcat/trunk/java/org/apache/coyote: AbstractProtocolHandler.java LocalStrings.properties ajp/AjpAprProtocol.java ajp/AjpProtocol.java http11/Http11AprProtocol.java http11/H
Author: markt Date: Wed Dec 8 14:51:10 2010 New Revision: 1043441 URL: http://svn.apache.org/viewvc?rev=1043441&view=rev Log: Re-factoring in support of https://issues.apache.org/bugzilla/show_bug.cgi?id=50360 Pull up start() Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java tomcat/trunk/java/org/apache/coyote/LocalStrings.properties tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1043441&r1=1043440&r2=1043441&view=diff == --- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original) +++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Wed Dec 8 14:51:10 2010 @@ -379,6 +379,21 @@ public abstract class AbstractProtocolHa @Override +public void start() throws Exception { +if (getLog().isInfoEnabled()) +getLog().info(sm.getString("abstractProtocolHandler.start", +getName())); +try { +endpoint.start(); +} catch (Exception ex) { +getLog().error(sm.getString("abstractProtocolHandler.startError", +getName()), ex); +throw ex; +} +} + + +@Override public void pause() throws Exception { if(getLog().isInfoEnabled()) getLog().info(sm.getString("abstractProtocolHandler.pause", Modified: tomcat/trunk/java/org/apache/coyote/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/LocalStrings.properties?rev=1043441&r1=1043440&r2=1043441&view=diff == --- tomcat/trunk/java/org/apache/coyote/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/coyote/LocalStrings.properties Wed Dec 8 14:51:10 2010 @@ -18,6 +18,8 @@ abstractProtocolHandler.setAttribute=Set abstractProtocolHandler.init=Initializing ProtocolHandler [{0}] abstractProtocolHandler.initError=Failed to initialize end point associated with ProtocolHandler [{0}] abstractProtocolHandler.mbeanRegistrationFailed=Failed to register MBean [{0}] for ProtocolHandler [{1}] +abstractProtocolHandler.start=Starting ProtocolHandler [{0}] +abstractProtocolHandler.startError=Failed to start end point associated with ProtocolHandler [{0}] abstractProtocolHandler.pause=Pausing ProtocolHandler [{0}] abstractProtocolHandler.pauseError=Failed to pause end point associated with ProtocolHandler [{0}] abstractProtocolHandler.resume=Resuming ProtocolHandler [{0}] Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java?rev=1043441&r1=1043440&r2=1043441&view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java Wed Dec 8 14:51:10 2010 @@ -86,19 +86,6 @@ public class AjpAprProtocol extends Abst // - Public Methods -@Override -public void start() throws Exception { -try { -endpoint.start(); -} catch (Exception ex) { -log.error(sm.getString("ajpprotocol.endpoint.starterror"), ex); -throw ex; -} -if (log.isInfoEnabled()) -log.info(sm.getString("ajpprotocol.start", getName())); -} - - public boolean getUseSendfile() { return endpoint.getUseSendfile(); } public void setUseSendfile(@SuppressWarnings("unused") boolean useSendfile) { /* No sendfile for AJP */ Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java?rev=1043441&r1=1043440&r2=1043441&view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java Wed Dec 8 14:51:10 2010 @@ -83,22 +83,6 @@ public class AjpProtocol extends Abstrac private AjpConnectionHandler cHandler; -// - Public Methods - - -@Override -public void start() throws Exception { -try { -endpoint.start(); -} catch (Exception ex) { -log.error(sm.ge
svn commit: r1043444 - in /tomcat/trunk/java/org/apache/coyote/ajp: AbstractAjpProcessor.java AjpMessage.java Constants.java
Author: markt Date: Wed Dec 8 15:07:20 2010 New Revision: 1043444 URL: http://svn.apache.org/viewvc?rev=1043444&view=rev Log: Remove some unused code Fix some FindBugs niggles Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java tomcat/trunk/java/org/apache/coyote/ajp/AjpMessage.java tomcat/trunk/java/org/apache/coyote/ajp/Constants.java Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1043444&r1=1043443&r2=1043444&view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Wed Dec 8 15:07:20 2010 @@ -571,7 +571,7 @@ public abstract class AbstractAjpProcess case Constants.SC_A_SSL_KEY_SIZE : request.setAttribute(AbstractEndpoint.KEY_SIZE_KEY, -new Integer(requestHeaderMessage.getInt())); + Integer.valueOf(requestHeaderMessage.getInt())); break; case Constants.SC_A_STORED_METHOD: Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpMessage.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpMessage.java?rev=1043444&r1=1043443&r2=1043444&view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/AjpMessage.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AjpMessage.java Wed Dec 8 15:07:20 2010 @@ -147,17 +147,6 @@ public class AjpMessage { /** - * Append an int (4 bytes) to the message. - */ -public void appendLongInt(int val) { -buf[pos++] = (byte) ((val >>> 24) & 0xFF); -buf[pos++] = (byte) ((val >>> 16) & 0xFF); -buf[pos++] = (byte) ((val >>> 8) & 0xFF); -buf[pos++] = (byte) (val & 0xFF); -} - - -/** * Write a MessageBytes out at the current write position. * A null MessageBytes is encoded as a string with length 0. */ @@ -318,12 +307,6 @@ public class AjpMessage { } -public byte peekByte() { -byte res = buf[pos]; -return res; -} - - public void getBytes(MessageBytes mb) { int length = getInt(); if ((length == 0x) || (length == -1)) { @@ -338,31 +321,6 @@ public class AjpMessage { /** - * Copy a chunk of bytes from the packet into an array and advance - * the read position past the chunk. See appendBytes() for details - * on the encoding. - * - * @return The number of bytes copied. - */ -public int getBytes(byte[] dest) { -int length = getInt(); -if (pos + length > buf.length) { -log.error(sm.getString("ajpmessage.read", "" + length)); -return 0; -} - -if ((length == 0x) || (length == -1)) { -return 0; -} - -System.arraycopy(buf, pos, dest, 0, length); -pos += length; -pos++; // Skip terminating \0 -return length; -} - - -/** * Read a 32 bits integer from packet, and advance the read position past * it. Integers are encoded as four unsigned bytes with the * high-order byte first, and, as far as I can tell, in @@ -444,7 +402,7 @@ public class AjpMessage { sb.append(" | "); for (int i = start; i < start + 16 && i < len + 4; i++) { if (!Character.isISOControl((char) buf[i])) { -sb.append(new Character((char) buf[i])); +sb.append(Character.valueOf((char) buf[i])); } else { sb.append("."); } Modified: tomcat/trunk/java/org/apache/coyote/ajp/Constants.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/Constants.java?rev=1043444&r1=1043443&r2=1043444&view=diff == --- tomcat/trunk/java/org/apache/coyote/ajp/Constants.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/Constants.java Wed Dec 8 15:07:20 2010 @@ -238,7 +238,7 @@ public final class Constants { int i; for (i = 0; i < SC_RESP_AJP13_MAX; i++) { responseTransHash.put(getResponseHeaderForCode(i), - new Integer(0xA001 + i)); +Integer.valueOf(0xA001 + i)); } } catch (Exception e) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1041892 - in /tomcat/trunk: java/org/apache/catalina/connector/ test/org/apache/catalina/connector/ webapps/docs/ webapps/docs/config/
Mark, On 12/5/2010 12:31 PM, Mark Thomas wrote: > On 03/12/2010 16:07, schu...@apache.org wrote: >> Author: schultz >> Date: Fri Dec 3 16:07:50 2010 >> New Revision: 1041892 >> >> URL: http://svn.apache.org/viewvc?rev=1041892&view=rev >> Log: >> Fixed bug 48692: Provide option to parse application/x-www-form-urlencoded >> PUT requests > > Some minor comments in-line. > >> +public boolean isParseBodyMethod(String method) > This method could (should?) be protected rather then public. While fixing the other issues, I was thinking about a few things. Nearly all methods in the Connector class are public, not protected. The mutators are the only dangerous methods and they must be public so that the Digester can set them during Connector configuration. Is there a compelling reason to make the isParseBodyMethod method protected? Or, is that simply considered an implementation detail that should be hidden from the public API? I'm open to either strategy. Thanks, -chris signature.asc Description: OpenPGP digital signature
Re: svn commit: r1043444 - in /tomcat/trunk/java/org/apache/coyote/ajp: AbstractAjpProcessor.java AjpMessage.java Constants.java
2010/12/8 : > Author: markt > Date: Wed Dec 8 15:07:20 2010 > New Revision: 1043444 > > URL: http://svn.apache.org/viewvc?rev=1043444&view=rev > Log: > Remove some unused code > Fix some FindBugs niggles > > Modified: > tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java > tomcat/trunk/java/org/apache/coyote/ajp/AjpMessage.java > tomcat/trunk/java/org/apache/coyote/ajp/Constants.java > > Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpMessage.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpMessage.java?rev=1043444&r1=1043443&r2=1043444&view=diff > Why are you removing those methods from AjpMessage? That is an utility class that deals with AJP protocol, and those methods look not broken and useful. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1041892 - in /tomcat/trunk: java/org/apache/catalina/connector/ test/org/apache/catalina/connector/ webapps/docs/ webapps/docs/config/
On 08/12/2010 15:39, Christopher Schultz wrote: > Mark, > > On 12/5/2010 12:31 PM, Mark Thomas wrote: >> On 03/12/2010 16:07, schu...@apache.org wrote: >>> Author: schultz >>> Date: Fri Dec 3 16:07:50 2010 >>> New Revision: 1041892 >>> >>> URL: http://svn.apache.org/viewvc?rev=1041892&view=rev >>> Log: >>> Fixed bug 48692: Provide option to parse application/x-www-form-urlencoded >>> PUT requests >> >> Some minor comments in-line. >> >>> +public boolean isParseBodyMethod(String method) >> This method could (should?) be protected rather then public. > > While fixing the other issues, I was thinking about a few things. Nearly > all methods in the Connector class are public, not protected. The > mutators are the only dangerous methods and they must be public so that > the Digester can set them during Connector configuration. > > Is there a compelling reason to make the isParseBodyMethod method > protected? Or, is that simply considered an implementation detail that > should be hidden from the public API? Just a general principal not to expose stuff to the public API that doesn't have to be. It is also easy to change protected to public later, harder to go the other way. One of the many things on my to-do list is to clean up the dependencies between the modules, only expose the stuff that needs to be exposed and expose everything through interfaces. Given the length of my to-do list and the rate I am making progress I suspect that will happen sometime around Tomcat 12 :) Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1043444 - in /tomcat/trunk/java/org/apache/coyote/ajp: AbstractAjpProcessor.java AjpMessage.java Constants.java
On 08/12/2010 15:52, Konstantin Kolinko wrote: > 2010/12/8 : >> Author: markt >> Date: Wed Dec 8 15:07:20 2010 >> New Revision: 1043444 >> >> URL: http://svn.apache.org/viewvc?rev=1043444&view=rev >> Log: >> Remove some unused code >> Fix some FindBugs niggles >> >> Modified: >>tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java >>tomcat/trunk/java/org/apache/coyote/ajp/AjpMessage.java >>tomcat/trunk/java/org/apache/coyote/ajp/Constants.java >> >> Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpMessage.java >> URL: >> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpMessage.java?rev=1043444&r1=1043443&r2=1043444&view=diff >> > > Why are you removing those methods from AjpMessage? > That is an utility class that deals with AJP protocol, and those > methods look not broken and useful. Simply that the methods weren't being used and I don't see the point of retaining and maintaining code that isn't being used. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1043531 - in /tomcat/trunk: checkstyle.xml java/org/apache/catalina/connector/Connector.java java/org/apache/catalina/connector/CoyoteAdapter.java java/org/apache/coyote/AbstractProtocolH
Author: markt Date: Wed Dec 8 17:15:50 2010 New Revision: 1043531 URL: http://svn.apache.org/viewvc?rev=1043531&view=rev Log: Re-factoring in support of https://issues.apache.org/bugzilla/show_bug.cgi?id=50360 ProtocolHandler should register itself with MBean server rather than have the connector do it. Modified: tomcat/trunk/checkstyle.xml tomcat/trunk/java/org/apache/catalina/connector/Connector.java tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java tomcat/trunk/java/org/apache/coyote/Adapter.java Modified: tomcat/trunk/checkstyle.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/checkstyle.xml?rev=1043531&r1=1043530&r2=1043531&view=diff == --- tomcat/trunk/checkstyle.xml (original) +++ tomcat/trunk/checkstyle.xml Wed Dec 8 17:15:50 2010 @@ -27,6 +27,11 @@ + + + @@ -54,12 +59,12 @@ https://sourceforge.net/tracker/?func=detail&aid=3039718&group_id=29721&atid=397078 --> + + - - \ No newline at end of file Modified: tomcat/trunk/java/org/apache/catalina/connector/Connector.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Connector.java?rev=1043531&r1=1043530&r2=1043531&view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/Connector.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/Connector.java Wed Dec 8 17:15:50 2010 @@ -907,9 +907,6 @@ public class Connector extends Lifecycle ("coyoteConnector.protocolHandlerInitializationFailed"), e); } -onameProtocolHandler = register(protocolHandler, -createObjectNameKeyProperties("ProtocolHandler")); - // Initialize mapper listener mapperListener.init(); } @@ -967,7 +964,6 @@ public class Connector extends Lifecycle @Override protected void destroyInternal() throws LifecycleException { mapperListener.destroy(); -unregister(onameProtocolHandler); try { protocolHandler.destroy(); Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1043531&r1=1043530&r2=1043531&view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Wed Dec 8 17:15:50 2010 @@ -464,6 +464,12 @@ public class CoyoteAdapter implements Ad } +@Override +public String getDomain() { +return connector.getDomain(); +} + + // -- Protected Methods Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1043531&r1=1043530&r2=1043531&view=diff == --- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original) +++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Wed Dec 8 17:15:50 2010 @@ -23,6 +23,7 @@ import java.util.concurrent.Executor; import javax.management.MBeanRegistration; import javax.management.MBeanServer; +import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import org.apache.juli.logging.Log; @@ -334,6 +335,24 @@ public abstract class AbstractProtocolHa // NOOP } +private ObjectName createObjectName() throws MalformedObjectNameException { +// Use the same domain as the connector +domain = adapter.getDomain(); + +if (domain == null) { +return null; +} + +StringBuilder name = new StringBuilder(getDomain()); +name.append(":type=ProtocolHandler,port="); +name.append(getPort()); +InetAddress address = getAddress(); +if (address != null) { +name.append(",address="); +name.append(ObjectName.quote(address.toString())); +} +return new ObjectName(name.toString()); +} // --- Lifecycle methods @@ -349,6 +368,15 @@ public abstract class AbstractProtocolHa getLog().info(sm.getString("abstractProtocolHandler.init", getName())); +if (oname == null) { +// Component not pre-registered so register it +oname = createObjectName(); +if (oname != null) { +Registry.getRegistry(null, null).regist
Re: svn commit: r1041892 - in /tomcat/trunk: java/org/apache/catalina/connector/ test/org/apache/catalina/connector/ webapps/docs/ webapps/docs/config/
Mark, On 12/5/2010 12:31 PM, Mark Thomas wrote: > On 03/12/2010 16:07, schu...@apache.org wrote: >> Author: schultz >> Date: Fri Dec 3 16:07:50 2010 >> New Revision: 1041892 >> >> +if(methodSet.contains("TRACE")) >> +throw new IllegalArgumentException("TRACE method MUST NOT >> include an entity (see RFC 2616 Section 9.6)"); > This should use the StringManager for i18n support. Okay, last question: I can handle the English version... should I leave it at that and ask for a human translation, or should I use Google Translate to translate to the other existing locales in the LocalStrings files? Thanks, -chris signature.asc Description: OpenPGP digital signature
svn commit: r1043611 - /tomcat/native/trunk/native/src/poll.c
Author: costin Date: Wed Dec 8 19:07:41 2010 New Revision: 1043611 URL: http://svn.apache.org/viewvc?rev=1043611&view=rev Log: Javadoc for Poll.create() describes ENOTIMPL error if THREADSAFE is requested but not supported. The old code was silently removing THREADSAFE flag, java side wouldn't have any way to know if it needs to wait or can modify the poll set from a different thread. Modified: tomcat/native/trunk/native/src/poll.c Modified: tomcat/native/trunk/native/src/poll.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/poll.c?rev=1043611&r1=1043610&r2=1043611&view=diff == --- tomcat/native/trunk/native/src/poll.c (original) +++ tomcat/native/trunk/native/src/poll.c Wed Dec 8 19:07:41 2010 @@ -120,9 +120,9 @@ TCN_IMPLEMENT_CALL(jlong, Poll, create)( if (f & APR_POLLSET_THREADSAFE) { apr_status_t rv = apr_pollset_create(&pollset, (apr_uint32_t)size, p, f); -if (rv == APR_ENOTIMPL) -f &= ~APR_POLLSET_THREADSAFE; -else if (rv != APR_SUCCESS) { +// Pass the ENOTIMPL to java, as described in javadocs. Java must clean the +// flag, will know it's not supported. +if (rv != APR_SUCCESS) { tcn_ThrowAPRException(e, rv); goto cleanup; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1043611 - /tomcat/native/trunk/native/src/poll.c
On 12/08/2010 08:07 PM, cos...@apache.org wrote: Author: costin +// Pass the ENOTIMPL to java, as described in javadocs. Java must clean the +// flag, will know it's not supported. .c file and c++ style comment ??? Welcome to the beautiful land of native code, Costin :) Cheers -- ^TM - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1041892 - in /tomcat/trunk: java/org/apache/catalina/connector/ test/org/apache/catalina/connector/ webapps/docs/ webapps/docs/config/
On 08/12/2010 18:03, Christopher Schultz wrote: > Mark, > > On 12/5/2010 12:31 PM, Mark Thomas wrote: >> On 03/12/2010 16:07, schu...@apache.org wrote: >>> Author: schultz >>> Date: Fri Dec 3 16:07:50 2010 >>> New Revision: 1041892 >>> >>> +if(methodSet.contains("TRACE")) >>> +throw new IllegalArgumentException("TRACE method MUST NOT >>> include an entity (see RFC 2616 Section 9.6)"); >> This should use the StringManager for i18n support. > > Okay, last question: I can handle the English version... should I leave > it at that and ask for a human translation, or should I use Google > Translate to translate to the other existing locales in the LocalStrings > files? We usually just do the English and wait for contributions for the other languages. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1043696 - /tomcat/native/trunk/native/src/poll.c
Author: costin Date: Wed Dec 8 21:45:05 2010 New Revision: 1043696 URL: http://svn.apache.org/viewvc?rev=1043696&view=rev Log: Fix comment style, thanks Mladen. Modified: tomcat/native/trunk/native/src/poll.c Modified: tomcat/native/trunk/native/src/poll.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/poll.c?rev=1043696&r1=1043695&r2=1043696&view=diff == --- tomcat/native/trunk/native/src/poll.c (original) +++ tomcat/native/trunk/native/src/poll.c Wed Dec 8 21:45:05 2010 @@ -120,8 +120,9 @@ TCN_IMPLEMENT_CALL(jlong, Poll, create)( if (f & APR_POLLSET_THREADSAFE) { apr_status_t rv = apr_pollset_create(&pollset, (apr_uint32_t)size, p, f); -// Pass the ENOTIMPL to java, as described in javadocs. Java must clean the -// flag, will know it's not supported. +/* Pass the ENOTIMPL to java, as described in javadocs. Java must clean the + flag, will know it's not supported. +*/ if (rv != APR_SUCCESS) { tcn_ThrowAPRException(e, rv); goto cleanup; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
tc-native: adding few more features
Hi, I have few features mostly done - I'm looking to add them in a way that allows Java code to detect if the new methods are there and use them, or use the old library if needed. What I'm trying to add: - BIO pair mode for SSL - right now we attach to a socket, in BIO pair you can just inject/extract bytes. - extra debugging methods for SSL - I'm copying few methods from openssl to dump the bytes, messages, etc. It helps a lot when figuring out problems. - support for few TLS extensions - session ticket ( avoids a roundtrip and avoids the need for server to cache sessions ), get/set hostname. The trickiest is the 'next protocol negotiation' - which only exists in OpenSSL head, but it's required by protocols like SPDY. I'm thinking to add them in a new class 'SSLExt' (?), if the class can't be loaded fall back and not use the features. Suggestions ? Costin
svn commit: r1043734 - in /tomcat/trunk/java/org/apache/coyote: Constants.java Request.java
Author: markt Date: Wed Dec 8 22:25:04 2010 New Revision: 1043734 URL: http://svn.apache.org/viewvc?rev=1043734&view=rev Log: Removed a little more unused code Modified: tomcat/trunk/java/org/apache/coyote/Constants.java tomcat/trunk/java/org/apache/coyote/Request.java Modified: tomcat/trunk/java/org/apache/coyote/Constants.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Constants.java?rev=1043734&r1=1043733&r2=1043734&view=diff == --- tomcat/trunk/java/org/apache/coyote/Constants.java (original) +++ tomcat/trunk/java/org/apache/coyote/Constants.java Wed Dec 8 22:25:04 2010 @@ -14,10 +14,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.coyote; -import java.util.Locale; /** * Constants. @@ -33,13 +31,6 @@ public final class Constants { public static final String DEFAULT_CHARACTER_ENCODING="ISO-8859-1"; - -public static final String LOCALE_DEFAULT = "en"; - - -public static final Locale DEFAULT_LOCALE = new Locale(LOCALE_DEFAULT, ""); - - public static final int MAX_NOTES = 32; Modified: tomcat/trunk/java/org/apache/coyote/Request.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Request.java?rev=1043734&r1=1043733&r2=1043734&view=diff == --- tomcat/trunk/java/org/apache/coyote/Request.java (original) +++ tomcat/trunk/java/org/apache/coyote/Request.java Wed Dec 8 22:25:04 2010 @@ -191,10 +191,6 @@ public final class Request { return decodedUriMB; } -public MessageBytes query() { -return queryMB; -} - public MessageBytes queryString() { return queryMB; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 50360] Server socket still bound after Embedded.stop is invoked
https://issues.apache.org/bugzilla/show_bug.cgi?id=50360 --- Comment #9 from Martin Grotzke 2010-12-08 19:15:46 EST --- D'oh. Is there another solution in sight? -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org