On 12/03/2010 07:43 AM, Konstantin Kolinko wrote:
2010/12/3 Mladen Turk<mt...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to