> From: Kyle B [mailto:[EMAIL PROTECTED] 
> Subject: Re: Server.xml Sort on Start
> 
> The Host elements do not contain backgroundProcesserDelay. 

Not by default, but one can be added.  I wouldn't recommend it, since
there doesn't seem to be much advantage to do so unless one has many,
many <Host> elements and multiple CPUs.

> It's not sorted by element order in the server.xml, nor by 
> name attribute, or appBase.

As I stated before, the order appears to be that of the HashMap index of
the name attribute of the <Host> element.  This is not the simple
hashCode() of the name string, since the processing in HashMap does some
manipulation of the hashCode() result prior to inserting the item in the
map.  The processing in Tomcat converts the HashMap to an object array
prior to processing; this array is typically in HashMap index order,
although that's not defined by the JRE API spec and could change from
one JVM implementation or level to another.

You don't need to process XML to determine the processing order.  Just
take the list of <Host> names in the same order they appear in
server.xml, and run a simple program against the list to insert the
names into a HashMap, convert the Map to an object array, and see what
the order is.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to