Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 57611 invoked from network); 3 Dec 2010 07:22:00 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Dec 2010 07:22:00 -0000 Received: (qmail 60441 invoked by uid 500); 3 Dec 2010 07:22:00 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 60116 invoked by uid 500); 3 Dec 2010 07:21:59 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 60107 invoked by uid 99); 3 Dec 2010 07:21:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Dec 2010 07:21:58 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [213.191.128.81] (HELO mxout2.iskon.hr) (213.191.128.81) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Dec 2010 07:21:50 +0000 Received: from mxscanout.iskon.hr (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 09E94CB0EB for ; Fri, 3 Dec 2010 08:21:28 +0100 (CET) Received: from mx.iskon.hr (unknown [213.191.142.123]) by mxscanout.iskon.hr (Postfix) with SMTP id 2B709CB0E7 for ; Fri, 3 Dec 2010 08:21:27 +0100 (CET) Received: (qmail 28894 invoked from network); 3 Dec 2010 08:21:27 +0100 X-Remote-IP: 89.164.112.141 Received: from 89-164-112-141.dsl.iskon.hr (HELO es55x86w0.jboss.hr) (89.164.112.141) by mx.iskon.hr with SMTP; 3 Dec 2010 08:21:27 +0100 Message-ID: <4CF89A7D.2070508@apache.org> Date: Fri, 03 Dec 2010 08:21:33 +0100 From: Mladen Turk User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: dev@tomcat.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/ References: <20101201183730.DD28B2388993@eris.apache.org> <4CF883EB.2030609@apache.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: IskonProtect X-PerlMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' SUPERLONG_LINE 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1300_1399 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MOZILLA_MSGID 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_PATH 0, __URI_NO_WWW 0, __URI_NS , __USER_AGENT 0' On 12/03/2010 07:43 AM, Konstantin Kolinko wrote: > 2010/12/3 Mladen Turk: >> >> 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