tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Schumacher <>
Subject Re: parallel webapp initializa‚Äčtion
Date Tue, 11 Oct 2011 05:59:07 GMT

Christopher Schultz <> schrieb:

>Hash: SHA1
>On 10/10/2011 2:28 PM, Pid wrote:
>> On 10/10/2011 10:30, sasc sasc wrote:
>>> +1 for this enhancement. With configurable number of threads
>>> (default: Runtime.getRuntime().availableProcessors())
>> Such a change might prove unwelcome for people who've got (however 
>> fragile) configurations which rely on apps starting in a specific
>> order.
>> For Tomcat 7.0 I'd suggest that the default remain 1.
>I would say that the default should probably that the main thread
>directly initializes everything, instead of launching a new thread
>pool of size=1 and then sitting there waiting for it to finish.
>Practically speaking, it may be easier to just do the above (use a
>1-sized pool) in order to avoid terrible-looking and hard-to-follow
>code. An idle thread isn't really that much strain on a system.
I think that can be easily done with a self implemented executor which would just run the
given runnables.

>It might be nice to have Tomcat auto-detect the number of processors
>and then subtract from them, say, with a negative number. So, "-2"
>means "number of processors minus two" with the obvious caveat that
>you always need to have at least one :)
>So, maybe "0" could mean "use all processors", positive integers mean
>"limit to X number", and negative integers mean "all available
>processors minus X".
Since all values are strings at first we could even reserve special words like "runtime" or
"%f", "#+-x" to mark special vakues. Where x is an int and means add/subtract number from
current processors and y is a float meaning percent off current processors. 

>- -chris
>Version: GnuPG v1.4.10 (MingW32)
>Comment: Using GnuPG with Mozilla -
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message