2010/12/3 Mladen Turk <mt...@apache.org>: > On 12/01/2010 07:37 PM, ma...@apache.org wrote: >> >> Author: markt >> Date: Wed Dec 1 18:37:29 2010 >> New Revision: 1041120 >> >> URL: http://svn.apache.org/viewvc?rev=1041120&view=rev >> Log: >> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50360 >> Bind/release socket on start()/stop() >> Register/deregister MBeans on init()/destroy() >> > > >> >> Modified: >> tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java >> URL: >> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1041120&r1=1041119&r2=1041120&view=diff >> >> ============================================================================== >> --- tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java >> (original) >> +++ tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Wed >> Dec 1 18:37:29 2010 >> @@ -128,11 +128,6 @@ public abstract class AbstractEndpoint { >> protected volatile boolean paused = false; >> >> /** >> - * Track the initialization state of the endpoint. >> - */ >> - protected boolean initialized = false; >> - > > > We would need that back or even better axe running and paused > and creating an "state" enum. > > For example the connector will report as running on start() > even if missconfigured cause it is set before Acceptor or Pollers > are created. > > So internally both for paused and running we actually have > pauseStarted -> paused, runningStarted -> running=true > For stop() we have > pausePending -> paused, runningPending -> running=false > > Currently it is possible to start() while stop() is still running > which could only happen if stop() actually ended. > > Think that single eg. EndpointState enum will cover all the > states during start(),pause(),resume(),stop() replacing multiple > booleans (at least running and paused) with a single enum. > > > WDTYT? >
It makes sense for me. Though those booleans are checked here and there inside loops. I wonder how those checks will be converted to enums. I have another question about this commit: (I have not verified this, just a hunch) My understanding is that when Tomcat is started by jsvc, Bootstrap.init(String[]) is called and then jsvc drops privileges and calls Bootstrap.start(), as documented in [1]. So, binding to port 80 should be performed during initialization while we have the root privileges, and not during startup. Does binding to port 80 still work with Tomcat 7? [1] http://commons.apache.org/daemon/jsvc.html#Directly Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org