以确定的顺序在tomcat中启动webapps [英] Start webapps in tomcat in a determinate order

查看:384
本文介绍了以确定的顺序在tomcat中启动webapps的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个Web应用程序:

I have 2 webapps:

WebApp 2取决于WebApp 1

WebApp 2 depends from WebApp 1

如果WebApp 1未运行,则WebApp 2失败

If WebApp 1 is not running, WebApp 2 fails

我可以在tomcat中定义始终希望webapp 1在webapp 2之前启动吗?

Can I define in tomcat that I always want that webapp 1 starts before webapp 2?

推荐答案

根据Apache Wiki(位于

According to the Apache wiki (at http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q27):

没有预期的启动顺序. Servlet规范和Tomcat都不 定义一个.您不能依赖应用程序 以任何特定顺序开始.

There is no expected startup order. Neither the Servlet spec nor Tomcat define one. You can't rely on the apps starting in any particular order.

这篇关于以确定的顺序在tomcat中启动webapps的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆