I've got some problems on some of our production servers, running Suse
SLES 9 / IBM SDK 1.4.2 SR5 with webapp loading order.

From what I saw in org.apache.catalina.startup.HostConfig, the
deployApps method make use of File.list() which is not guaranteed to
return the list of String in any particular order :

    * <p> There is no guarantee that the name strings in the resulting array
    * will appear in any specific order; they are not, in particular,
    * guaranteed to appear in alphabetical order.
    *

What about using a simple Arrays.sort to have the list sorted in
alphabetical order and so have something coherent between JDK and
implementations ?

Here is the 'modified' deployApps method.

   /**
    * Deploy applications for any directories or WAR files that are found
    * in our "application root" directory.
    */
   protected void deployApps() {

       File appBase = appBase();
       File configBase = configBase();
       // Deploy XML descriptors from configBase
       String [] list = configBase.list();
       Arrays.sort(list);
       deployDescriptors(configBase, list);
       // Deploy WARs, and loop if additional descriptors are found
       list = appBase.list();
       Arrays.sort(list);
       deployWARs(appBase, list);
       // Deploy expanded folders
       deployDirectories(appBase, list);

   }


Regards

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to