tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: svn commit: r1041120 - in /tomcat/trunk: java/org/apache/catalina/connector/ java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/org/apache/tomcat/util/net/ test/org/apache/tomcat/util/net/ webapps/docs/
Date Fri, 03 Dec 2010 07:21:33 GMT
On 12/03/2010 07:43 AM, Konstantin Kolinko wrote:
> 2010/12/3 Mladen Turk<mturk@apache.org>:
>>
>> 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.
>

if (running) -> if (state == Endpoint.RUNNING)

Weird stuff like 'if (running && !paused)'
should be also something like:
if (state == Endpoint.RUNNING) {
   state = Endpoint.PAUSE_PENDING;
   ...
   state = Endpoint.PAUSED;
}

IMO the endpoint can be only in a single state at
one time.

>
> 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?
>

Didn't test, but probably not. The sockets are now created iside
start() instead init() so after the privileges are dropped.


Regards
-- 
^TM

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


Mime
View raw message