tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Context Chicken & Egg Problem
Date Fri, 11 Dec 2009 15:04:04 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Scot,

> -------- Original Message --------
> Subject: RE: Context Chicken & Egg Problem
> From: "Caldarale, Charles R" <Chuck.Caldarale@unisys.com>
> Date: Thu, December 10, 2009 6:24 pm
> To: Tomcat Users List <users@tomcat.apache.org>
>
>> From: shatt@radiantblue.com [mailto:shatt@radiantblue.com]
>> Subject: RE: Context Chicken & Egg Problem
>>
>> just a curiosity as to what is happening under the Tomcat
>> covers during this scenario.
>
> Tomcat initialization is single-thread, so if webapp A happens to
> get initialized before B, and the initialization thread running
> inside A makes an HTTP request that targets a yet-to-be initialized
> webapp in the same Tomcat instance, you have a deadlock. Someday
> maybe, we'll see multi-threaded initialization.

On 12/10/2009 8:34 PM, shatt@radiantblue.com wrote:
> Thank you Chuck. That is exactly what I was looking for.

Patches are always welcome :)

Unfortunately, threaded initialization of multi-context containers is
not guaranteed by the spec, so you'd end up with a non-portable webapp
if Tomcat /did/ support such a thing and your webapp simply blocked
until the dependent webapp was available.

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

iEYEARECAAYFAksiX2QACgkQ9CaO5/Lv0PCkZgCfYJlcWsbXQAB/MJOdZ7Va86Ks
VckAnjOlUt6gGG0xi0eIjWd3JP7N6t2h
=4mpq
-----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