2011/1/25 Adib <amsl...@gmail.com>:
> My question was more from a design perspective why did the tomcat
> developers include this shutdown port mechanism what are the benefits
> and what limitations were they trying to work around when they came up
> with this design.

There are two ways to perform the shutdown
(a) initiate shutdown from within JVM
(b) shut the JVM itself down

(a) is implemented when you connect to the shutdown port,  or when
Tomcat is run with commons-daemon (procrun or jsvc) [1], because jsvc
has direct access to the running JVM and issues the relevant API call
to Tomcat.

IIRC, jsvc itself can react to signals.


(b) works thanks to shutdown hooks installed by Tomcat. The API used
to install shutdown hooks is @since JDK 1.3 and Tomcat is older than
that.


That said, (a) is reliable, (b) is a bit more risky (though I would
hope that it works as well).

[1] http://commons.apache.org/daemon/

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to