I have 3 wars in my webapp folder. Two of them are built on services of the third one. I\'m in a testing environment, i.e. I don\'t have control over their architectures, so
That's quite easy to achieve if you don't care hacking a bit of tomcat code and creating your own Host instance
1) Create a subClass of org.apache.catalina.core.StandardHost, say MyHost:
class MyHost extends org.apache.catalina.core.StandardHost{
public MyHost (){
super();
//changing HashMap for a predictable ordered Map :)
this.children = new LinkedHashMap();
}
}
2) register your class on your server's xml Host tag ()
Incredible as it may seem, it solves the problem as long as you have all your web app declared in the correct order inside of Host tag:
Thaen app1 will start before app2, no matter which SO you used.