It is true that tomcat does not provide any way to enforce deployment order.
Tomcat deploys webapps in following order:
1.Any Context Descriptors will be deployed first.
2.Exploded web applications not referenced by any Context Descriptor will then be deployed. If they have an associated .WAR file in the appBase and it is newer than the exploded web application, the exploded directory will be removed and the webapp will be redeployed from the .WAR
3.WAR files will be deployed
Here is a proposed solution:
If you want to specify the deployment order then define a context for your web app in $CATALINA_BASE/conf/[enginename]/[hostname]/MyApp.xml
Tomcat scans $CATALINA_BASE/conf/[enginename]/[hostname]/ by performing File listFiles() which returns a File array sorted by hash value (OS dependent).
You may use the following code to check in which order webapps will be deployed
File file = new File("/opt/tomcat/conf/Catalina/localhost");
File[] files = file.listFiles();
for (File f : files)
{
System.out.println("Filename: " + f.getName());
}
Naming deployment descriptor appropriately will solve your problem.