The method ,File.list(),is not always returned a sorted array of String. In my test, under WinXPSP3/SunJDK1.5 or Debian5.02/SunJDK1.6 or AIX5.3/IBMJDK1.5, it works well. But, under RHEL4/SunJDK1.5, this method returned an out-of-order array of String. My webapps need to be loaded in order. This result let them breakdown. So,I think HostConfig.java should be modified like this: HostConfig.java Line490: before // Deploy XML descriptors from configBase deployDescriptors(configBase, configBase.list()); // Deploy WARs, and loop if additional descriptors are found deployWARs(appBase, appBase.list()); // Deploy expanded folders deployDirectories(appBase, appBase.list()); after // Deploy XML descriptors from configBase String[] configFiles = configBase.list(); Arrays.sort(configFiles, 0, configFiles.length); deployDescriptors(configBase, configFiles); // Deploy WARs, and loop if additional descriptors are found String[] appFiles = appBase.list(); Arrays.sort(appFiles, 0, appFiles.length); deployWARs(appBase, appFiles); // Deploy expanded folders deployDirectories(appBase, appFiles);
Web applications are meant to be independent. There is no guarantee on load order. There are better ways to achieve what you are trying to achieve. These have been discussed several times on the users list. Please ask any further questions you have on this topic there.