tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Embedded tomcat example
Date Fri, 29 Jan 2010 21:34:40 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Clay,

On 1/29/2010 4:17 PM, Clay McCoy wrote:
> Thanks for your response.
> So my main application probably keeps going because it is hooked up to a database, JMS
broker, and several other things I guess.
> What is the simple and preferred way to keep Tomcat going without adding anything like
that.
> I would expect it to be very common for someone to simply want to run a servlet in a
servlet container, and it certainly breaks the principle of least surprise that it stops.

I believe Tomcat's bootstrap class (I say without bothering to look at
the code at all :( ) ultimately ends up binding to the shutdown port and
waiting forever for a SHUTDOWN request there. That's how Tomcat
typically "waits forever" before stopping, rather than stopping
immediately after initialization.

You could do something like that.

Or, you could just do Thread.sleep forever.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktjVHAACgkQ9CaO5/Lv0PDHjACdGbaK2OS7qG5drHkx0BcXRQ54
mzQAoLZhck3fHyYZCVeUjb7Tmty72ykU
=zyR4
-----END PGP SIGNATURE-----

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


Mime
View raw message